summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/cli.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/cli.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/cli.c')
-rw-r--r--src/plugins/lacp/cli.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/plugins/lacp/cli.c b/src/plugins/lacp/cli.c
index d210139c4b4..d188db6165e 100644
--- a/src/plugins/lacp/cli.c
+++ b/src/plugins/lacp/cli.c
@@ -159,6 +159,29 @@ show_lacp_details (vlib_main_t * vm, u32 * sw_if_indices)
continue;
vlib_cli_output (vm, " %U", format_vnet_sw_if_index_name,
vnet_get_main (), sif->sw_if_index);
+ vlib_cli_output (vm, " Good LACP PDUs received: %llu",
+ sif->pdu_received);
+ vlib_cli_output (vm, " Bad LACP PDUs received: %llu",
+ sif->bad_pdu_received);
+ vlib_cli_output (vm, " LACP PDUs sent: %llu", sif->pdu_sent);
+ if (lacp_timer_is_running (sif->last_lacpdu_recd_time))
+ vlib_cli_output (vm,
+ " last LACP PDU received: %10.2f seconds ago",
+ now - sif->last_lacpdu_recd_time);
+ if (lacp_timer_is_running (sif->last_lacpdu_sent_time))
+ vlib_cli_output (vm, " last LACP PDU sent: %10.2f seconds ago",
+ now - sif->last_lacpdu_sent_time);
+ vlib_cli_output (vm, " Good Marker PDUs received: %llu",
+ sif->marker_pdu_received);
+ vlib_cli_output (vm, " Bad Marker PDUs received: %llu",
+ sif->marker_bad_pdu_received);
+ if (lacp_timer_is_running (sif->last_marker_pdu_recd_time))
+ vlib_cli_output (vm,
+ " last Marker PDU received: %10.2f seconds ago",
+ now - sif->last_marker_pdu_recd_time);
+ if (lacp_timer_is_running (sif->last_marker_pdu_sent_time))
+ vlib_cli_output (vm, " last Marker PDU sent: %10.2f seconds ago",
+ now - sif->last_marker_pdu_sent_time);
vlib_cli_output (vm, " debug: %d", sif->debug);
vlib_cli_output (vm, " loopback port: %d", sif->loopback_port);
vlib_cli_output (vm, " port moved: %d", sif->port_moved);
@@ -209,17 +232,17 @@ show_lacp_details (vlib_main_t * vm, u32 * sw_if_indices)
if (!lacp_timer_is_running (sif->wait_while_timer))
vlib_cli_output (vm, " wait while timer: not running");
else
- vlib_cli_output (vm, " wait while timer: %=10.2f seconds",
+ vlib_cli_output (vm, " wait while timer: %10.2f seconds",
sif->wait_while_timer - now);
if (!lacp_timer_is_running (sif->current_while_timer))
vlib_cli_output (vm, " current while timer: not running");
else
- vlib_cli_output (vm, " current while timer: %=10.2f seconds",
+ vlib_cli_output (vm, " current while timer: %10.2f seconds",
sif->current_while_timer - now);
if (!lacp_timer_is_running (sif->periodic_timer))
vlib_cli_output (vm, " periodic timer: not running");
else
- vlib_cli_output (vm, " periodic timer: %=10.2f seconds",
+ vlib_cli_output (vm, " periodic timer: %10.2f seconds",
sif->periodic_timer - now);
vlib_cli_output (vm, " RX-state: %U", format_rx_sm_state,
sif->rx_state);