16 #ifndef ___LACP_PTX_MACHINE_H__ 17 #define ___LACP_PTX_MACHINE_H__ 22 #define foreach_lacp_ptx_event \ 23 _(0, NO_PERIODIC, "no periodic") \ 24 _(1, LONG_TIMEOUT, "long tiemout") \ 25 _(2, TIMER_EXPIRED, "timer expired") \ 26 _(3, SHORT_TIMEOUT, "short timeout") 30 #define _(a, b, c) LACP_PTX_EVENT_##b = (a), 35 #define foreach_lacp_ptx_sm_state \ 36 _(0, NO_PERIODIC, "no periodic") \ 37 _(1, FAST_PERIODIC, "fast periodic") \ 38 _(2, SLOW_PERIODIC, "slow periodic") \ 39 _(3, PERIODIC_TX, "periodic transmission") 43 #define _(a, b, c) LACP_PTX_STATE_##b = (a), 57 #define LACP_ACTION_NO_PERIODIC \ 58 LACP_ACTION_ROUTINE(lacp_ptx_action_no_periodic) 59 #define LACP_ACTION_SLOW_PERIODIC \ 60 LACP_ACTION_ROUTINE(lacp_ptx_action_slow_periodic) 61 #define LACP_ACTION_FAST_PERIODIC \ 62 LACP_ACTION_ROUTINE(lacp_ptx_action_fast_periodic) 63 #define LACP_ACTION_TIMER_EXPIRED \ 64 LACP_ACTION_ROUTINE(lacp_ptx_action_timer_expired) 77 if ((sif->
partner.state & LACP_STATE_LACP_TIMEOUT) ||
78 (((sif->
actor.state & (LACP_STATE_SYNCHRONIZATION |
79 LACP_STATE_COLLECTING |
80 LACP_STATE_DISTRIBUTING)) !=
81 (LACP_STATE_SYNCHRONIZATION | LACP_STATE_COLLECTING |
82 LACP_STATE_DISTRIBUTING))
83 && (sif->
partner.state & LACP_STATE_AGGREGATION)))
93 ((sif->
partner.state & LACP_STATE_LACP_ACTIVITY) ||
94 (sif->
actor.state & LACP_STATE_LACP_ACTIVITY)))
96 LACP_PTX_EVENT_SHORT_TIMEOUT, &sif->
ptx_state);
static f64 vlib_time_now(vlib_main_t *vm)
#define LACP_FAST_PERIODIC_TIMER
int lacp_ptx_action_timer_expired(void *p1, void *p2)
#define LACP_SLOW_PERIODIC_TIMER
lacp_machine_t lacp_ptx_machine
int lacp_ptx_action_no_periodic(void *p1, void *p2)
void lacp_ptx_debug_func(slave_if_t *sif, int event, int state, lacp_fsm_state_t *transition)
#define foreach_lacp_ptx_event
static void lacp_schedule_periodic_timer(vlib_main_t *vm, slave_if_t *sif)
#define foreach_lacp_ptx_sm_state
static void lacp_start_periodic_timer(vlib_main_t *vm, slave_if_t *sif, u8 expiration)
vl_api_dhcp_client_state_t state
int lacp_ptx_action_slow_periodic(void *p1, void *p2)
static void lacp_ptx_post_short_timeout_event(vlib_main_t *vm, slave_if_t *sif)
int lacp_ptx_action_fast_periodic(void *p1, void *p2)
int lacp_machine_dispatch(lacp_machine_t *machine, vlib_main_t *vm, slave_if_t *sif, int event, int *state)