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;
104 sif->
actor.state &= ~LACP_STATE_COLLECTING;
106 sif->
actor.state &= ~LACP_STATE_DISTRIBUTING;
110 if (sif->
selected == LACP_PORT_SELECTED)
112 LACP_MUX_EVENT_SELECTED, &sif->
mux_state);
114 if (sif->
selected == LACP_PORT_STANDBY)
129 sif->
actor.state &= ~LACP_STATE_COLLECTING;
131 sif->
actor.state &= ~LACP_STATE_DISTRIBUTING;
135 if ((sif->
selected == LACP_PORT_UNSELECTED) ||
136 (sif->
selected == LACP_PORT_STANDBY))
138 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
140 if ((sif->
selected == LACP_PORT_SELECTED) &&
141 (sif->
partner.state & LACP_STATE_SYNCHRONIZATION))
162 if (sif->
selected == LACP_PORT_UNSELECTED)
164 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
176 sif->
actor.state |= LACP_STATE_SYNCHRONIZATION | LACP_STATE_COLLECTING |
177 LACP_STATE_DISTRIBUTING;
181 if ((sif->
selected == LACP_PORT_UNSELECTED) ||
182 (sif->
selected == LACP_PORT_STANDBY) ||
183 !(sif->
partner.state & LACP_STATE_SYNCHRONIZATION))
185 LACP_MUX_EVENT_UNSELECTED, &sif->
mux_state);
195 #define _(b, s, n) {.bit = b, .str = #s, }, 200 int e = va_arg (*args,
int);
203 if (e >= (
sizeof (lacp_mux_event_array) /
sizeof (*event_entry)))
204 s =
format (s,
"Bad event %d", e);
206 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)
void bond_enable_collecting_distributing(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)
vhost_vring_state_t state
int lacp_mux_action_waiting(void *p1, void *p2)
#define LACP_ACTION_DETACHED
#define LACP_ACTION_ATTACHED
vlib_worker_thread_t * vlib_worker_threads
static u8 * format_mux_sm_state(u8 *s, va_list *args)
void bond_disable_collecting_distributing(vlib_main_t *vm, slave_if_t *sif)
#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)
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)