diff options
author | Steven Luong <sluong@cisco.com> | 2019-11-12 19:45:49 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-12-13 22:28:55 +0000 |
commit | aa72578637e2a346ee845545b2e26aad83e12192 (patch) | |
tree | 4f27b494f38fd72fadc76428e86925d9e5caea25 /src/vnet/bonding/node.h | |
parent | 380e857830985e1b50257b39ba6045b829c833c1 (diff) |
bonding: Add /if/lacp/<bond-sw_if_index>/<slave-sw_if_index>/partner-state
We already had /if/lacp/<bond-sw_if_index>/<slave-sw_if_index>/state in
the stats segment. Add also the partner-state to be complete.
Change to populate stats segment with the states at startup, after processing
an lacp pdu, and after timer expiration.
Unit test
---------
sudo vpp_get_stats dump | grep /if/lacp
63.00 /if/lacp/3/1/state
61.00 /if/lacp/3/1/partner-state
63.00 /if/lacp/3/2/state
61.00 /if/lacp/3/2/partner-state
Type: feature
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ib7b8e1183d572bb6e422a846aaa2b7b3559a0dc7
Diffstat (limited to 'src/vnet/bonding/node.h')
-rw-r--r-- | src/vnet/bonding/node.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/bonding/node.h b/src/vnet/bonding/node.h index 4c91200ef04..8ead0228523 100644 --- a/src/vnet/bonding/node.h +++ b/src/vnet/bonding/node.h @@ -352,6 +352,12 @@ typedef void (*lacp_enable_disable_func) (vlib_main_t * vm, bond_if_t * bif, typedef struct { + u32 partner_state; + u32 actor_state; +} lacp_stats_t; + +typedef struct +{ /* pool of bonding interfaces */ bond_if_t *interfaces; @@ -377,7 +383,7 @@ typedef struct bond_per_thread_data_t *per_thread_data; - u32 **stats; + lacp_stats_t **stats; } bond_main_t; /* bond packet trace capture */ |