|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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 _ (BAD_KEY, "Bad key") \
68 _ (LOOPBACK_PORT, "loopback port") \
69 _ (DISABLED, "lacp packets received on disabled interfaces")
73 #define _(sym,str) LACP_ERROR_##sym,
79 #define SECS_IN_A_DAY 86400.0
97 u8 interface_name[64];
102 u8 bond_interface_name[64];
110 u8 partner_system[6];
152 u16 port_number,
u32 group);
170 return (timer != 0.0);
178 return (
now >= timer);
185 #define _(b, s, n) {.bit = b, .str = #s, },
190 int state = va_arg (*args,
int);
193 if (
state >= (
sizeof (lacp_rx_sm_state_array) /
sizeof (*state_entry)))
205 #define _(b, s, n) {.bit = b, .str = #s, },
210 int state = va_arg (*args,
int);
213 if (
state >= (
sizeof (lacp_tx_sm_state_array) /
sizeof (*state_entry)))
225 #define _(b, s, n) {.bit = b, .str = #s, },
230 int state = va_arg (*args,
int);
233 if (
state >= (
sizeof (lacp_mux_sm_state_array) /
sizeof (*state_entry)))
245 #define _(b, s, n) {.bit = b, .str = #s, },
250 int state = va_arg (*args,
int);
253 if (
state >= (
sizeof (lacp_ptx_sm_state_array) /
sizeof (*state_entry)))
264 if (val & (1 << bit))
void lacp_periodic(vlib_main_t *vm)
static u8 lacp_timer_is_expired(vlib_main_t *vm, f64 timer)
static u8 * format_tx_sm_state(u8 *s, va_list *args)
static u8 * format_ptx_sm_state(u8 *s, va_list *args)
@ MARKER_N_PACKET_TEMPLATES
static u8 lacp_timer_is_running(f64 timer)
void lacp_init_ptx_machine(vlib_main_t *vm, member_if_t *mif)
lacp_packet_template_id_t
@ LACP_PACKET_TEMPLATE_ETHERNET
static u8 * format_rx_sm_state(u8 *s, va_list *args)
u8 * lacp_input_format_trace(u8 *s, va_list *args)
@ foreach_lacp_ptx_sm_state
void lacp_init_neighbor(member_if_t *mif, u8 *hw_address, u16 port_number, u32 group)
void lacp_init_mux_machine(vlib_main_t *vm, member_if_t *mif)
@ LACP_PROCESS_EVENT_STOP
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_dhcp_client_state_t state
@ LACP_PROCESS_EVENT_START
u16 partner_port_priority
void lacp_send_lacp_pdu(vlib_main_t *vm, member_if_t *mif)
u16 partner_system_priority
marker_packet_template_id_t
lacp_state_struct lacp_state_array[]
int lacp_selection_logic(vlib_main_t *vm, member_if_t *mif)
void lacp_create_periodic_process(void)
@ foreach_lacp_tx_sm_state
static u8 * format_mux_sm_state(u8 *s, va_list *args)
@ LACP_N_PACKET_TEMPLATES
u16 msg_id_base
API message ID base.
int lacp_dump_ifs(lacp_interface_details_t **out_bondids)
static int lacp_bit_test(u8 val, u8 bit)
description fragment has unexpected format
static void lacp_stop_timer(f64 *timer)
void lacp_init_tx_machine(vlib_main_t *vm, member_if_t *mif)
LACP interface details struct.
lacp_error_t lacp_input(vlib_main_t *vm, vlib_buffer_t *b0, u32 bi0)
void lacp_init_state_machines(vlib_main_t *vm, member_if_t *mif)
@ MARKER_PACKET_TEMPLATE_ETHERNET
u16 actor_system_priority
clib_error_t * lacp_plugin_api_hookup(vlib_main_t *vm)
@ foreach_lacp_rx_sm_state
static f64 vlib_time_now(vlib_main_t *vm)
@ foreach_lacp_mux_sm_state
#define foreach_lacp_error
u32 lacp_process_node_index
void lacp_init_rx_machine(vlib_main_t *vm, member_if_t *mif)
VLIB buffer representation.