diff options
author | Nikolay Aleksandrov <nikolay@cumulusnetworks.com> | 2019-01-18 13:30:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-22 21:04:14 +0100 |
commit | a258aeacd7f0dc10bb45caa7e92a3ea3ca1a76e9 (patch) | |
tree | 048540eec82f15a4ebd86c8511373b0be843a3f8 /include/net/bond_3ad.h | |
parent | bonding: add 3ad stats (diff) | |
download | linux-a258aeacd7f0dc10bb45caa7e92a3ea3ca1a76e9.tar.xz linux-a258aeacd7f0dc10bb45caa7e92a3ea3ca1a76e9.zip |
bonding: add support for xstats and export 3ad stats
This patch adds support for extended statistics (xstats) call to the
bonding. The first user would be the 3ad code which counts the following
events:
- LACPDU Rx/Tx
- LACPDU unknown type Rx
- LACPDU illegal Rx
- Marker Rx/Tx
- Marker response Rx/Tx
- Marker unknown type Rx
All of these are exported via netlink as separate attributes to be
easily extensible as we plan to add more in the future.
Similar to how the bridge and other xstats exports, the structure
inside is:
[ IFLA_STATS_LINK_XSTATS ]
-> [ LINK_XSTATS_TYPE_BOND ]
-> [ BOND_XSTATS_3AD ]
-> [ 3ad stats attributes ]
With this structure it's easy to add more stat types later.
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bond_3ad.h')
-rw-r--r-- | include/net/bond_3ad.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bond_3ad.h b/include/net/bond_3ad.h index 30e60dba1b2d..25aaf49d19be 100644 --- a/include/net/bond_3ad.h +++ b/include/net/bond_3ad.h @@ -321,5 +321,8 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, int bond_3ad_set_carrier(struct bonding *bond); void bond_3ad_update_lacp_rate(struct bonding *bond); void bond_3ad_update_ad_actor_settings(struct bonding *bond); +void bond_3ad_stats_add(struct slave *slave, struct bond_3ad_stats *stats); +int bond_3ad_stats_fill(struct sk_buff *skb, struct bond_3ad_stats *stats); +size_t bond_3ad_stats_size(void); #endif /* _NET_BOND_3AD_H */ |