51 s =
format (s,
"bond-slave");
69 return format (s,
"polling");
72 return format (s,
"interrupt");
75 return format (s,
"adaptive");
77 return format (s,
"unknown");
87 int verbose = va_arg (*args,
int);
91 return format (s,
"%=32s%=6s%=8s%s",
"Name",
"Idx",
"Link",
"Hardware");
98 s =
format (s,
"%=8s",
"slave");
109 s =
format (s,
"Slave-Idx:");
111 format (s,
" %d", hw_idx));
113 else if (dev_class->format_device_name)
120 if (hw_class->format_device)
123 hw_class->format_device, hi->
hw_if_index, verbose);
130 format (s,
" address %U", hw_class->format_address,
134 if (dev_class->format_device)
167 u32 sw_if_index = va_arg (*args,
u32);
177 uword indent, n_printed;
178 int i, j, n_counters;
197 if (vec_len (my_vnet_mains) == 0)
204 for (j = 0; j < n_counters; j++)
209 for (i = 0; i <
vec_len (my_vnet_mains); i++)
233 s =
format (s,
"\n%U%-16v%16Ld",
245 for (j = 0; j < n_counters; j++)
249 for (i = 0; i <
vec_len (my_vnet_mains); i++)
266 s =
format (s,
"%-16s%16Ld", cm->
name, vtotal);
281 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
282 "Name",
"Idx",
"State",
"Counter",
"Count");
284 s =
format (s,
"%-32U%=5d%=16U",
299 u8 *name = va_arg (*args,
u8 *);
304 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
305 "Name",
"Idx",
"State",
"Counter",
"Count");
307 s =
format (s,
"%-32v%=5d%=16U",
320 u32 *hw_if_index = va_arg (*args,
u32 *);
327 if (c->unformat_device_name
328 &&
unformat_user (input, c->unformat_device_name, hw_if_index))
340 u32 *result = va_arg (*args,
u32 *);
342 u32 hw_if_index, id, id_specified;
348 if (
unformat (input,
"%_%v.%d%_", &if_name, &
id)
373 *result = sw_if_index;
383 u32 *result = va_arg (*args,
u32 *);
392 else if (
unformat (input,
"enable"))
404 u32 *result = va_arg (*args,
u32 *);
sll srl srl sll sra u16x4 i
vnet_interface_main_t interface_main
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vnet_main_t ** vnet_mains
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Combined counter to hold both packets and byte differences.
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
#define VNET_HW_INTERFACE_FLAG_LINK_UP
struct _vnet_device_class vnet_device_class_t
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
static counter_t vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Get the value of a simple counter Scrapes the entire set of per-thread counters.
vnet_hw_interface_rx_mode
static vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
vlib_combined_counter_main_t * combined_sw_if_counters
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
A collection of simple counters.
char * name
The counter collection's name.
uword * hw_interface_by_name
#define clib_bitmap_foreach(i, ai, body)
Macro to iterate across set bits in a bitmap.
counter_t packets
packet counter
#define VNET_SW_INTERFACE_FLAG_BOND_SLAVE
vlib_simple_counter_main_t * sw_if_counters
unformat_function_t unformat_hash_vec_string
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
#define vec_free(V)
Free vector's memory (no header).
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
#define VNET_SW_INTERFACE_FLAG_PUNT
static vnet_hw_interface_class_t * vnet_get_hw_interface_class(vnet_main_t *vnm, u32 hw_class_index)
Bitmaps built as vectors of machine words.
counter_t bytes
byte counter
struct _vnet_hw_interface_class vnet_hw_interface_class_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VNET_SW_INTERFACE_FLAG_ERROR
char * name
The counter collection's name.
A collection of combined counters.
vnet_sw_interface_type_t type
#define vec_foreach(var, vec)
Vector iterator.
vnet_device_class_t * device_classes
static uword vnet_sw_interface_is_api_visible(vnet_main_t *vnm, u32 sw_if_index)