63 {lacp_ptx_state_no_periodic},
64 {lacp_ptx_state_fast_periodic},
65 {lacp_ptx_state_slow_periodic},
66 {lacp_ptx_state_periodic_tx},
93 if (!(sif->
partner.state & LACP_STATE_LACP_ACTIVITY) &&
94 !(sif->
actor.state & LACP_STATE_LACP_ACTIVITY))
96 LACP_PTX_EVENT_NO_PERIODIC, &sif->
ptx_state);
107 if (timer_expired || (sif->
partner.state & LACP_STATE_LACP_TIMEOUT))
109 LACP_PTX_EVENT_TIMER_EXPIRED, &sif->
ptx_state);
123 if (!(sif->
partner.state & LACP_STATE_LACP_ACTIVITY) &&
124 !(sif->
actor.state & LACP_STATE_LACP_ACTIVITY))
126 LACP_PTX_EVENT_NO_PERIODIC, &sif->
ptx_state);
140 LACP_PTX_EVENT_TIMER_EXPIRED, &sif->
ptx_state);
142 if (!(sif->
partner.state & LACP_STATE_LACP_TIMEOUT))
144 LACP_PTX_EVENT_LONG_TIMEOUT, &sif->
ptx_state);
156 if (!(sif->
partner.state & LACP_STATE_LACP_ACTIVITY) &&
157 !(sif->
actor.state & LACP_STATE_LACP_ACTIVITY))
159 LACP_PTX_EVENT_NO_PERIODIC, &sif->
ptx_state);
165 if (sif->
partner.state & LACP_STATE_LACP_TIMEOUT)
167 LACP_PTX_EVENT_SHORT_TIMEOUT, &sif->
ptx_state);
170 LACP_PTX_EVENT_LONG_TIMEOUT, &sif->
ptx_state);
180 #define _(b, s, n) {.bit = b, .str = #s, }, 185 int e = va_arg (*args,
int);
189 if (e >= (
sizeof (lacp_ptx_event_array) /
sizeof (*event_entry)))
190 s =
format (s,
"Bad event %d", e);
192 s =
format (s,
"%s", event_entry[e].str);
201 clib_warning (
"%U-PTX: event %U, old state %U, new state %U",
212 LACP_PTX_EVENT_NO_PERIODIC, &sif->
ptx_state);
static u8 * format_ptx_event(u8 *s, va_list *args)
vnet_main_t * vnet_get_main(void)
int lacp_ptx_action_no_periodic(void *p1, void *p2)
int lacp_ptx_action_fast_periodic(void *p1, void *p2)
#define LACP_FAST_PERIODIC_TIMER
format_function_t format_vnet_sw_if_index_name
static u8 lacp_timer_is_running(f64 timer)
#define LACP_ACTION_SLOW_PERIODIC
static u8 lacp_timer_is_expired(vlib_main_t *vm, f64 timer)
vhost_vring_state_t state
void lacp_init_ptx_machine(vlib_main_t *vm, slave_if_t *sif)
#define LACP_ACTION_TIMER_EXPIRED
static void lacp_stop_timer(f64 *timer)
static lacp_fsm_machine_t lacp_ptx_fsm_table[]
#define clib_warning(format, args...)
int lacp_ptx_action_slow_periodic(void *p1, void *p2)
static u8 * format_ptx_sm_state(u8 *s, va_list *args)
void lacp_ptx_debug_func(slave_if_t *sif, int event, int state, lacp_fsm_state_t *transition)
static void lacp_schedule_periodic_timer(vlib_main_t *vm, slave_if_t *sif)
int lacp_ptx_action_timer_expired(void *p1, void *p2)
static void lacp_start_periodic_timer(vlib_main_t *vm, slave_if_t *sif, u8 expiration)
#define LACP_ACTION_NO_PERIODIC
static void lacp_ptx_post_short_timeout_event(vlib_main_t *vm, slave_if_t *sif)
lacp_machine_t lacp_tx_machine
#define LACP_ACTION_FAST_PERIODIC
int lacp_machine_dispatch(lacp_machine_t *machine, vlib_main_t *vm, slave_if_t *sif, int event, int *state)