66 *out_lacpifs = r_lacpifs;
84 "sw_if_index",
"bond interface",
85 "exp/def/dis/col/syn/agg/tim/act",
86 "exp/def/dis/col/syn/agg/tim/act");
88 for (i = 0; i <
vec_len (sw_if_indices); i++)
95 "%-25U %-12d %-16U %3x %3x %3x %3x %3x %3x %3x %3x " 96 "%4x %3x %3x %3x %3x %3x %3x %3x",
118 "[(%04x,%02x-%02x-%02x-%02x-%02x-%02x,%04x,%04x,%04x), " 119 "(%04x,%02x-%02x-%02x-%02x-%02x-%02x,%04x,%04x,%04x)]",
135 " RX-state: %U, TX-state: %U, " 136 "MUX-state: %U, PTX-state: %U",
157 for (i = 0; i <
vec_len (sw_if_indices); i++)
171 " last LACP PDU received: %10.2f seconds ago",
182 " last Marker PDU received: %10.2f seconds ago",
206 while (state_entry->
str)
208 if (mif->
actor.state & (1 << state_entry->
bit))
227 while (state_entry->
str)
229 if (mif->
partner.state & (1 << state_entry->
bit))
286 else if (
unformat (input,
"details"))
296 if (
vec_len (sw_if_indices) == 0)
315 .short_help =
"show lacp [<interface>] [details]",
349 else if (
unformat (line_input,
"on"))
354 else if (
unformat (line_input,
"off"))
370 if (sw_if_index != ~0)
375 (0,
"Please add the member interface first"));
389 .path =
"debug lacp",
390 .short_help =
"debug lacp <interface> <on | off>",
u64 marker_bad_pdu_received
vnet_main_t * vnet_get_main(void)
#define pool_foreach(VAR, POOL)
Iterate through pool.
static void show_lacp_details(vlib_main_t *vm, u32 *sw_if_indices)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static f64 vlib_time_now(vlib_main_t *vm)
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
static bond_if_t * bond_get_bond_if_by_dev_instance(u32 dev_instance)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
unformat_function_t unformat_vnet_sw_interface
u16 partner_system_priority
format_function_t format_vnet_sw_if_index_name
int lacp_dump_ifs(lacp_interface_details_t **out_lacpifs)
#define clib_memcpy(d, s, n)
static void show_lacp(vlib_main_t *vm, u32 *sw_if_indices)
static u8 * format_rx_sm_state(u8 *s, va_list *args)
u8 * format_ethernet_address(u8 *s, va_list *args)
static u8 lacp_timer_is_running(f64 timer)
#define VLIB_INIT_FUNCTION(x)
f64 last_lacpdu_recd_time
static clib_error_t * debug_lacp_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
u16 partner_port_priority
LACP interface details struct.
f64 last_lacpdu_sent_time
u8 bond_interface_name[64]
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
static u8 * format_mux_sm_state(u8 *s, va_list *args)
f64 last_marker_pdu_sent_time
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static member_if_t * bond_get_member_by_sw_if_index(u32 sw_if_index)
static u8 * format_ptx_sm_state(u8 *s, va_list *args)
u16 actor_system_priority
static clib_error_t * show_lacp_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static int lacp_bit_test(u8 val, u8 bit)
static u8 * format_tx_sm_state(u8 *s, va_list *args)
f64 last_marker_pdu_recd_time
lacp_state_struct lacp_state_array[]
clib_error_t * lacp_cli_init(vlib_main_t *vm)
vl_api_interface_index_t sw_if_index