aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/net/bond_3ad.h
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2019-01-18 14:30:22 +0200
committerDavid S. Miller <davem@davemloft.net>2019-01-22 12:04:14 -0800
commit267c095aa2d9126059c1f5a65c660d5a71833e3f (patch)
treee313bef170cd0c8faa8696a1aa54a00d31f54720 /include/net/bond_3ad.h
parentbonding: 3ad: remove bond_3ad_rx_indication's length argument (diff)
downloadwireguard-linux-267c095aa2d9126059c1f5a65c660d5a71833e3f.tar.xz
wireguard-linux-267c095aa2d9126059c1f5a65c660d5a71833e3f.zip
bonding: add 3ad stats
Count the following types of 3ad packets per slave: - rx/tx lacpdu - rx/tx marker - rx/tx marker response - rx illegal lacpdus (right now counted on wrong length) - rx unknown lacpdu type - rx unknown marker type The counters are using atomic64 since this is not fast path. 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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/bond_3ad.h b/include/net/bond_3ad.h
index fc3111515f5c..30e60dba1b2d 100644
--- a/include/net/bond_3ad.h
+++ b/include/net/bond_3ad.h
@@ -180,6 +180,19 @@ struct port;
#pragma pack(8)
#endif
+struct bond_3ad_stats {
+ atomic64_t lacpdu_rx;
+ atomic64_t lacpdu_tx;
+ atomic64_t lacpdu_unknown_rx;
+ atomic64_t lacpdu_illegal_rx;
+
+ atomic64_t marker_rx;
+ atomic64_t marker_tx;
+ atomic64_t marker_resp_rx;
+ atomic64_t marker_resp_tx;
+ atomic64_t marker_unknown_rx;
+};
+
/* aggregator structure(43.4.5 in the 802.3ad standard) */
typedef struct aggregator {
struct mac_addr aggregator_mac_address;
@@ -272,6 +285,7 @@ struct ad_bond_info {
struct ad_slave_info {
struct aggregator aggregator; /* 802.3ad aggregator structure */
struct port port; /* 802.3ad port structure */
+ struct bond_3ad_stats stats;
u16 id;
};