73 u32 hw_if_index, *hw_if_indices = 0;
81 vec_add1 (hw_if_indices, hw_if_index);
84 else if (
unformat (input,
"%u", &hw_if_index))
85 vec_add1 (hw_if_indices, hw_if_index);
87 else if (
unformat (input,
"verbose"))
112 if (
vec_len (hw_if_indices) == 0)
125 for (i = 0; i <
vec_len (hw_if_indices); i++)
152 for (i = 0; i <
vec_len (hw_if_indices); i++)
159 if (dc->clear_counters)
242 .path =
"show hardware-interfaces",
243 .short_help =
"show hardware-interfaces [brief|verbose|detail] [bond] " 244 "[<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]",
263 .path =
"clear hardware-interfaces",
264 .short_help =
"clear hardware-interfaces " 265 "[<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]]",
290 u8 show_addresses = 0;
291 u8 show_features = 0;
319 else if (
unformat (linput,
"verbose"))
331 if (show_features || show_tag || show_vtr)
333 if (sw_if_index == ~(
u32) 0)
360 tag ? (
char *) tag :
"(none)");
371 u32 push_dot1q = 0, tag1 = 0, tag2 = 0;
374 &vtr_op, &push_dot1q, &tag1, &tag2) != 0)
394 _vec_len (sorted_sis) = 0;
416 u32 fib_index4 = 0, fib_index6 = 0;
431 (vm,
"%U (%s): \n unnumbered, use %U",
449 ip4_address_t *r4 = ip_interface_address_get_address (lm4, ia);
451 vlib_cli_output (vm,
" L3 %U/%d ip4 table-id %d fib-idx %d",
452 format_ip4_address, r4, ia->address_length,
454 ip4_fib_index_from_table_id (fib4->table_id));
456 vlib_cli_output (vm,
" L3 %U/%d",
457 format_ip4_address, r4, ia->address_length);
466 ip6_address_t *r6 = ip_interface_address_get_address (lm6, ia);
468 vlib_cli_output (vm,
" L3 %U/%d ip6 table-id %d fib-idx %d",
469 format_ip6_address, r6, ia->address_length,
471 ip6_fib_index_from_table_id (fib6->table_id));
473 vlib_cli_output (vm,
" L3 %U/%d",
474 format_ip6_address, r6, ia->address_length);
494 .path =
"show interface",
495 .short_help =
"show interface [address|addr|features|feat|vtr] [<interface> [<interface> [..]]] [verbose]",
505 .short_help =
"Interface commands",
511 .path =
"set interface",
512 .short_help =
"Interface commands",
528 for (j = 0; j < n_counters; j++)
537 for (j = 0; j < n_counters; j++)
557 .path =
"clear interfaces",
558 .short_help =
"clear interfaces",
630 u32 inner_vlan, outer_vlan;
632 if (
unformat (input,
"any inner-dot1q any"))
634 template->sub.eth.flags.two_tags = 1;
635 template->sub.eth.flags.outer_vlan_id_any = 1;
636 template->sub.eth.flags.inner_vlan_id_any = 1;
640 template->sub.eth.flags.one_tag = 1;
641 template->sub.eth.flags.outer_vlan_id_any = 1;
643 else if (
unformat (input,
"%d inner-dot1q any", &outer_vlan))
645 template->sub.eth.flags.two_tags = 1;
646 template->sub.eth.flags.inner_vlan_id_any = 1;
647 template->sub.eth.outer_vlan_id = outer_vlan;
649 else if (
unformat (input,
"%d inner-dot1q %d", &outer_vlan, &inner_vlan))
651 template->sub.eth.flags.two_tags = 1;
652 template->sub.eth.outer_vlan_id = outer_vlan;
653 template->sub.eth.inner_vlan_id = inner_vlan;
655 else if (
unformat (input,
"%d", &outer_vlan))
657 template->sub.eth.flags.one_tag = 1;
658 template->sub.eth.outer_vlan_id = outer_vlan;
669 if (
unformat (input,
"exact-match"))
671 template->sub.eth.flags.exact_match = 1;
687 u32 id, id_min, id_max;
699 template.sub.eth.raw_flags = 0;
701 if (
unformat (input,
"%d default", &id_min))
704 template.sub.eth.flags.default_sub = 1;
706 else if (
unformat (input,
"%d untagged", &id_min))
709 template.sub.eth.flags.no_tags = 1;
710 template.sub.eth.flags.exact_match = 1;
712 else if (
unformat (input,
"%d dot1q", &id_min))
720 else if (
unformat (input,
"%d dot1ad", &id_min))
724 template.sub.eth.flags.dot1ad = 1;
729 else if (
unformat (input,
"%d-%d", &id_min, &id_max))
731 template.sub.eth.flags.one_tag = 1;
732 template.sub.eth.flags.exact_match = 1;
736 else if (
unformat (input,
"%d", &id_min))
739 template.sub.eth.flags.one_tag = 1;
740 template.sub.eth.outer_vlan_id = id_min;
741 template.sub.eth.flags.exact_match = 1;
757 "not allowed as %v belong to a BondEthernet interface",
762 for (
id = id_min;
id <= id_max;
id++)
773 clib_warning (
"sup sw_if_index %d, sub id %d already exists\n",
781 template.sub.id =
id;
783 template.sub.eth.outer_vlan_id =
id;
790 *kp = sup_and_sub_key;
888 .path =
"create sub-interfaces",
889 .short_help =
"create sub-interfaces <interface> " 890 "{<subId> [default|untagged]} | " 891 "{<subId>-<subId>} | " 892 "{<subId> dot1q|dot1ad <vlanId>|any [inner-dot1q <vlanId>|any] [exact-match]}",
945 .path =
"set interface state",
946 .short_help =
"set interface state <interface> [up|down|punt|enable]",
956 u32 unnumbered_sw_if_index = ~0;
957 u32 inherit_from_sw_if_index = ~0;
966 &unnumbered_sw_if_index))
972 if (~0 == unnumbered_sw_if_index)
974 if (enable && ~0 == inherit_from_sw_if_index)
976 " IP enabled interface that it uses");
979 inherit_from_sw_if_index, enable);
986 .path =
"set interface unnumbered",
987 .short_help =
"set interface unnumbered [<interface> use <interface> | del <interface>]",
1001 u32 hw_if_index, hw_class_index;
1029 .path =
"set interface hw-class",
1030 .short_help =
"Set interface hardware class",
1049 u32 new_dev_instance;
1057 if (!
unformat (input,
"%d", &new_dev_instance))
1079 .path =
"renumber interface",
1080 .short_help =
"renumber interface <interface> <new-dev-instance>",
1098 else if (
unformat (input,
"off %U",
1115 .path =
"set interface promiscuous",
1116 .short_help =
"set interface promiscuous [on|off] <interface>",
1129 if (
unformat (input,
"%d %U", &mtu,
1142 if (mtu < hi->min_supported_packet_bytes)
1144 "must be >= min pkt bytes (%d)", mtu,
1154 else if (
unformat (input,
"packet %d %U", &mtu,
1158 else if (
unformat (input,
"ip4 %d %U", &mtu,
1161 else if (
unformat (input,
"ip6 %d %U", &mtu,
1164 else if (
unformat (input,
"mpls %d %U", &mtu,
1179 .path =
"set interface mtu",
1180 .short_help =
"set interface mtu [packet|ip4|ip6|mpls] <value> <interface>",
1202 if (
vec_len (sorted_sis) == 0)
1206 _vec_len (sorted_sis) = 0;
1257 .path =
"show interface secondary-mac-address",
1258 .short_help =
"show interface secondary-mac-address [<interface>]",
1274 is_add = is_del = 0;
1299 if (is_add == is_del)
1331 .path =
"set interface secondary-mac-address",
1332 .short_help =
"set interface secondary-mac-address <interface> <mac-address> [(add|del)]",
1381 .path =
"set interface mac address",
1382 .short_help =
"set interface mac address <interface> <mac-address>",
1395 vnm, &sw_if_index, &tag))
1406 .path =
"set interface tag",
1407 .short_help =
"set interface tag <interface> <tag>",
1430 .path =
"clear interface tag",
1431 .short_help =
"clear interface tag <interface>",
1445 else if (
unformat (input,
"enable"))
1447 else if (
unformat (input,
"disable"))
1453 if (~0 == sw_if_index)
1470 .path =
"set interface ip directed-broadcast",
1471 .short_help =
"set interface enable <interface> <enable|disable>",
1478 u8 queue_id_valid,
u32 queue_id,
1483 u32 *queue_indices = 0;
1492 if (queue_index == ~0)
1494 queue_id, hw->
name);
1495 vec_add1 (queue_indices, queue_index);
1500 for (
int i = 0;
i <
vec_len (queue_indices);
i++)
1521 u32 hw_if_index = (
u32) ~ 0;
1522 u32 queue_id = (
u32) ~ 0;
1524 u8 queue_id_valid = 0;
1534 else if (
unformat (line_input,
"queue %d", &queue_id))
1536 else if (
unformat (line_input,
"polling"))
1538 else if (
unformat (line_input,
"interrupt"))
1540 else if (
unformat (line_input,
"adaptive"))
1553 if (hw_if_index == (
u32) ~ 0)
1600 .path =
"set interface rx-mode",
1601 .short_help =
"set interface rx-mode <interface> [queue <n>] [polling | interrupt | adaptive]",
1626 if (current_node != prev_node)
1631 if (qptr == all_queues +
vec_len (all_queues) - 1 ||
1638 prev_node = current_node;
1672 .path =
"show interface rx-placement",
1673 .short_help =
"show interface rx-placement",
1693 "please specify valid worker thread or main");
1699 if (queue_index == ~0)
1714 u32 hw_if_index = (
u32) ~ 0;
1727 else if (
unformat (line_input,
"queue %d", &queue_id))
1729 else if (
unformat (line_input,
"main", &thread_index))
1731 else if (
unformat (line_input,
"worker %d", &thread_index))
1744 if (hw_if_index == (
u32) ~ 0)
1803 .path =
"set interface rx-placement",
1804 .short_help =
"set interface rx-placement <interface> [queue <n>] " 1805 "[worker <n> | main]",
1829 u32 hw_if_index = (
u32) ~ 0;
1854 if (hw_if_index == (
u32) ~ 0)
1888 .path =
"set interface rss queues",
1889 .short_help =
"set interface rss queues <interface> <list <queue-list>>",
1898 int type = va_arg (*args,
int);
1924 s =
format (s,
"unknown type %d!", type);
1943 (vm,
"pcap %U dispatch capture enabled: %d of %d pkts...",
1959 return VNET_API_ERROR_INVALID_VALUE;
1965 return VNET_API_ERROR_VALUE_EXIST;
1971 return VNET_API_ERROR_INVALID_VALUE_2;
1975 (!cm->classify_table_index_by_sw_if_index ||
1976 cm->classify_table_index_by_sw_if_index[0] == ~0))
1977 return VNET_API_ERROR_NO_SUCH_LABEL;
1981 void *save_pcap_data;
1985 return VNET_API_ERROR_INVALID_MEMORY_SIZE;
1996 memset (pm, 0,
sizeof (*pm));
2010 stem =
format (stem,
"rx");
2012 stem =
format (stem,
"tx");
2014 stem =
format (stem,
"drop");
2034 cm->classify_table_index_by_sw_if_index[0];
2063 return VNET_API_ERROR_SYSCALL_ERROR_1;
2071 return VNET_API_ERROR_NO_SUCH_ENTRY;
2086 u32 max_bytes_per_pkt = 512;
2090 int preallocate_data = 0;
2091 int drop_enable = 0;
2106 else if (
unformat (line_input,
"tx"))
2108 else if (
unformat (line_input,
"drop"))
2110 else if (
unformat (line_input,
"off"))
2111 rx_enable = tx_enable = drop_enable = 0;
2112 else if (
unformat (line_input,
"max-bytes-per-pkt %u",
2113 &max_bytes_per_pkt))
2115 else if (
unformat (line_input,
"max %d", &max))
2117 else if (
unformat (line_input,
"packets-to-capture %d", &max))
2122 else if (
unformat (line_input,
"status %=", &status, 1))
2124 else if (
unformat (line_input,
"intfc %U",
2127 else if (
unformat (line_input,
"interface %U",
2133 else if (
unformat (line_input,
"preallocate-data %=",
2134 &preallocate_data, 1))
2136 else if (
unformat (line_input,
"free-data %=", &free_data, 1))
2138 else if (
unformat (line_input,
"intfc any")
2139 ||
unformat (line_input,
"interface any"))
2141 else if (
unformat (line_input,
"filter"))
2173 case VNET_API_ERROR_INVALID_VALUE:
2176 case VNET_API_ERROR_VALUE_EXIST:
2179 case VNET_API_ERROR_INVALID_VALUE_2:
2181 (0,
"can't change number of records to capture while tracing...");
2183 case VNET_API_ERROR_SYSCALL_ERROR_1:
2186 case VNET_API_ERROR_NO_SUCH_ENTRY:
2189 case VNET_API_ERROR_INVALID_MEMORY_SIZE:
2191 "Max bytes per pkt must be > 32, < 9000...");
2193 case VNET_API_ERROR_NO_SUCH_LABEL:
2195 (0,
"No classify filter configured, see 'classify filter...'");
2285 .path =
"pcap trace",
2287 "pcap trace [rx] [tx] [drop] [off] [max <nn>] [intfc <interface>|any]\n" 2288 " [file <name>] [status] [max-bytes-per-pkt <nnnn>][filter]\n" 2289 " [preallocate-data][free-data]",
unformat_function_t unformat_vnet_hw_interface
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static clib_error_t * clear_interface_counters(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_hw_if_rx_mode
format_function_t format_vnet_sw_interface
static clib_error_t * create_sub_interfaces(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define hash_set(h, key, value)
char * file_name
File name of pcap output.
static clib_error_t * promiscuous_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * set_hw_class(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
clib_error_t * set_hw_interface_rx_placement(u32 hw_if_index, u32 queue_id, u32 thread_index, u8 is_main)
clib_error_t * set_interface_rss_queues(vlib_main_t *vm, u32 hw_if_index, clib_bitmap_t *bitmap)
static int sw_interface_name_compare(void *a1, void *a2)
__clib_export clib_error_t * pcap_write(pcap_main_t *pm)
Write PCAP file.
static clib_error_t * set_state(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
word vnet_sw_interface_compare(vnet_main_t *vnm, uword sw_if_index0, uword sw_if_index1)
format_function_t format_vlib_node_name
vl_api_wireguard_peer_flags_t flags
uword first_worker_thread_index
clib_error_t * vnet_sw_interface_set_flags(vnet_main_t *vnm, u32 sw_if_index, vnet_sw_interface_flags_t flags)
u32 n_packets_to_capture
Number of packets to capture.
static ip6_fib_t * ip6_fib_get(fib_node_index_t index)
static clib_error_t * set_interface_mac_address(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 * format_l2_output_features(u8 *s, va_list *args)
unformat_function_t unformat_hash_string
#define pool_foreach(VAR, POOL)
Iterate through pool.
vnet_interface_main_t interface_main
clib_error_t * vnet_hw_interface_set_rss_queues(vnet_main_t *vnm, vnet_hw_interface_t *hi, clib_bitmap_t *bitmap)
vnet_feature_config_main_t * cm
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define clib_bitmap_foreach(i, ai)
Macro to iterate across set bits in a bitmap.
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
clib_error_t * vnet_hw_interface_change_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static void vnet_clear_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
static clib_error_t * set_tag(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * renumber_interface_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define hash_set_mem(h, key, value)
ip_lookup_main_t lookup_main
clib_error_t * set_hw_interface_change_rx_mode(vnet_main_t *vnm, u32 hw_if_index, u8 queue_id_valid, u32 queue_id, vnet_hw_if_rx_mode mode)
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
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
unformat_function_t unformat_vnet_sw_interface
#define vec_validate_aligned(V, I, A)
Make sure vector is long enough for given index (no header, specified alignment)
static clib_error_t * clear_hw_interfaces(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
struct _vnet_device_class vnet_device_class_t
static u8 * format_vnet_pcap(u8 *s, va_list *args)
format_function_t format_vnet_sw_if_index_name
static clib_error_t * interface_add_del_mac_address(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
uword last_worker_thread_index
ethernet_main_t ethernet_main
if(node->flags &VLIB_NODE_FLAG_TRACE) vnet_interface_output_trace(vm
format_function_t format_vnet_hw_interface
PCAP main state data structure.
clib_spinlock_t lock
spinlock to protect e.g.
void vlib_clear_combined_counters(vlib_combined_counter_main_t *cm)
Clear a collection of combined counters.
#define VLIB_INIT_FUNCTION(x)
#define vec_new(T, N)
Create new vector of given type and length (unspecified alignment, no header).
vlib_combined_counter_main_t * combined_sw_if_counters
static clib_error_t * parse_vlan_sub_interfaces(unformat_input_t *input, vnet_sw_interface_t *template)
Parse subinterface names.
description fragment has unexpected format
#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)
u32 filter_classify_table_index
#define clib_error_return(e, args...)
vnet_main_t * vnet_get_main(void)
static clib_error_t * set_unnumbered(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
A collection of simple counters.
clib_error_t * vnet_hw_interface_add_del_mac_address(vnet_main_t *vnm, u32 hw_if_index, const u8 *mac_address, u8 is_add)
vlib_error_t pcap_error_index
ethernet_interface_address_t * secondary_addrs
u8 * vnet_trace_placeholder
static clib_error_t * mtu_cmd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static void clib_spinlock_init(clib_spinlock_t *p)
u32 max_supported_packet_bytes
vl_api_fib_path_type_t type
vnet_hw_interface_t * hw_interfaces
__clib_export clib_error_t * pcap_close(pcap_main_t *pm)
Close PCAP file.
vlib_worker_thread_t * vlib_worker_threads
l2_output_config_t * l2output_intf_config(u32 sw_if_index)
Get a pointer to the config for the given interface.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vl_api_interface_index_t sw_if_index
void vnet_sw_interface_update_unnumbered(u32 unnumbered_sw_if_index, u32 ip_sw_if_index, u8 enable)
u8 * pcap_data
Vector of pcap data.
int vnet_pcap_dispatch_trace_configure(vnet_pcap_dispatch_trace_args_t *a)
uword * sw_if_index_by_sup_and_sub
void vnet_hw_interface_set_mtu(vnet_main_t *vnm, u32 hw_if_index, u32 mtu)
vnet_sw_interface_flags_t flags
clib_error_t * vnet_create_sw_interface(vnet_main_t *vnm, vnet_sw_interface_t *template, u32 *sw_if_index)
static clib_error_t * show_sw_interfaces(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
clib_error_t * vnet_hw_interface_set_class(vnet_main_t *vnm, u32 hw_if_index, u32 hw_class_index)
vlib_simple_counter_main_t * sw_if_counters
static clib_error_t * set_interface_rx_placement(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void vnet_hw_if_update_runtime_data(vnet_main_t *vnm, u32 hw_if_index)
static int compare_interface_names(void *a1, void *a2)
uword * hw_interface_class_by_name
vl_api_tunnel_mode_t mode
vnet_hw_if_rx_queue_t * hw_if_rx_queues
void vnet_sw_interface_ip_directed_broadcast(vnet_main_t *vnm, u32 sw_if_index, u8 enable)
int vnet_hw_if_set_rx_queue_mode(vnet_main_t *vnm, u32 queue_index, vnet_hw_if_rx_mode mode)
word vnet_hw_interface_compare(vnet_main_t *vnm, uword hw_if_index0, uword hw_if_index1)
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
static clib_error_t * set_interface_rss_queues_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * clear_tag(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vnet_interface_features_show(vlib_main_t *vm, u32 sw_if_index, int verbose)
Display the set of driver features configured on a specific interface Called by "show interface" hand...
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
static ip4_fib_t * ip4_fib_get(u32 index)
Get the FIB at the given index.
#define clib_warning(format, args...)
vnet_interface_main_t * im
__clib_export uword unformat_bitmap_list(unformat_input_t *input, va_list *va)
unformat a list of bit ranges into a bitmap (eg "0-3,5-7,11" )
static uword vnet_swif_is_api_visible(vnet_sw_interface_t *si)
#define ETHERNET_INTERFACE_FLAG_ACCEPT_ALL
static clib_error_t * pcap_trace_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 unnumbered_sw_if_index
#define VLIB_CLI_COMMAND(x,...)
struct _vnet_classify_main vnet_classify_main_t
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
#define PCAP_MAIN_INIT_DONE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
ip_lookup_main_t lookup_main
static void vnet_set_sw_interface_tag(vnet_main_t *vnm, u8 *tag, u32 sw_if_index)
Bitmaps built as vectors of machine words.
#define clib_error_report(e)
#define clib_bitmap_free(v)
Free a bitmap.
vnet_classify_main_t vnet_classify_main
static u8 * vnet_get_sw_interface_tag(vnet_main_t *vnm, u32 sw_if_index)
static clib_error_t * show_hw_interfaces(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vnet_sw_interface_set_protocol_mtu(vnet_main_t *vnm, u32 sw_if_index, u32 mtu[])
static void * clib_mem_alloc(uword size)
uword unformat_ethernet_interface(unformat_input_t *input, va_list *args)
static vlib_main_t * vlib_get_main(void)
#define vec_elt(v, i)
Get vector value at index i.
static clib_error_t * show_or_clear_hw_interfaces(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd, int is_show)
u32 vnet_hw_if_get_rx_queue_index_by_id(vnet_main_t *vnm, u32 hw_if_index, u32 queue_id)
static clib_error_t * show_interface_sec_mac_addr_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
pcap_packet_type_t packet_type
Packet type.
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
static void show_bond(vlib_main_t *vm)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
unformat_function_t unformat_vnet_sw_interface_flags
#define foreach_ip_interface_address(lm, a, sw_if_index, loop, body)
static clib_error_t * vnet_interface_cli_init(vlib_main_t *vm)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
vnet_sw_interface_t * sw_interfaces
static clib_error_t * set_ip_directed_broadcast(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
A collection of combined counters.
void vnet_hw_if_set_rx_queue_thread_index(vnet_main_t *vnm, u32 queue_index, u32 thread_index)
#define hash_get_mem(h, key)
u32 l2vtr_get(vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 *vtr_op, u32 *push_dot1q, u32 *vtr_tag1, u32 *vtr_tag2)
Get vtag tag rewrite on the given interface.
u32 min_supported_packet_bytes
void vlib_clear_simple_counters(vlib_simple_counter_main_t *cm)
Clear a collection of simple counters.
ip4_main_t ip4_main
Global ip4 main structure.
int vnet_interface_name_renumber(u32 sw_if_index, u32 new_show_dev_instance)
u8 * format_mac_address_t(u8 *s, va_list *args)
#define vec_foreach(var, vec)
Vector iterator.
vnet_device_class_t * device_classes
static clib_error_t * set_interface_rx_mode(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
unformat_function_t unformat_vlib_error
#define CLIB_CACHE_LINE_BYTES
static_always_inline int vnet_hw_if_rxq_cmp_cli_api(vnet_hw_if_rx_queue_t **a, vnet_hw_if_rx_queue_t **b)
u32 * fib_index_by_sw_if_index
u32 n_packets_captured
Number of packets currently captured.
static clib_error_t * show_interface_rx_placement_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vtr
vnet_device_main_t vnet_device_main
u32 ethernet_set_flags(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
static uword pool_elts(void *v)
Number of active elements in a pool.