71 {lacp_mux_state_detached},
72 {lacp_mux_state_waiting},
73 {lacp_mux_state_attached},
74 {lacp_mux_state_collecting_distributing},
85 sif->
actor.state &= ~LACP_STATE_SYNCHRONIZATION;
93 sif->
actor.state |= LACP_STATE_SYNCHRONIZATION;
103 sif->
actor.state &= ~LACP_STATE_COLLECTING;
105 sif->
actor.state &= ~LACP_STATE_DISTRIBUTING;
109 if (sif->
selected == LACP_PORT_SELECTED)
111 LACP_MUX_EVENT_SELECTED, &sif->
mux_state);
113 if (sif->
selected == LACP_PORT_STANDBY)
127 sif->
actor.state &= ~LACP_STATE_COLLECTING;
129 sif->
actor.state &= ~LACP_STATE_DISTRIBUTING;
133 if ((sif->
selected == LACP_PORT_UNSELECTED) ||
134 (sif->
selected == LACP_PORT_STANDBY))
136 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
138 if ((sif->
selected == LACP_PORT_SELECTED) &&
139 (sif->
partner.state & LACP_STATE_SYNCHRONIZATION))
158 if (sif->
selected == LACP_PORT_UNSELECTED)
160 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
171 sif->
actor.state |= LACP_STATE_SYNCHRONIZATION | LACP_STATE_COLLECTING |
172 LACP_STATE_DISTRIBUTING;
176 if ((sif->
selected == LACP_PORT_UNSELECTED) ||
177 (sif->
selected == LACP_PORT_STANDBY) ||
178 !(sif->
partner.state & LACP_STATE_SYNCHRONIZATION))
180 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
190 #define _(b, s, n) {.bit = b, .str = #s, }, 195 int e = va_arg (*args,
int);
198 if (e >= (
sizeof (lacp_mux_event_array) /
sizeof (*event_entry)))
199 s =
format (s,
"Bad event %d", e);
201 s =
format (s,
"%s", event_entry[e].str);
void lacp_init_mux_machine(vlib_main_t *vm, slave_if_t *sif)
vlib_main_t vlib_global_main
#define LACP_AGGREGATE_WAIT_TIME
static void lacp_start_wait_while_timer(vlib_main_t *vm, slave_if_t *sif, u8 expiration)
#define LACP_ACTION_COLLECTING_DISTRIBUTING
vnet_main_t * vnet_get_main(void)
static void lacp_detach_mux_from_aggregator(vlib_main_t *vm, slave_if_t *sif)
format_function_t format_vnet_sw_if_index_name
static u8 lacp_timer_is_running(f64 timer)
int lacp_mux_action_collecting_distributing(void *p1, void *p2)
int lacp_mux_action_waiting(void *p1, void *p2)
#define LACP_ACTION_DETACHED
#define LACP_ACTION_ATTACHED
vlib_worker_thread_t * vlib_worker_threads
void bond_disable_collecting_distributing(vlib_main_t *vm, slave_if_t *sif)
static u8 * format_mux_sm_state(u8 *s, va_list *args)
#define ELOG_TYPE_DECLARE(f)
#define LACP_ACTION_WAITING
static void lacp_attach_mux_to_aggregator(vlib_main_t *vm, slave_if_t *sif)
#define ELOG_TRACK_DATA(em, f, track)
u32 elog_string(elog_main_t *em, char *fmt,...)
add a string to the event-log string table
int lacp_mux_action_attached(void *p1, void *p2)
static_always_inline uword os_get_thread_index(void)
static void lacp_start_periodic_timer(vlib_main_t *vm, slave_if_t *sif, u8 expiration)
void lacp_mux_debug_func(slave_if_t *sif, int event, int state, lacp_fsm_state_t *transition)
void bond_enable_collecting_distributing(vlib_main_t *vm, slave_if_t *sif)
vl_api_dhcp_client_state_t state
static lacp_fsm_machine_t lacp_mux_fsm_table[]
int lacp_mux_action_detached(void *p1, void *p2)
int lacp_machine_dispatch(lacp_machine_t *machine, vlib_main_t *vm, slave_if_t *sif, int event, int *state)
static u8 * format_mux_event(u8 *s, va_list *args)