From dd4889e21cb15df541cf3b2c2d8bb971ce460359 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 29 Mar 2018 10:35:41 -0700 Subject: lacp: faster convergence for slow-rate config option Do fast-rate if we are not yet synchronized with the partner. Stop sending LACP updates as a flash in the worker thread. Just expire the timer and let the lacp_process handle sending LACP PDU. Change-Id: I8b36fe74e752e7f45bd4a8d70512c0341cc197a1 Signed-off-by: Steven --- src/plugins/lacp/rx_machine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/lacp/rx_machine.c') diff --git a/src/plugins/lacp/rx_machine.c b/src/plugins/lacp/rx_machine.c index 374e3f84939..fd65aa3ae8e 100644 --- a/src/plugins/lacp/rx_machine.c +++ b/src/plugins/lacp/rx_machine.c @@ -174,6 +174,7 @@ lacp_update_ntt (vlib_main_t * vm, slave_if_t * sif) lacp_pdu_t *lacpdu = (lacp_pdu_t *) sif->last_rx_pkt; u8 states = LACP_STATE_LACP_ACTIVITY | LACP_STATE_LACP_TIMEOUT | LACP_STATE_SYNCHRONIZATION | LACP_STATE_AGGREGATION; + lacp_main_t *lm = &lacp_main; if ((states & lacpdu->partner.port_info.state) != (states & sif->actor.state) @@ -181,8 +182,7 @@ lacp_update_ntt (vlib_main_t * vm, slave_if_t * sif) sizeof (sif->actor) - sizeof (sif->actor.state))) { sif->ntt = 1; - lacp_machine_dispatch (&lacp_tx_machine, vm, sif, LACP_TX_EVENT_NTT, - &sif->tx_state); + lacp_start_periodic_timer (lm->vlib_main, sif, 0); } } @@ -292,7 +292,7 @@ lacp_rx_action_expired (void *p1, void *p2) timer_expired = 1; else timer_expired = 0; - lacp_start_current_while_timer (lm->vlib_main, sif, LACP_SHORT_TIMOUT_TIME); + lacp_start_current_while_timer (lm->vlib_main, sif, sif->ttl_in_seconds); sif->actor.state |= LACP_STATE_EXPIRED; if (timer_expired) lacp_machine_dispatch (&lacp_rx_machine, vm, sif, -- cgit 1.2.3-korg