summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/lacp.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/lacp.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/lacp.c')
-rw-r--r--src/plugins/lacp/lacp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/lacp/lacp.c b/src/plugins/lacp/lacp.c
index 473458af4e4..0ecb1df7329 100644
--- a/src/plugins/lacp/lacp.c
+++ b/src/plugins/lacp/lacp.c
@@ -89,7 +89,8 @@ lacp_send_ethernet_lacp_pdu (slave_if_t * sif)
vlib_put_frame_to_node (vm, hw->output_node_index, f);
- sif->last_lacpdu_time = vlib_time_now (lm->vlib_main);
+ sif->last_lacpdu_sent_time = vlib_time_now (lm->vlib_main);
+ sif->pdu_sent++;
}
/*
@@ -307,7 +308,10 @@ lacp_init_neighbor (slave_if_t * sif, u8 * hw_address, u16 port_number,
lacp_stop_timer (&sif->actor_churn_timer);
lacp_stop_timer (&sif->partner_churn_timer);
lacp_stop_timer (&sif->periodic_timer);
- lacp_stop_timer (&sif->last_lacpdu_time);
+ lacp_stop_timer (&sif->last_lacpdu_sent_time);
+ lacp_stop_timer (&sif->last_lacpdu_recd_time);
+ lacp_stop_timer (&sif->last_marker_pdu_sent_time);
+ lacp_stop_timer (&sif->last_marker_pdu_recd_time);
sif->lacp_enabled = 1;
sif->loopback_port = 0;
sif->ready = 0;
@@ -331,7 +335,7 @@ lacp_init_neighbor (slave_if_t * sif, u8 * hw_address, u16 port_number,
sif->partner.port_number = htons (port_number);
sif->partner.port_priority = htons (LACP_DEFAULT_PORT_PRIORITY);
sif->partner.key = htons (group);
- sif->partner.state = LACP_STATE_LACP_ACTIVITY;
+ sif->partner.state = 0;
sif->actor_admin = sif->actor;
sif->partner_admin = sif->partner;