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
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
__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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 @@
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++;
>>
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/
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
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
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/
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
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
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
- 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
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
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/
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
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
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
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
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
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/
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
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
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
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
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
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
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/
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/
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
@@
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
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
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
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
63 matches
Mail list logo