49 s =
format (s,
"bond-slave");
68 int verbose = va_arg (*args,
int);
72 return format (s,
"%=32s%=6s%=8s%s",
"Name",
"Idx",
"Link",
"Hardware");
79 s =
format (s,
"%=8s",
"slave");
90 s =
format (s,
"Slave-Idx:");
92 format (s,
" %d", hw_idx));
94 else if (dev_class->format_device_name)
101 if (hw_class->format_device)
104 hw_class->format_device, hi->
hw_if_index, verbose);
111 format (s,
" address %U", hw_class->format_address,
115 if (dev_class->format_device)
148 u32 sw_if_index = va_arg (*args,
u32);
158 uword indent, n_printed;
159 int i, j, n_counters;
178 if (vec_len (my_vnet_mains) == 0)
185 for (j = 0; j < n_counters; j++)
190 for (i = 0; i <
vec_len (my_vnet_mains); i++)
214 s =
format (s,
"\n%U%-16v%16Ld",
226 for (j = 0; j < n_counters; j++)
230 for (i = 0; i <
vec_len (my_vnet_mains); i++)
247 s =
format (s,
"%-16s%16Ld", cm->
name, vtotal);
262 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
263 "Name",
"Idx",
"State",
"Counter",
"Count");
265 s =
format (s,
"%-32U%=5d%=16U",
280 u8 *name = va_arg (*args,
u8 *);
285 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
286 "Name",
"Idx",
"State",
"Counter",
"Count");
288 s =
format (s,
"%-32v%=5d%=16U",
301 u32 *hw_if_index = va_arg (*args,
u32 *);
308 if (c->unformat_device_name
309 &&
unformat_user (input, c->unformat_device_name, hw_if_index))
321 u32 *result = va_arg (*args,
u32 *);
323 u32 hw_if_index, id, id_specified;
328 if (
unformat (input,
"%_%v.%d%_", &if_name, &
id)
360 u32 *result = va_arg (*args,
u32 *);
369 else if (
unformat (input,
"enable"))
381 u32 *result = va_arg (*args,
u32 *);
u64 packets
packet counter
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 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.
#define VNET_SW_INTERFACE_FLAG_BOND_SLAVE
static void vlib_get_combined_counter(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 mini co...
vlib_simple_counter_main_t * sw_if_counters
unformat_function_t unformat_hash_vec_string
#define VNET_HW_INTERFACE_BOND_INFO_SLAVE
#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.
struct _vnet_hw_interface_class vnet_hw_interface_class_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
char * name
The counter collection's name.
A collection of combined counters.
static u64 vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 index)
Get the value of a simple counter Scrapes the entire set of mini counters.
vnet_sw_interface_type_t type
#define vec_foreach(var, vec)
Vector iterator.
vnet_device_class_t * device_classes