48 s =
format (s,
"bond-slave");
66 int verbose = va_arg (*args,
int);
70 return format (s,
"%=32s%=6s%=8s%s",
71 "Name",
"Idx",
"Link",
"Hardware");
78 s =
format (s,
"%=8s",
"slave");
89 s =
format (s,
"Slave-Idx:");
92 else if (dev_class->format_device_name)
99 if (hw_class->format_device)
102 hw_class->format_device, hi->
hw_if_index, verbose);
112 if (dev_class->format_device)
142 u32 sw_if_index = va_arg (*args,
u32);
151 uword indent, n_printed;
152 int i, j, n_counters;
171 if (
vec_len(my_vnet_mains) == 0)
178 for (j = 0; j < n_counters; j++)
183 for (i = 0; i <
vec_len(my_vnet_mains); i++)
207 s =
format (s,
"\n%U%-16v%16Ld",
220 for (j = 0; j < n_counters; j++)
224 for (i = 0; i <
vec_len(my_vnet_mains); i++)
241 s =
format (s,
"%-16s%16Ld", cm->
name, vtotal);
255 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
256 "Name",
"Idx",
"State",
"Counter",
"Count");
258 s =
format (s,
"%-32U%=5d%=16U",
272 u8* name = va_arg (*args,
u8*);
277 return format (s,
"%=32s%=5s%=16s%=16s%=16s",
278 "Name",
"Idx",
"State",
"Counter",
"Count");
280 s =
format (s,
"%-32v%=5d%=16U",
292 u32 * hw_if_index = va_arg (*args,
u32 *);
299 if (c->unformat_device_name
300 &&
unformat_user (input, c->unformat_device_name, hw_if_index))
311 u32 * result = va_arg (*args,
u32 *);
313 u32 hw_if_index, id, id_specified;
315 uword * p, error = 0;
318 if (
unformat (input,
"%_%v.%d%_", &if_name, &
id)
348 u32 * result = va_arg (*args,
u32 *);
357 else if (
unformat (input,
"enable"))
368 u32 * result = va_arg (*args,
u32 *);
sll srl srl sll sra u16x4 i
vnet_interface_main_t interface_main
always_inline vnet_hw_interface_class_t * vnet_get_hw_interface_class(vnet_main_t *vnm, u32 hw_class_index)
vnet_main_t ** vnet_mains
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
always_inline u64 vlib_get_simple_counter(vlib_simple_counter_main_t *cm, u32 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.
vlib_combined_counter_main_t * combined_sw_if_counters
uword * hw_interface_by_name
#define clib_bitmap_foreach(i, ai, body)
#define VNET_SW_INTERFACE_FLAG_BOND_SLAVE
always_inline vnet_device_class_t * vnet_get_device_class(vnet_main_t *vnm, u32 dev_class_index)
static void vlib_get_combined_counter(vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
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).
always_inline vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
always_inline vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define VNET_SW_INTERFACE_FLAG_ADMIN_UP
#define VNET_SW_INTERFACE_FLAG_PUNT
struct _vnet_hw_interface_class vnet_hw_interface_class_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
always_inline vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
vnet_sw_interface_type_t type
#define vec_foreach(var, vec)
Vector iterator.
vnet_device_class_t * device_classes