88 for (i = 0; i < n; i++)
91 sizeof (s[i].sw_hw_if_index));
102 u32 n = va_arg (*va,
u32);
104 for (i = 0; i < n; i++)
107 sizeof (s[i].sw_hw_if_index));
136 vnet_hw_interface_class_t * hw_class = vnet_get_hw_interface_class (vnm, hif->hw_class_index);
137 serialize_cstring (m, hw_class->name);
146 vec_add2 (sts, st, 1);
147 st->sw_hw_if_index = sif->sw_if_index;
148 st->flags = sif->flags;
162 vec_add2 (sts, st, 1);
163 st->sw_hw_if_index = hif->hw_if_index;
164 st->flags = vnet_hw_interface_flags_to_sw(hif->flags);
201 unserialize_cstring (m, &class_name);
202 p = hash_get_mem (im->hw_interface_class_by_name, class_name);
204 error = vnet_hw_interface_set_class_helper (vnm, hif->hw_if_index, p[0], 0);
206 clib_error_report (error);
207 vec_free (class_name);
231 _vnet_interface_function_list_elt_t **
234 _vnet_interface_function_list_elt_t *elt;
245 error = elt->fp (vnm, if_index, flags);
248 elt = elt->next_interface_function;
265 if (hw_class->interface_add_del_function
267 hw_class->interface_add_del_function (vnm, hw_if_index, is_create)))
270 if (dev_class->interface_add_del_function
272 dev_class->interface_add_del_function (vnm, hw_if_index,
313 if (!is_create && (hi->
flags & mask) == flags)
320 if (hw_class->link_up_down_function
321 && (error = hw_class->link_up_down_function (vnm, hw_if_index,
368 sw_interface_admin_up_down_functions);
383 if ((flags != (si_sup->
flags & mask)) &&
385 && ((si_sup->
flags & mask) ==
398 if ((si->
flags & mask) == flags)
409 if (!dev_class->redistribute)
416 old_flags = si->
flags;
421 (vnm, sw_if_index, flags,
427 si->
flags = old_flags;
440 if ((flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) &&
448 old_flags = si->
flags;
451 if (!(flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP))
452 si->
flags &= ~VNET_SW_INTERFACE_FLAG_ADMIN_UP;
454 if (dev_class->admin_up_down_function
455 && (error = dev_class->admin_up_down_function (vnm,
460 si->
flags = old_flags;
464 if (hw_class->admin_up_down_function
465 && (error = hw_class->admin_up_down_function (vnm,
470 si->
flags = old_flags;
475 if (!(flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP)
496 (vnm, hw_if_index, flags,
505 (vnm, sw_if_index, flags,
585 if (template->sub.eth.flags.two_tags == 1
586 && template->sub.eth.flags.exact_match == 1
587 && (template->sub.eth.flags.inner_vlan_id_any == 1
588 || template->sub.eth.flags.outer_vlan_id_any == 1))
591 "inner-dot1q any exact-match is unsupported");
599 dev_class->subif_add_del_function)
601 error = dev_class->subif_add_del_function (vnm, hi->
hw_if_index,
610 (vnm, *sw_if_index, template->flags,
680 bool changed =
false;
685 if (si->
mtu[i] != mtu[i])
743 n->
function = dev_class->tx_function;
747 dev_class->tx_function_n_errors,
748 dev_class->tx_function_error_strings);
765 u32 hw_class_index,
u32 hw_instance)
777 char *tx_node_name = NULL, *output_node_name = NULL;
787 if (dev_class->format_device_name)
788 hw->
name =
format (0,
"%U", dev_class->format_device_name, dev_instance);
789 else if (hw_class->format_interface_name)
790 hw->
name =
format (0,
"%U", hw_class->format_interface_name,
793 hw->
name =
format (0,
"%s%x", hw_class->name, dev_instance);
797 sizeof (hw->
name[0]),
807 .hw_if_index = hw_index
821 if (dev_class->tx_function == 0)
822 goto no_output_nodes;
824 tx_node_name = (
char *)
format (0,
"%v-tx", hw->
name);
825 output_node_name = (
char *)
format (0,
"%v-output", hw->
name);
873 node->function = dev_class->tx_function;
874 node->format_trace = dev_class->format_tx_trace;
896 r.runtime_data = &rt;
897 r.runtime_data_bytes =
sizeof (rt);
899 r.vector_size =
sizeof (
u32);
902 r.name = tx_node_name;
903 r.function = dev_class->tx_function;
912 r.name = output_node_name;
919 "interface is deleted",
920 "no buffers to segment GSO",
994 vnet_sw_interface_t *si = vnet_get_sw_interface (vnm, sw_if_index);
995 u64 sup_and_sub_key =
996 ((u64) (si->sup_sw_if_index) << 32) | (u64) si->sub.id;
997 hash_unset_mem_free (&im->sw_if_index_by_sup_and_sub, &sup_and_sub_key);
998 vnet_delete_sw_interface (vnm, sw_if_index);
1007 if (dev_class->tx_function)
1025 "interface-%d-output-deleted", hw_if_index);
1059 if (WALK_STOP == fn (vnm, sw_if_index, ctx))
1077 if (WALK_STOP == fn(vnm, hi->hw_if_index, ctx))
1095 if (WALK_STOP == fn (vnm, si, ctx))
1103 u32 hw_class_index,
u32 hw_instance)
1116 u32 hw_class_index,
u32 redistribute)
1138 "%v must be admin down to change class from %s to %s",
1139 hi->
name, old_class->name, new_class->name);
1142 if ((new_class->is_valid_class_for_interface
1143 && !new_class->is_valid_class_for_interface (vnm, hw_if_index,
1145 || (dev_class->is_valid_class_for_interface
1146 && !dev_class->is_valid_class_for_interface (vnm, hw_if_index,
1149 "%v class cannot be changed from %s to %s",
1150 hi->
name, old_class->name, new_class->name);
1154 if (old_class->hw_class_change)
1155 old_class->hw_class_change (vnm, hw_if_index, old_class->index,
1161 if (new_class->hw_class_change)
1162 new_class->hw_class_change (vnm, hw_if_index, old_class->index,
1165 if (dev_class->hw_class_change)
1166 dev_class->hw_class_change (vnm, hw_if_index, new_class->index);
1189 if (dev_class->rx_redirect_to_node)
1191 dev_class->rx_redirect_to_node (vnm, hw_if_index, node_index);
1195 return VNET_API_ERROR_UNIMPLEMENTED;
1262 #define _(a) if (sizeof(o->a) > sizeof (o->unused)) \ 1264 ("FATAL: size of opaque union subtype %s is %d (max %d)", \ 1265 #a, sizeof(o->a), sizeof (o->unused)); 1270 (0,
"FATAL: size of vlib buffer opaque %d, size of vnet opaque %d",
1279 im->sw_if_counters[VNET_INTERFACE_COUNTER_##E].name = #n; \ 1280 im->sw_if_counters[VNET_INTERFACE_COUNTER_##E].stat_segment_name = "/" #p "/" #n; 1286 im->combined_sw_if_counters[VNET_INTERFACE_COUNTER_##E].name = #n; \ 1287 im->combined_sw_if_counters[VNET_INTERFACE_COUNTER_##E].stat_segment_name = "/" #p "/" #n; 1304 if (c->tx_fn_registrations)
1311 ASSERT (c->tx_function == 0);
1315 if (fnr->priority > priority)
1317 priority = fnr->priority;
1318 c->tx_function = fnr->function;
1320 fnr = fnr->next_registration;
1325 c = c->next_class_registration;
1344 if (NULL == c->build_rewrite)
1346 if (NULL == c->update_adjacency)
1350 c = c->next_class_registration;
1364 #if VLIB_BUFFER_TRACE_TRAJECTORY > 0 1386 if (dev_class->name_renumber == 0 || dev_class->format_device_name == 0)
1387 return VNET_API_ERROR_UNIMPLEMENTED;
1389 rv = dev_class->name_renumber (hi, new_show_dev_instance);
1397 hi->
name =
format (0,
"%U", dev_class->format_device_name,
1417 "unable to find hw interface for index %u",
1421 old_name = hw->
name;
1453 if (dev_class->mac_addr_change_function)
1456 dev_class->mac_addr_change_function (hi, old_address,
1465 if (NULL != hw_class->mac_addr_change_function)
1466 hw_class->mac_addr_change_function (hi, old_address, mac_address);
1472 "MAC Address Change is not supported on this interface");
1480 "mac address change is not supported for interface index %u",
1491 (vnm, hw_if_index, mac_address);
1497 u32 ip_sw_if_index,
u8 enable)
1512 [unnumbered_sw_if_index] =
1514 lookup_main.if_address_pool_index_by_sw_if_index[ip_sw_if_index];
1516 lookup_main.if_address_pool_index_by_sw_if_index
1517 [unnumbered_sw_if_index] =
1519 lookup_main.if_address_pool_index_by_sw_if_index[ip_sw_if_index];
1527 [unnumbered_sw_if_index] = ~0;
1529 [unnumbered_sw_if_index] = ~0;
1545 return (VNET_L3_PACKET_TYPE_IP4);
1547 return (VNET_L3_PACKET_TYPE_IP6);
1549 return (VNET_L3_PACKET_TYPE_MPLS);
1551 return (VNET_L3_PACKET_TYPE_ARP);
1664 else if (
unformat (line_input,
"disable")
1682 .path =
"interface collect detailed-stats",
1683 .short_help =
"interface collect detailed-stats <enable|disable>",
vnet_config_main_t config_main
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
void serialize_vnet_interface_state(serialize_main_t *m, va_list *va)
l2_input_config_t * configs
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
vnet_interface_per_thread_data_t * per_thread_data
clib_spinlock_t sw_if_counter_lock
static clib_error_t * vnet_hw_interface_set_class_helper(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index, u32 redistribute)
void vnet_sw_interface_ip_directed_broadcast(vnet_main_t *vnm, u32 sw_if_index, u8 enable)
void vlib_validate_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
validate a combined counter
vnet_hw_interface_nodes_t * deleted_hw_interface_nodes
_vnet_interface_function_list_elt_t * hw_interface_link_up_down_functions[VNET_ITF_FUNC_N_PRIO]
#define vec_serialize(m, v, f)
An indication that the rewrite is complete, i.e.
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
vnet_interface_main_t interface_main
uword vlib_node_add_named_next_with_slot(vlib_main_t *vm, uword node, char *name, uword slot)
int vnet_hw_interface_rx_redirect_to_node(vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
static clib_error_t * call_elf_section_interface_callbacks(vnet_main_t *vnm, u32 if_index, u32 flags, _vnet_interface_function_list_elt_t **elts)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
walk_rc_t(* vnet_hw_interface_walk_t)(vnet_main_t *vnm, u32 hw_if_index, void *ctx)
Call back walk type for walking all HW indices.
#define vec_unserialize(m, v, f)
void vnet_sw_interface_admin_up(vnet_main_t *vnm, u32 sw_if_index)
format_function_t * format_trace
vnet_device_class_t * device_class_registrations
u32 * input_node_thread_index_by_queue
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
This packet is to be rewritten and forwarded to the next processing node.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
word vnet_sw_interface_compare(vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
int vnet_interface_name_renumber(u32 sw_if_index, u32 new_show_dev_instance)
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
#define hash_set_mem(h, key, value)
ip_lookup_main_t lookup_main
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
uword * sub_interface_sw_if_index_by_id
uword * interface_tag_by_sw_if_index
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
_vnet_interface_function_list_elt_t * hw_interface_add_del_functions[VNET_ITF_FUNC_N_PRIO]
struct _vnet_device_class vnet_device_class_t
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
uword * dq_runtime_index_by_queue
f64 max_rate_bits_per_sec
enum vnet_sw_interface_flags_t_ vnet_sw_interface_flags_t
#define VNET_HW_INTERFACE_FLAG_DUPLEX_MASK
static clib_error_t * collect_detailed_interface_stats_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_node_function_t * function
void vlib_register_errors(vlib_main_t *vm, u32 node_index, u32 n_errors, char *error_strings[])
static void unserialize_vec_vnet_sw_hw_interface_state(serialize_main_t *m, va_list *va)
Adjacency to punt this packet.
enum walk_rc_t_ walk_rc_t
Walk return code.
void adj_glean_update_rewrite(adj_index_t adj_index)
adj_glean_update_rewrite
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
void default_update_adjacency(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
Default adjacency update function.
enum vnet_interface_helper_flags_t_ vnet_interface_helper_flags_t
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
vlib_node_function_t * function
Node function to call.
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
static u32 vnet_create_sw_interface_no_callbacks(vnet_main_t *vnm, vnet_sw_interface_t *template)
static clib_error_t * vnet_hw_interface_set_flags_helper(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags, vnet_interface_helper_flags_t helper_flags)
static vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
static clib_error_t * vnet_hw_interface_change_mac_address_helper(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address)
vlib_combined_counter_main_t * combined_sw_if_counters
enum vnet_hw_interface_flags_t_ vnet_hw_interface_flags_t
vnet_hw_interface_flags_t flags
#define hash_foreach(key_var, value_var, h, body)
uword vlib_node_add_next_with_slot(vlib_main_t *vm, uword node_index, uword next_node_index, uword slot)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
static clib_error_t * call_hw_interface_add_del_callbacks(vnet_main_t *vnm, u32 hw_if_index, u32 is_create)
#define clib_error_return(e, args...)
static walk_rc_t sw_interface_walk_callback(vnet_main_t *vnm, u32 sw_if_index, void *ctx)
struct _vlib_node_fn_registration vlib_node_fn_registration_t
#define vec_end(v)
End (last data address) of vector.
uword vnet_interface_output_node(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define vlib_call_init_function(vm, x)
u32 vnet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, u32 hw_class_index, u32 hw_instance)
void ip4_directed_broadcast(u32 sw_if_index, u8 enable)
#define hash_create_string(elts, value_bytes)
void vnet_sw_interface_set_protocol_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu[])
static void clib_spinlock_init(clib_spinlock_t *p)
uword * hw_interface_by_name
vnet_hw_interface_t * hw_interfaces
#define hash_create_mem(elts, key_bytes, value_bytes)
format_function_t format_vnet_sw_interface_name
void adj_mcast_update_rewrite(adj_index_t adj_index, u8 *rewrite, u8 offset)
adj_mcast_update_rewrite
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vlib_zero_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
Clear a combined counter Clears the set of per-thread counters.
u8 * format_vnet_interface_output_trace(u8 *s, va_list *va)
#define hash_unset_mem(h, key)
void ip4_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
void vnet_sw_interface_walk(vnet_main_t *vnm, vnet_sw_interface_walk_t fn, void *ctx)
Walk all the SW interfaces in the system.
int vnet_sw_interface_is_p2p(vnet_main_t *vnm, u32 sw_if_index)
#define pool_put(P, E)
Free an object E in pool P.
#define vec_dup(V)
Return copy of vector (no header, no alignment)
static void serialize_vec_vnet_sw_hw_interface_state(serialize_main_t *m, va_list *va)
uword * sw_if_index_by_sup_and_sub
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
vnet_sw_interface_flags_t flags
u8 * vnet_build_rewrite_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
vlib_simple_counter_main_t * sw_if_counters
word vnet_hw_interface_compare(vnet_main_t *vnm, uword hw_if_index0, uword hw_if_index1)
format_function_t * format_buffer
void vnet_sw_interface_update_unnumbered(u32 unnumbered_sw_if_index, u32 ip_sw_if_index, u8 enable)
#define foreach_vlib_main(body)
uword * hw_interface_class_by_name
#define foreach_simple_interface_counter_name
void unserialize_vnet_interface_state(serialize_main_t *m, va_list *va)
clib_error_t * vnet_rename_interface(vnet_main_t *vnm, u32 hw_if_index, char *new_name)
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
Adjacency to drop this packet.
#define foreach_combined_interface_counter_name
#define vec_free(V)
Free vector's memory (no header).
Multicast Midchain Adjacency.
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
static vnet_hw_interface_flags_t vnet_sw_interface_flags_to_hw(vnet_sw_interface_flags_t swf)
unformat_function_t * unformat_buffer
static void vnet_interface_counter_unlock(vnet_interface_main_t *im)
#define ETHERNET_INTERFACE_FLAG_MTU
static void unserialize_integer(serialize_main_t *m, void *x, u32 n_bytes)
static void serialize_integer(serialize_main_t *m, u64 x, u32 n_bytes)
static clib_error_t * call_sw_interface_add_del_callbacks(vnet_main_t *vnm, u32 sw_if_index, u32 is_create)
void vnet_hw_interface_init_for_class(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index, u32 hw_instance)
static void setup_output_node(vlib_main_t *vm, u32 node_index, vnet_hw_interface_class_t *hw_class)
u32 trace_classify_table_index
u8 * default_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
Return a complete, zero-length (aka dummy) rewrite.
u32 unnumbered_sw_if_index
format_function_t format_vnet_sw_interface_flags
#define VLIB_CLI_COMMAND(x,...)
This packets follow a mid-chain adjacency.
u32 * if_address_pool_index_by_sw_if_index
Head of doubly linked list of interface addresses for each software interface.
static void vnet_interface_counter_lock(vnet_interface_main_t *im)
void vlib_validate_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
validate a simple counter
#define hash_create(elts, value_bytes)
enum vnet_interface_function_priority_t_ vnet_interface_function_priority_t
u8 output_feature_arc_index
_vnet_interface_function_list_elt_t * sw_interface_mtu_change_functions[VNET_ITF_FUNC_N_PRIO]
void collect_detailed_interface_stats_flag_clear(void)
void vlib_node_rename(vlib_main_t *vm, u32 node_index, char *fmt,...)
ip_lookup_main_t lookup_main
static void setup_tx_node(vlib_main_t *vm, u32 node_index, vnet_device_class_t *dev_class)
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
u32 vlib_register_node(vlib_main_t *vm, vlib_node_registration_t *r)
static vnet_hw_interface_class_t * vnet_get_hw_interface_class(vnet_main_t *vnm, u32 hw_class_index)
static void vlib_zero_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Clear a simple counter Clears the set of per-thread u16 counters, and the u64 counter.
#define vec_cmp(v1, v2)
Compare two vectors (only applicable to vectors of signed numbers).
walk_rc_t(* vnet_hw_sw_interface_walk_t)(vnet_main_t *vnm, u32 sw_if_index, void *ctx)
Call back walk type for walking SW indices on a HW interface.
uword * device_class_by_name
static vlib_main_t * vlib_get_main(void)
void vnet_delete_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
int collect_detailed_interface_stats_flag
struct _vlib_node_registration vlib_node_registration_t
This packets needs to go to ICMP error.
This packet is for one of our own IP addresses.
void vnet_hw_interface_set_mtu(vnet_main_t *vnm, u32 hw_if_index, u32 mtu)
void vnet_sw_interface_admin_down(vnet_main_t *vnm, u32 sw_if_index)
#define hash_create_vec(elts, key_bytes, value_bytes)
void vnet_hw_interface_walk(vnet_main_t *vnm, vnet_hw_interface_walk_t fn, void *ctx)
Walk all the HW interface.
struct _vnet_hw_interface_class vnet_hw_interface_class_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
clib_error_t * vnet_interface_init(vlib_main_t *vm)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
static clib_error_t * vnet_sw_interface_set_flags_helper(vnet_main_t *vnm, u32 sw_if_index, vnet_sw_interface_flags_t flags, vnet_interface_helper_flags_t helper_flags)
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags)
vnet_l3_packet_type_t vnet_link_to_l3_proto(vnet_link_t link)
Convert a link to to an Ethertype.
static clib_error_t * vnet_interface_cli_init(vlib_main_t *vm)
VLIB buffer representation.
vnet_mtu_t vnet_link_to_mtu(vnet_link_t link)
void collect_detailed_interface_stats_flag_set(void)
static int vnet_hw_interface_rx_redirect_to_node_helper(vnet_main_t *vnm, u32 hw_if_index, u32 node_index, u32 redistribute)
vnet_sw_interface_t * sw_interfaces
vnet_hw_interface_class_t * hw_interface_class_registrations
a point 2 point interface
u32 ethernet_set_flags(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
vnet_hw_interface_class_t * hw_interface_classes
void vnet_sw_interface_set_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu)
walk_rc_t(* vnet_sw_interface_walk_t)(vnet_main_t *vnm, vnet_sw_interface_t *si, void *ctx)
Call back walk type for walking SW indices on a HW interface.
_vnet_interface_function_list_elt_t * sw_interface_add_del_functions[VNET_ITF_FUNC_N_PRIO]
static vnet_sw_interface_flags_t vnet_sw_interface_get_flags(vnet_main_t *vnm, u32 sw_if_index)
static vnet_sw_interface_flags_t vnet_hw_interface_flags_to_sw(vnet_hw_interface_flags_t hwf)
vnet_sw_interface_type_t type
ip4_main_t ip4_main
Global ip4 main structure.
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, vnet_sw_interface_flags_t flags)
vnet_interface_helper_flags_t_
static u32 vlib_num_workers()
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
#define VLIB_NODE_FLAG_IS_OUTPUT
#define vec_foreach(var, vec)
Vector iterator.
vnet_hw_interface_rx_mode default_rx_mode
void vnet_delete_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
vnet_device_class_t * device_classes
#define foreach_buffer_opaque_union_subtype
clib_error_t * vnet_hw_interface_change_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address)
_vnet_interface_function_list_elt_t * sw_interface_admin_up_down_functions[VNET_ITF_FUNC_N_PRIO]
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
#define CLIB_CACHE_LINE_BYTES
static_always_inline vnet_feature_config_main_t * vnet_feature_get_config_main(u16 arc)
void adj_nbr_update_rewrite(adj_index_t adj_index, adj_nbr_rewrite_flag_t flags, u8 *rewrite)
adj_nbr_update_rewrite
static clib_error_t * call_sw_interface_mtu_change_callbacks(vnet_main_t *vnm, u32 sw_if_index)
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
u32 opaque[10]
Opaque data used by sub-graphs for their own purposes.
clib_error_t * vnet_hw_interface_set_class(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index)