[PATCH net-next 0/8] Pass extack to NETDEV_PRE_UP

2018-12-05 Thread Petr Machata
ttl 200 # ip link set dev vx2 up Error: mlxsw_spectrum: Conflicting NVE tunnels configuration. Petr Machata (8): net: core: dev: Add extack argument to dev_open() net: vrf: cycle_netdev(): Add an extack argument net: ipvlan: ipvlan_set_port_mode(): Add an extack argument net: core: dev

[PATCH net-next 6/8] net: core: dev: Add call_netdevice_notifiers_extack()

2018-12-05 Thread Petr Machata
In order to propagate extack through NETDEV_PRE_UP, add a new function call_netdevice_notifiers_extack() that primes the extack field of the notifier info. Convert call_netdevice_notifiers() to a simple wrapper around the new function that passes NULL for extack. Signed-off-by: Petr Machata

[PATCH net-next 7/8] net: core: dev: Attach extack to NETDEV_PRE_UP

2018-12-05 Thread Petr Machata
__dev_change_flags() and dev_open(), where it was propagated in the previous patches. Change __dev_open() to call call_netdevice_notifiers_extack() so that the passed-in extack is attached to the NETDEV_PRE_UP notifier. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- net

[PATCH net-next 1/8] net: core: dev: Add extack argument to dev_open()

2018-12-05 Thread Petr Machata
and update all users. Most of the calls end up just encoding NULL, but bond and team drivers have the extack readily available. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/bonding/bond_main.c | 2 +- drivers/net/ethernet/aquantia

[PATCH net-next 2/8] net: vrf: cycle_netdev(): Add an extack argument

2018-12-05 Thread Petr Machata
A follow-up patch will extend dev_change_flags() with an extack argument. Extend cycle_netdev() to have that argument available for the conversion. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/vrf.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH net-next 4/8] net: core: dev: Add extack argument to dev_change_flags()

2018-12-05 Thread Petr Machata
extack argument and update all users. Most of the calls end up just encoding NULL, but several sites (VLAN, ipvlan, VRF, rtnetlink) do have extack available. Since the function declaration line is changed anyway, name the other function arguments to placate checkpatch. Signed-off-by: Petr Machata

[PATCH net-next 8/8] selftests: mlxsw: Add a new test extack.sh

2018-12-05 Thread Petr Machata
Add a testsuite dedicated to testing extack propagation and related functionality. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- .../testing/selftests/drivers/net/mlxsw/extack.sh | 84 ++ 1 file changed, 84 insertions(+) create mode

[PATCH net-next 3/8] net: ipvlan: ipvlan_set_port_mode(): Add an extack argument

2018-12-05 Thread Petr Machata
A follow-up patch will extend dev_change_flags() with an extack argument. Extend ipvlan_set_port_mode() to have that argument available for the conversion. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ipvlan/ipvlan_main.c | 7 --- 1 file

[PATCH net-next 5/8] net: core: dev: Add extack argument to __dev_change_flags()

2018-12-05 Thread Petr Machata
existing users. Since the function declaration line is changed anyway, name the struct net_device argument to placate checkpatch. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- include/linux/netdevice.h | 3 ++- net/core/dev.c| 5 +++-- net/core

[PATCH net-next 12/12] rocker, dsa, ethsw: Don't filter VLAN events on bridge itself

2018-11-22 Thread Petr Machata
Due to an explicit check in rocker_world_port_obj_vlan_add(), dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects that are added to a device that is not a front-panel port device are ignored. Therefore this check is immaterial. Signed-off-by: Petr Machata Acked-by: Jiri Pirko

Re: [PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
Petr Machata writes: > An offloading driver may need to have access to switchdev events on > ports that aren't directly under its control. An example is a VXLAN port > attached to a bridge offloaded by a driver. The driver needs to know > about VLANs configured on the VXLAN dev

[PATCH net-next 11/12] switchdev: Replace port obj add/del SDO with a notification

2018-11-22 Thread Petr Machata
. Update switchdev_port_obj_del_now() to dispatch to this new function. Drop __switchdev_port_obj_add() and update switchdev_port_obj_add() likewise. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 - drivers/net/ethernet/mscc/ocelot.c

[PATCH net-next 09/12] mlxsw: spectrum_switchdev: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
the behavior that the switchdev operation based code currently has. Defer to switchdev_handle_port_obj_add() / _del() to handle the recursive descend, because mlxsw supports a number of upper types. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- .../ethernet/mellanox/mlxsw/spectrum_switchdev.c

[PATCH net-next 07/12] staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
case is that the notification is on a front-panel port netdevice. To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking notifier chain. Dispatch to swdev_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr

[PATCH net-next 10/12] ocelot: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
through switchdev_handle_port_obj_add() / _del() to handle the recursive descend, because Ocelot supports LAG uppers. Register to the new switchdev blocking notifier chain to get the new events when they start getting distributed. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- drivers/net

[PATCH net-next 06/12] staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check()

2018-11-22 Thread Petr Machata
ethsw currently uses an open-coded comparison of netdev_ops to determine whether whether a device represents a front panel port. Wrap this into a named function to simplify reuse. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 7 ++- 1 file

[PATCH net-next 08/12] switchdev: Add helpers to aid traversal through lower devices

2018-11-22 Thread Petr Machata
shed under one master, a scenario that switchdev currently happily supports. Therefore tolerate any and all unknown netdevices, whether they are backed by a switchdev driver or not. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- include/net/switchdev.h | 33 +++ net

[PATCH net-next 05/12] net: dsa: slave: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
that the switchdev operation based code currently has. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- net/dsa/slave.c | 56 1 file changed, 56 insertions(+) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 7d0c19e7edcf..d00a0b6d4ce0 100644

[PATCH net-next 03/12] switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL

2018-11-22 Thread Petr Machata
are kept in place. Following patches first convert individual clients to the notifier protocol, and only then are the operations removed. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel --- include/net/switchdev.h | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH net-next 02/12] switchdev: Add a blocking notifier chain

2018-11-22 Thread Petr Machata
the notifications for which a blocking context can be assumed. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Ido Schimmel --- include/net/switchdev.h | 27 +++ net/switchdev/switchdev.c | 26 ++ 2 files changed, 53 insertions(+) diff --git

[PATCH net-next 01/12] switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize

2018-11-22 Thread Petr Machata
ides with the member name) to "OBJ". Additionally, instead of passing "OBJ" to container_of() verbatim, parenthesize it, so that a comma in the passed-in expression doesn't pollute the container_of() invocation. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Sc

[PATCH net-next 00/12] switchdev: Convert switchdev_port_obj_{add,del}() to notifiers

2018-11-22 Thread Petr Machata
Therefore remove it in patch #12. Petr Machata (12): switchdev: SWITCHDEV_OBJ_PORT_{VLAN, MDB}(): Sanitize switchdev: Add a blocking notifier chain switchdev: Add SWITCHDEV_PORT_OBJ_ADD, SWITCHDEV_PORT_OBJ_DEL rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL net: dsa: slave: Handle SWITCHDEV_PO

[PATCH net-next 04/12] rocker: Handle SWITCHDEV_PORT_OBJ_ADD/_DEL

2018-11-22 Thread Petr Machata
to the blocking notifier chain. In the handler, filter out notifications on any foreign netdevices. Dispatch the new notifiers to rocker_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata Acked-by: Jiri Pirko

[PATCH net-next v4 8/8] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-29 Thread Petr Machata
to changes in bridge vlan configuration right away and another notification would have to arrive for mlxsw to catch up. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next v4 7/8] net: bridge: Notify about bridge VLANs

2018-05-29 Thread Petr Machata
port or a bridge. Signed-off-by: Petr Machata --- net/bridge/br_vlan.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 602c869..7df2690 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c

[PATCH net-next v4 6/8] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-29 Thread Petr Machata
the current behavior. Signed-off-by: Petr Machata --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index c723a04..a17dd29 100644 --- a/drivers/staging/fsl-dpaa2/ethsw

[PATCH net-next v4 5/8] dsa: port: Ignore bridge VLAN events

2018-05-29 Thread Petr Machata
the current behavior. Signed-off-by: Petr Machata Reviewed-by: Vivien Didelot --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/port.c index 2413beb..ed05954 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -252,6 +252,9 @@ int dsa_port_vlan_add

[PATCH net-next v4 4/8] rocker: rocker_main: Ignore bridge VLAN events

2018-05-29 Thread Petr Machata
the current behavior. Signed-off-by: Petr Machata --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c index e73e4fe..aeafdb9 100644 --- a/drivers/net/ethernet

[PATCH net-next v4 3/8] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-29 Thread Petr Machata
the current behavior. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw

[PATCH net-next v4 2/8] net: bridge: Extract br_vlan_add_existing()

2018-05-29 Thread Petr Machata
Extract the code that deals with adding a preexisting VLAN to bridge CPU port to a separate function. A follow-up patch introduces a need to roll back operations in this block due to an error, and this split will make the error-handling code clearer. Signed-off-by: Petr Machata --- net/bridge

[PATCH net-next v4 1/8] net: bridge: Extract boilerplate around switchdev_port_obj_*()

2018-05-29 Thread Petr Machata
and del calls. Thus to remove the duplication, extract the repetition into named functions and reuse. Signed-off-by: Petr Machata Reviewed-by: Vivien Didelot --- net/bridge/br_private.h | 13 + net/bridge/br_switchdev.c | 25 + net/bridge/br_vlan.c | 26

[PATCH net-next v4 0/8] net: bridge: Notify about bridge VLANs

2018-05-29 Thread Petr Machata
rt_obj_del() to br_switchdev_port_vlan_add() and br_switchdev_port_vlan_del(), and move from br_vlan.c to br_switchdev.c. Petr Machata (8): net: bridge: Extract boilerplate around switchdev_port_obj_*() net: bridge: Extract br_vlan_add_existing() mlxsw: spectrum_switchdev: Ignore bridge VLAN event

Re: [PATCH net-next v2 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-29 Thread Petr Machata
Ilias Apalodimas writes: >> diff --git a/drivers/net/ethernet/rocker/rocker_main.c >> b/drivers/net/ethernet/rocker/rocker_main.c >> index e73e4fe..aeafdb9 100644 >> --- a/drivers/net/ethernet/rocker/rocker_main.c >> +++ b/drivers/net/ethernet/rocker/rocker_main.c >> @@ -1632,6 +1632,9 @@

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

2018-05-29 Thread Petr Machata
Dan Carpenter writes: > On Mon, May 28, 2018 at 05:11:04PM +0200, Petr Machata wrote: >> @@ -580,6 +591,9 @@ int br_vlan_add(struct net_bridge *br, u16 vid, u16 >> flags, bool *changed) >> vg->num_vlans++; >>

[PATCH net-next v3 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/

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

2018-05-28 Thread Petr Machata
port or a bridge. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Tested-by: Florian Fainel

[PATCH net-next v3 5/7] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2

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

2018-05-28 Thread Petr Machata
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> --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/

[PATCH net-next v3 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-28 Thread Petr Machata
to changes in bridge vlan configuration right away and another notification would have to arrive for mlxsw to catch up. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 fil

[PATCH net-next v3 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

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

2018-05-28 Thread Petr Machata
and del calls. Thus to remove the duplication, extract the repetition into named functions and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> --- net/bridge/br_private.h | 13 + net/bridge/br_switchdev.c | 25 + net/bridge/br_vlan.c

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

2018-05-28 Thread Petr Machata
- Rename br_switchdev_port_obj_add() and br_switchdev_port_obj_del() to br_switchdev_port_vlan_add() and br_switchdev_port_vlan_del(), and move from br_vlan.c to br_switchdev.c. Petr Machata (7): net: bridge: Extract boilerplate around switchdev_port_obj_*() mlxsw: spectrum_switchdev: Ignore bridge V

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

2018-05-28 Thread Petr Machata
Petr Machata <pe...@mellanox.com> writes: > diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h > index 11520ed..33bd914 100644 > --- a/net/bridge/br_private.h > +++ b/net/bridge/br_private.h > @@ -1178,6 +1178,9 @@ static inline void br_switchdev_frame_unmark(s

[PATCH net-next v2 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/

[PATCH net-next v2 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-28 Thread Petr Machata
to changes in bridge vlan configuration right away and another notification would have to arrive for mlxsw to catch up. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 fil

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

2018-05-28 Thread Petr Machata
port or a bridge. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Tested-by: Florian Fainel

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

2018-05-28 Thread Petr Machata
br_vlan.c to br_switchdev.c. Petr Machata (7): net: bridge: Extract boilerplate around switchdev_port_obj_*() mlxsw: spectrum_switchdev: Ignore bridge VLAN events rocker: rocker_main: Ignore bridge VLAN events dsa: port: Ignore bridge VLAN events staging: fsl-dpaa2: ethsw: Ignore bridge VLAN ev

[PATCH net-next v2 5/7] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2

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

2018-05-28 Thread Petr Machata
and del calls. Thus to remove the duplication, extract the repetition into named functions and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> --- net/bridge/br_private.h | 3 +++ net/bridge/br_switchdev.c | 25 + net/bridge/br_vlan.c

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

2018-05-28 Thread Petr Machata
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> --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/

[PATCH net-next v2 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-28 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

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

2018-05-28 Thread Petr Machata
Vivien Didelot <vivien.dide...@savoirfairelinux.com> writes: > Hi Petr, > > Petr Machata <pe...@mellanox.com> writes: > >> Vivien Didelot <vivien.dide...@savoirfairelinux.com> writes: >> >>>> + } else { >>>> + err = br_s

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

2018-05-25 Thread Petr Machata
Vivien Didelot writes: >> +} else { >> +err = br_switchdev_port_obj_add(dev, v->vid, flags); >> +if (err && err != -EOPNOTSUPP) >> +goto out; >> } > > Except that br_switchdev_port_obj_add taking vid and

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

2018-05-25 Thread Petr Machata
Vivien Didelot <vivien.dide...@savoirfairelinux.com> writes: > Hi Petr, > > Petr Machata <pe...@mellanox.com> writes: > >> -static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br, >> - u16 vid, u16 flags) >> +s

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

2018-05-25 Thread Petr Machata
Florian Fainelli writes: > You seem to have approached the bridge changes a little differently from > this series: > > https://lists.linux-foundation.org/pipermail/bridge/2016-November/010112.html It pretty much extends the patchset to also send the notifications for the

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

2018-05-24 Thread Petr Machata
ly enabled. In patch #7, mlxsw is changed to update offloads of mirror-to-gre also for bridge-related notifications. Petr Machata (7): net: bridge: Extract boilerplate around switchdev_port_obj_*() mlxsw: spectrum_switchdev: Ignore bridge VLAN events rocker: rocker_main: Ignore bridge VLAN ev

[PATCH net-next 3/7] rocker: rocker_main: Ignore bridge VLAN events

2018-05-24 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/net/ethernet/rocker/rocker_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/

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

2018-05-24 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- net/dsa/port.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/dsa/port.c b/net/dsa/port.c index 2413beb..ed05954 100644 --- a/net/dsa/port.c +++ b/net/dsa/

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

2018-05-24 Thread Petr Machata
port or a bridge. Signed-off-by: Petr Machata <pe...@mellanox.com> --- net/bridge/br_vlan.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index a75fe930..14c1b6c 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@

[PATCH net-next 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events

2018-05-24 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH net-next 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare

2018-05-24 Thread Petr Machata
to changes in bridge vlan configuration right away and another notification would have to arrive for mlxsw to catch up. Signed-off-by: Petr Machata <pe...@mellanox.com> Reviewed-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2 +- 1 fil

[PATCH net-next 5/7] staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events

2018-05-24 Thread Petr Machata
Ignore VLAN events where the orig_dev is the bridge device itself. Signed-off-by: Petr Machata <pe...@mellanox.com> --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2

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

2018-05-24 Thread Petr Machata
and del calls. Thus to remove the duplication, extract the repetition into named functions and reuse. Signed-off-by: Petr Machata <pe...@mellanox.com> --- net/bridge/br_vlan.c | 44 +++- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git