summaryrefslogtreecommitdiff
path: root/net/bridge/br_stp_bpdu.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@gmail.com>2019-12-12 04:07:10 +0300
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-12-15 07:02:36 +0300
commitde1799667b002331609e8ee6b924ccfd51968d99 (patch)
treee8793d7755a11bd522455a4913cdb24788dd9086 /net/bridge/br_stp_bpdu.c
parentea6a547669b37453f2b1a5d85188d75b3613dfaa (diff)
downloadlinux-de1799667b002331609e8ee6b924ccfd51968d99.tar.xz
net: bridge: add STP xstats
This adds rx_bpdu, tx_bpdu, rx_tcn, tx_tcn, transition_blk, transition_fwd xstats counters to the bridge ports copied over via netlink, providing useful information for STP. Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'net/bridge/br_stp_bpdu.c')
-rw-r--r--net/bridge/br_stp_bpdu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
index 7796dd9d42d7..0e4572f31330 100644
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -118,6 +118,8 @@ void br_send_config_bpdu(struct net_bridge_port *p, struct br_config_bpdu *bpdu)
br_set_ticks(buf+33, bpdu->forward_delay);
br_send_bpdu(p, buf, 35);
+
+ p->stp_xstats.tx_bpdu++;
}
/* called under bridge lock */
@@ -133,6 +135,8 @@ void br_send_tcn_bpdu(struct net_bridge_port *p)
buf[2] = 0;
buf[3] = BPDU_TYPE_TCN;
br_send_bpdu(p, buf, 4);
+
+ p->stp_xstats.tx_tcn++;
}
/*