Nikolay Aleksandrov
2019-Dec-11 15:42 UTC
[Bridge] [PATCH net-next v2] net: bridge: add STP xstats
On 11/12/2019 17:38, David Ahern wrote:> On 12/10/19 2:20 PM, Vivien Didelot wrote: >> diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h >> index 1b3c2b643a02..e7f2bb782006 100644 >> --- a/include/uapi/linux/if_bridge.h >> +++ b/include/uapi/linux/if_bridge.h >> @@ -156,6 +156,15 @@ struct bridge_vlan_xstats { >> __u32 pad2; >> }; >> >> +struct bridge_stp_xstats { >> + __u64 transition_blk; >> + __u64 transition_fwd; >> + __u64 rx_bpdu; >> + __u64 tx_bpdu; >> + __u64 rx_tcn; >> + __u64 tx_tcn; >> +}; >> + >> /* Bridge multicast database attributes >> * [MDBA_MDB] = { >> * [MDBA_MDB_ENTRY] = { >> @@ -261,6 +270,7 @@ enum { >> BRIDGE_XSTATS_UNSPEC, >> BRIDGE_XSTATS_VLAN, >> BRIDGE_XSTATS_MCAST, >> + BRIDGE_XSTATS_STP, >> BRIDGE_XSTATS_PAD, >> __BRIDGE_XSTATS_MAX >> }; > > Shouldn't the new entry be appended to the end - after BRIDGE_XSTATS_PAD >Oh yes, good catch. That has to be fixed, too.
Vivien Didelot
2019-Dec-11 18:41 UTC
[Bridge] [PATCH net-next v2] net: bridge: add STP xstats
Hi David, Nikolay, On Wed, 11 Dec 2019 17:42:33 +0200, Nikolay Aleksandrov <nikolay at cumulusnetworks.com> wrote:> >> /* Bridge multicast database attributes > >> * [MDBA_MDB] = { > >> * [MDBA_MDB_ENTRY] = { > >> @@ -261,6 +270,7 @@ enum { > >> BRIDGE_XSTATS_UNSPEC, > >> BRIDGE_XSTATS_VLAN, > >> BRIDGE_XSTATS_MCAST, > >> + BRIDGE_XSTATS_STP, > >> BRIDGE_XSTATS_PAD, > >> __BRIDGE_XSTATS_MAX > >> }; > > > > Shouldn't the new entry be appended to the end - after BRIDGE_XSTATS_PAD > > > > Oh yes, good catch. That has to be fixed, too. >This I don't get. Why new attributes must come between BRIDGE_XSTATS_PAD and __BRIDGE_XSTATS_MAX? Thanks, Vivien