Re: [Bridge] [PATCH net-next v3] net: bridge: add STP xstats

2019-12-11 Thread Nikolay Aleksandrov
On 12/12/2019 03:07, Vivien Didelot wrote: > 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 > --- > include/uapi/linux/if_bridge.h

[Bridge] [PATCH iproute2 v4] iplink: add support for STP xstats

2019-12-11 Thread Vivien Didelot
Add support for the BRIDGE_XSTATS_STP xstats, as follow: # ip link xstats type bridge_slave dev lan4 stp lan4 STP BPDU: RX: 0 TX: 61 STP TCN: RX: 0 TX: 0 STP Transitions: Blocked: 2 Forwarding: 1 Or below as JSON:

[Bridge] [PATCH net-next v3] net: bridge: add STP xstats

2019-12-11 Thread Vivien Didelot
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 --- include/uapi/linux/if_bridge.h | 10 ++ net/bridge/br_netlink.c| 13

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread Vivien Didelot
Hi David, On Wed, 11 Dec 2019 14:16:58 -0800 (PST), David Miller wrote: > > To be more precise, what I don't get is that when > > I move the BRIDGE_XSTATS_STP definition *after* BRIDGE_XSTATS_PAD, the STP > > xstats don't show up anymore in iproute2. > > Because you ahve to recompile iproute2

Re: [Bridge] [PATCH iproute2 v2] iplink: add support for STP xstats

2019-12-11 Thread Stephen Hemminger
On Tue, 10 Dec 2019 13:16:33 -0500 Vivien Didelot wrote: > Hi Stephen, > > On Mon, 9 Dec 2019 16:13:45 -0800, Stephen Hemminger > wrote: > > On Mon, 9 Dec 2019 18:05:22 -0500 > > Vivien Didelot wrote: > > > > > Add support for the BRIDGE_XSTATS_STP xstats, as follow: > > > > > > #

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread David Miller
From: Vivien Didelot Date: Wed, 11 Dec 2019 16:47:54 -0500 > I thought the whole point of using enums was to avoid caring about fixed > numeric values, but well. I don't get where you got that idea from. Each and every netlink attribute value is like IPPROTO_TCP in an ipv4 header, the exact

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread Vivien Didelot
Hi David, On Wed, 11 Dec 2019 12:01:20 -0800 (PST), David Miller wrote: > >> >> /* Bridge multicast database attributes > >> >> * [MDBA_MDB] = { > >> >> * [MDBA_MDB_ENTRY] = { > >> >> @@ -261,6 +270,7 @@ enum { > >> >> BRIDGE_XSTATS_UNSPEC, > >> >> BRIDGE_XSTATS_VLAN, >

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread David Miller
From: Vivien Didelot Date: Wed, 11 Dec 2019 13:41:33 -0500 > Hi David, Nikolay, > > On Wed, 11 Dec 2019 17:42:33 +0200, Nikolay Aleksandrov > wrote: >> >> /* Bridge multicast database attributes >> >> * [MDBA_MDB] = { >> >> * [MDBA_MDB_ENTRY] = { >> >> @@ -261,6 +270,7 @@ enum { >>

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread Vivien Didelot
Hi David, Nikolay, On Wed, 11 Dec 2019 17:42:33 +0200, Nikolay Aleksandrov wrote: > >> /* Bridge multicast database attributes > >> * [MDBA_MDB] = { > >> * [MDBA_MDB_ENTRY] = { > >> @@ -261,6 +270,7 @@ enum { > >>BRIDGE_XSTATS_UNSPEC, > >>BRIDGE_XSTATS_VLAN, > >>

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread Nikolay Aleksandrov
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 >> @@

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread David Ahern
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 { >

Re: [Bridge] [PATCH net-next v2] net: bridge: add STP xstats

2019-12-11 Thread Nikolay Aleksandrov
On 11/12/2019 04:02, Vivien Didelot wrote: > Hi Nikolay, > > On Tue, 10 Dec 2019 23:45:13 +0200, Nikolay Aleksandrov > wrote: >>> + if (p) { >>> + nla = nla_reserve_64bit(skb, BRIDGE_XSTATS_STP, >>> + sizeof(p->stp_xstats), >>> +