15 #ifndef __included_lacp_node_h__ 16 #define __included_lacp_node_h__ 46 #define LACP_DBG(n, args...) \ 48 lacp_main_t *_lm = &lacp_main; \ 49 if (_lm->debug || n->debug) \ 50 clib_warning (args); \ 53 #define LACP_DBG2(n, e, s, m, t) \ 55 lacp_main_t *_lm = &lacp_main; \ 56 if ((m)->debug && (_lm->debug || (n)->debug)) \ 57 (*m->debug)(n, e, s, t); \ 61 #define foreach_lacp_error \ 62 _ (NONE, "good lacp packets -- consumed") \ 63 _ (CACHE_HIT, "good lacp packets -- cache hit") \ 64 _ (UNSUPPORTED, "unsupported slow protocol packets") \ 65 _ (TOO_SMALL, "bad lacp packets -- packet too small") \ 66 _ (BAD_TLV, "bad lacp packets -- bad TLV length") \ 67 _ (DISABLED, "lacp packets received on disabled interfaces") 71 #define _(sym,str) LACP_ERROR_##sym, 93 u8 interface_name[64];
98 u8 bond_interface_name[64];
106 u8 partner_system[6];
147 u16 port_number,
u32 group);
165 return (timer != 0.0);
173 return (now >= timer);
180 #define _(b, s, n) {.bit = b, .str = #s, }, 185 int state = va_arg (*args,
int);
189 if (state >= (
sizeof (lacp_rx_sm_state_array) /
sizeof (*state_entry)))
190 s =
format (s,
"Bad state %d", state);
192 s =
format (s,
"%s", state_entry[state].str);
201 #define _(b, s, n) {.bit = b, .str = #s, }, 206 int state = va_arg (*args,
int);
210 if (state >= (
sizeof (lacp_tx_sm_state_array) /
sizeof (*state_entry)))
211 s =
format (s,
"Bad state %d", state);
213 s =
format (s,
"%s", state_entry[state].str);
222 #define _(b, s, n) {.bit = b, .str = #s, }, 227 int state = va_arg (*args,
int);
231 if (state >= (
sizeof (lacp_mux_sm_state_array) /
sizeof (*state_entry)))
232 s =
format (s,
"Bad state %d", state);
234 s =
format (s,
"%s", state_entry[state].str);
243 #define _(b, s, n) {.bit = b, .str = #s, }, 248 int state = va_arg (*args,
int);
252 if (state >= (
sizeof (lacp_ptx_sm_state_array) /
sizeof (*state_entry)))
253 s =
format (s,
"Bad state %d", state);
255 s =
format (s,
"%s", state_entry[state].str);
263 if (val & (1 << bit))
void lacp_periodic(vlib_main_t *vm)
void lacp_init_ptx_machine(vlib_main_t *vm, slave_if_t *sif)
static f64 vlib_time_now(vlib_main_t *vm)
int lacp_dump_ifs(lacp_interface_details_t **out_bondids)
u16 partner_system_priority
void lacp_init_neighbor(slave_if_t *sif, u8 *hw_address, u16 port_number, u32 group)
void lacp_init_mux_machine(vlib_main_t *vm, slave_if_t *sif)
static u8 * format_rx_sm_state(u8 *s, va_list *args)
static u8 lacp_timer_is_running(f64 timer)
static u8 lacp_timer_is_expired(vlib_main_t *vm, f64 timer)
lacp_error_t lacp_input(vlib_main_t *vm, vlib_buffer_t *b0, u32 bi0)
enum @426 lacp_process_event_t
u16 partner_port_priority
LACP interface details struct.
static void lacp_stop_timer(f64 *timer)
lacp_packet_template_id_t
static u8 * format_mux_sm_state(u8 *s, va_list *args)
void lacp_init_rx_machine(vlib_main_t *vm, slave_if_t *sif)
void lacp_send_lacp_pdu(vlib_main_t *vm, slave_if_t *sif)
#define foreach_lacp_error
vhost_vring_state_t state
static u8 * format_ptx_sm_state(u8 *s, va_list *args)
void lacp_init_tx_machine(vlib_main_t *vm, slave_if_t *sif)
void lacp_selection_logic(vlib_main_t *vm, slave_if_t *sif)
u8 * lacp_input_format_trace(u8 *s, va_list *args)
u32 lacp_process_node_index
u16 actor_system_priority
void lacp_init_state_machines(vlib_main_t *vm, slave_if_t *sif)
static int lacp_bit_test(u8 val, u8 bit)
clib_error_t * lacp_plugin_api_hookup(vlib_main_t *vm)
static u8 * format_tx_sm_state(u8 *s, va_list *args)
u16 msg_id_base
API message ID base.
marker_packet_template_id_t