summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/tx_machine.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-03-05 09:38:33 -0800
committerDamjan Marion <dmarion@me.com>2019-04-03 16:32:37 +0000
commit82c5dda455ce56ffaf8813b7fbee661e6dbb7cea (patch)
tree0a4b607e46396ac28fe7f573b6b237de4ed8c16d /src/plugins/lacp/tx_machine.c
parent5ae793ac4e5b3fa288ed5838d8d92ce15eb950bd (diff)
lacp: passive mode support [VPP-1551]
By definition, passive mode means the node does not start sending lacp pdu until it first hears from the partner or remote. - Rename ptx machine's BEGIN state to NO_PERIODIC state. - Put periodic machine in NO_PERIDOIC state when the interface is enabled for lacp. ptx machine will transition out of NO_PERIODIC state when the local node hears from the remote or when the local node is configured for active mode. - Also add send and receive statistics for debugging. Change-Id: I747953b9595ed31328b2f4f3e7a8d15d01e04d7f Signed-off-by: Steven Luong <sluong@cisco.com>
Diffstat (limited to 'src/plugins/lacp/tx_machine.c')
-rw-r--r--src/plugins/lacp/tx_machine.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/lacp/tx_machine.c b/src/plugins/lacp/tx_machine.c
index 21b767c39d2..4cc4e68a103 100644
--- a/src/plugins/lacp/tx_machine.c
+++ b/src/plugins/lacp/tx_machine.c
@@ -47,7 +47,7 @@ lacp_tx_action_transmit (void *p1, void *p2)
return 0;
// No more than 3 LACPDUs per fast interval
- if (now <= (sif->last_lacpdu_time + 0.333))
+ if (now <= (sif->last_lacpdu_sent_time + 0.333))
return 0;
if (sif->ntt)
@@ -97,9 +97,6 @@ lacp_init_tx_machine (vlib_main_t * vm, slave_if_t * sif)
{
lacp_machine_dispatch (&lacp_tx_machine, vm, sif, LACP_TX_EVENT_BEGIN,
&sif->tx_state);
- if (sif->is_passive == 0)
- lacp_machine_dispatch (&lacp_tx_machine, vm, sif, LACP_TX_EVENT_NTT,
- &sif->tx_state);
}
/*