Re: [Bridge] [PATCH net-next 4/4] bridge: vlan: combine (br|nbp)_vlan_flush into one

2015-10-15 Thread Vivien Didelot
On Oct. Monday 12 (42) 09:27 PM, Ido Schimmel wrote: > Mon, Oct 12, 2015 at 09:15:39PM IDT, vivien.dide...@savoirfairelinux.com > wrote: > >Hi, > > > >On Oct. Monday 12 (42) 08:51 PM, Ido Schimmel wrote: > >> Mon, Oct 12, 2015 at 02:41:09PM IDT, ra...@blackwall.org wrote: > >> >From: Nikolay

Re: [Bridge] [PATCH net-next 4/4] bridge: vlan: combine (br|nbp)_vlan_flush into one

2015-10-15 Thread Vivien Didelot
Hi, On Oct. Monday 12 (42) 08:51 PM, Ido Schimmel wrote: > Mon, Oct 12, 2015 at 02:41:09PM IDT, ra...@blackwall.org wrote: > >From: Nikolay Aleksandrov > > > >As Ido Schimmel pointed out the vlan_vid_del() loop in nbp_vlan_flush is > >unnecessary (and is actually a

[Bridge] [RFC net 0/3] net: bridge: fast ageing on topology change

2016-10-19 Thread Vivien Didelot
ot;8.3.5 Notifying topology changes", http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf [ Feedbacks are needed, especially for the usage of the bridge lock and the defered ageing time attribute. It works fine so far but might raise concerns. ] Vivien Didelot (3): net: bridg

[Bridge] [RFC net 2/3] net: bridge: add helper to set topology change

2016-10-19 Thread Vivien Didelot
Add a __br_set_topology_change helper to set the topology change value. This can be later extended to add actions when the topology change flag is set or cleared. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_private_stp.h | 1 + net/bridge/br

[Bridge] [RFC net 1/3] net: bridge: add helper to offload ageing time

2016-10-19 Thread Vivien Didelot
it can be called under bridge lock. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_private.h | 1 + net/bridge/br_stp.c | 28 net/bridge/br_stp_if.c | 12 +++- 3 files changed, 24 insertions(+), 17 deletions(-)

[Bridge] [RFC net 3/3] net: dsa: shorten ageing time on topology change

2016-10-19 Thread Vivien Didelot
, http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_device.c | 2 +- net/bridge/br_private.h | 3 ++- net/bridge/br_stp.c | 27 +++ 3 files changed, 30

Re: [Bridge] [RFC net-next 0/3] net: bridge: Allow CPU port configuration

2016-11-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > This patch series allows using the bridge master interface to configure > an Ethernet switch port's CPU/management port with different VLAN attributes > than > those of the bridge downstream ports/members. > > Jiri, Ido, Andrew,

Re: [Bridge] [RFC net-next 1/3] net: bridge: Allow bridge master device to configure switch CPU port

2016-11-22 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > bridge vlan add vid 2 dev br0 self > -> CPU port gets programmed > bridge vlan add vid 2 dev port0 > -> port0 (switch port 0) gets programmed Although this is not specific to this patch, I'd like to point out that this

Re: [Bridge] [RFC net-next 2/3] net: dsa: Propagate VLAN add/del to CPU port(s)

2016-11-22 Thread Vivien Didelot
rs to implement separate programming of downstream and > upstream/management ports. > > Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> > Signed-off-by: Florian Fainelli <f.faine...@gmail.com> > --- > net/dsa/slave.c | 45 ++

[Bridge] [PATCH net 2/3] net: bridge: add helper to set topology change

2016-12-10 Thread Vivien Didelot
Add a __br_set_topology_change helper to set the topology change value. This can be later extended to add actions when the topology change flag is set or cleared. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_private_stp.h | 1 + net/bridge/br

[Bridge] [PATCH net 1/3] net: bridge: add helper to offload ageing time

2016-12-10 Thread Vivien Didelot
it can be called under bridge lock. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_private.h | 1 + net/bridge/br_stp.c | 28 net/bridge/br_stp_if.c | 12 +++- 3 files changed, 24 insertions(+), 17 deletions(-)

[Bridge] [PATCH net 0/3] net: bridge: fast ageing on topology change

2016-12-10 Thread Vivien Didelot
ot;8.3.5 Notifying topology changes", http://profesores.elo.utfsm.cl/~agv/elo309/doc/802.1D-1998.pdf No change since RFC: https://lkml.org/lkml/2016/10/19/828 Vivien Didelot (3): net: bridge: add helper to offload ageing time net: bridge: add helper to set topology change net: br

[Bridge] [PATCH net-next 4/6] net: bridge: add __br_mdb_do

2017-05-17 Thread Vivien Didelot
o need to pass it twice. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index 24fb4179..a72d5e6

[Bridge] [PATCH net-next 1/6] net: bridge: pass net_bridge_port to __br_mdb_add

2017-05-17 Thread Vivien Didelot
The __br_mdb_add function uses exactly the same mechanism as its caller br_mdb_add to retrieve the net_bridge_port pointer from br_mdb_entry. Remove it and pass directly the net_bridge_port pointer to __br_mdb_add. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --

[Bridge] [PATCH net-next 5/6] net: bridge: get msgtype from nlmsghdr in mdb ops

2017-05-17 Thread Vivien Didelot
Retrieve the message type from the nlmsghdr structure instead of hardcoding it in both br_mdb_add and br_mdb_del. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/

[Bridge] [PATCH net-next 2/6] net: bridge: check multicast bridge only once

2017-05-17 Thread Vivien Didelot
-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index bef0331f46a4..d20a01622b20 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br

[Bridge] [PATCH net-next 3/6] net: bridge: break if __br_mdb_del fails

2017-05-17 Thread Vivien Didelot
Be symmetric with br_mdb_add and break if __br_mdb_del returns an error. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/bridge/br_mdb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c

Re: [Bridge] [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs

2018-05-25 Thread Vivien Didelot
err != -EOPNOTSUPP) > + goto out; > } Except that br_switchdev_port_obj_add taking vid and flags arguments seems confusing to me, the change looks good: Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Thanks, Vivien

Re: [Bridge] [PATCH net-next 0/7] net: bridge: Notify about bridge VLANs

2018-05-25 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Andrew, Vivien, if the following hunks get applied are we possibly > breaking mv88e6xxx? This is the use case that is really missing IMHO at > the moment in DSA: we cannot control the VLAN membership and attributes > of the CPU

Re: [Bridge] [PATCH net-next 4/7] dsa: port: Ignore bridge VLAN events

2018-05-25 Thread Vivien Didelot
Hi Petr, Petr Machata <pe...@mellanox.com> writes: > Ignore VLAN events where the orig_dev is the bridge device itself. > > Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Thanks, Vivien

Re: [Bridge] [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs

2018-05-26 Thread Vivien Didelot
Hi Petr, Petr Machata <pe...@mellanox.com> writes: > Vivien Didelot <vivien.dide...@savoirfairelinux.com> writes: > >>> + } else { >>> + err = br_switchdev_port_obj_add(dev, v->vid, flags); >>> + if (err &&a

Re: [Bridge] [PATCH net-next v3 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-29 Thread Vivien Didelot
ted add call, the follow-up patches add more of > both add and del calls. > > Thus to remove the duplication, extract the repetition into named > functions and reuse. > > Signed-off-by: Petr Machata Considering Dan's comment as well: Reviewed-by: Vivien Didelot Thanks, Vivien

Re: [Bridge] [PATCH net-next v3 11/12] net: dsa: Implement ndo_get_port_parent_id()

2019-02-08 Thread Vivien Didelot
gt;dst; > > + ppid->id_len = sizeof(dst->index); > + memcpy(>id, >index, ppid->id_len); > + > + return 0; > +} Finally this will give us a way to distinguish two ports with the same switch and port IDs on a system with two disjoint switch trees, thanks! Reviewed-by: Vivien Didelot

Re: [PATCH] net: bridge: Allow bridge to joing multicast groups

2019-08-01 Thread Vivien Didelot
Hi Horatiu, On Thu, 25 Jul 2019 13:44:04 +0200, Horatiu Vultur wrote: > There is no way to configure the bridge, to receive only specific link > layer multicast addresses. From the description of the command 'bridge > fdb append' is supposed to do that, but there was no way to notify the >

Re: [PATCH] net: bridge: Allow bridge to joing multicast groups

2019-08-01 Thread Vivien Didelot
Hi Horatiu, On Thu, 1 Aug 2019 21:48:02 +0200, Horatiu Vultur wrote: > > I'm a bit late in the conversation. Isn't this what you want? > > > > ip address add dev br0 autojoin > > > > Not really, I was looking in a way to register the ports to link layer > multicast address. Sorry for

[Bridge] [PATCH net-next] net: bridge: add STP stat counters

2019-11-22 Thread Vivien Didelot
n0/brport/statistics/tx_bpdu 26 # cat /sys/class/net/lan5/brport/statistics/transition_fwd 3 At the same time, make BRPORT_ATTR define a non-const attribute as this is required by the attribute group structure. Signed-off-by: Vivien Didelot --- net/bridge/br_private.h | 8

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

2019-12-09 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_if.c | 8

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

2019-12-09 Thread Vivien Didelot
"transition_blk": 0, "transition_fwd": 1 }, ... Signed-off-by: Vivien Didelot --- include/uapi/linux/if_bridge.h | 16 +--- ip/iplink_bridge.c | 32 2 files changed, 45 inser

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

2019-12-09 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_if.c | 8

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

2019-12-09 Thread Vivien Didelot
"transition_blk": 0, "transition_fwd": 1 }, ... Signed-off-by: Vivien Didelot --- include/uapi/linux/if_bridge.h | 10 ++ ip/iplink_bridge.c | 32 2 files changed, 42 insertions(+) d

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

2019-12-09 Thread Vivien Didelot
On Mon, 9 Dec 2019 14:34:23 -0800, Stephen Hemminger wrote: > On Mon, 9 Dec 2019 16:18:41 -0500 > Vivien Didelot wrote: > > > diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h > > index 31fc51bd..e7f2bb78 100644 > > --- a/include/uapi/

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

2019-12-10 Thread Vivien Didelot
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), > > + BRIDGE_XSTATS_PAD); > > +

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

2019-12-10 Thread Vivien Didelot
"tx_tcn": 0, "transition_blk": 0, "transition_fwd": 0 } } ] Signed-off-by: Vivien Didelot --- include/uapi/linux/if_bridge.h | 10 ++ ip/iplink_bridge.c | 26 ++ 2 files changed, 36 i

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

2019-12-10 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| 10

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 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 iproute2 v2] iplink: add support for STP xstats

2019-12-10 Thread Vivien Didelot
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: > > > > # ip link xstats type bridge_slave dev lan5 > >

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

2019-12-10 Thread Vivien Didelot
On Tue, 10 Dec 2019 22:15:26 +0200, Nikolay Aleksandrov wrote: > Why do you need percpu ? All of these seem to be incremented with the > bridge lock held. A few more comments below. > >>> > >>> All other xstats are incremented percpu, I simply followed the pattern. > >>> > >> > >> We

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

2019-12-10 Thread Vivien Didelot
On Tue, 10 Dec 2019 22:52:59 +0200, Nikolay Aleksandrov wrote: > >> Why do you need percpu ? All of these seem to be incremented with the > >> bridge lock held. A few more comments below. > > > > All other xstats are incremented percpu, I simply followed the pattern. > > >

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

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

2019-12-11 Thread Vivien Didelot
"tx_tcn": 0, "transition_blk": 0, "transition_fwd": 0 } } ] Signed-off-by: Vivien Didelot --- include/uapi/linux/if_bridge.h | 10 ++ ip/iplink_bridge.c | 26 ++ 2 files changed, 36 i

[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] net: bridge: add STP xstats

2019-12-10 Thread Vivien Didelot
Hi Nikolay, On Tue, 10 Dec 2019 09:49:59 +0200, Nikolay Aleksandrov wrote: > Why did you send the bridge patch again ? Does it have any changes ? The second iproute2 patch does not include the include guards update, but I kept the bridge_stp_stats structure and the BRIDGE_XSTATS_STP

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

2019-12-10 Thread Vivien Didelot
Hi Nikolay, On Tue, 10 Dec 2019 21:50:10 +0200, Nikolay Aleksandrov wrote: > >> Why do you need percpu ? All of these seem to be incremented with the > >> bridge lock held. A few more comments below. > > > > All other xstats are incremented percpu, I simply followed the pattern. > > > > We