type vxlan 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:
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
ss it
from __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
t 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/aqu
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
extra 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 Ma
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
e two 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
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 de
.
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
n 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_switch
nteresting 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-of
Pass 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
---
driver
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
e stashed 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 +++
r 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..d00a0b6d4
themselves 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 inse
e 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
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: I
ch events will simply be ignored much sooner.
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_AD
bscribe 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:
#x27;t adapt 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(-
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
n 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/
n 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_vla
n 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/eth
n 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/
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
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
itchdev_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 (8):
net: bridge: Extract boilerplate around switchdev_port_obj_*()
net: bridge: Extract br_vlan_add_existing()
mlxsw: spectrum_switchdev: Ignore br
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 @@ rocker
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
---
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
port or a bridge.
Signed-off-by: Petr Machata
Reviewed-by: Florian Fainelli
Reviewed-by: Vivien Didelot
Reviewed-by: Nikolay Aleksandrov
Tested-by: Florian Fainelli
---
net/bridge/br_vlan.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/net/bridge/br_vlan.c b/net/bridge
Ignore VLAN events where the orig_dev is the bridge device itself.
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
Ignore VLAN events where the orig_dev is the bridge device itself.
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
#x27;t adapt 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(-
Ignore VLAN events where the orig_dev is the bridge device itself.
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
del calls.
Thus to remove the duplication, extract the repetition into named
functions and reuse.
Signed-off-by: Petr Machata
---
net/bridge/br_private.h | 13 +
net/bridge/br_switchdev.c | 25 +
net/bridge/br_vlan.c | 31
from v1 to v2:
- 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:
Petr Machata 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(struct
> sk_buff *s
Ignore VLAN events where the orig_dev is the bridge device itself.
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
#x27;t adapt 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(-
port or a bridge.
Signed-off-by: Petr Machata
Reviewed-by: Florian Fainelli
Reviewed-by: Vivien Didelot
Reviewed-by: Nikolay Aleksandrov
Tested-by: Florian Fainelli
---
net/bridge/br_vlan.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/net/bridge/br_vlan.c b/net/bridge
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 VLAN events
rocker: rocker_main: Ignore bridge VLAN events
dsa: port: Ignore bridge VLAN events
staging: fsl-dpaa2: ethsw: Ignore
Ignore VLAN events where the orig_dev is the bridge device itself.
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
del calls.
Thus to remove the duplication, extract the repetition into named
functions and reuse.
Signed-off-by: Petr Machata
---
net/bridge/br_private.h | 3 +++
net/bridge/br_switchdev.c | 25 +
net/bridge/br_vlan.c | 31 ---
3 files
Ignore VLAN events where the orig_dev is the bridge device itself.
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
Ignore VLAN events where the orig_dev is the bridge device itself.
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
Vivien Didelot writes:
> Hi Petr,
>
> Petr Machata writes:
>
>> Vivien Didelot writes:
>>
>>>> + } else {
>>>> + err = br_switchdev_port_obj_add(dev, v->vid, flags);
>>>> + if (err && err != -EOPN
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 flags arguments
> seems confusing to me,
Vivien Didelot writes:
> Hi Petr,
>
> Petr Machata writes:
>
>> -static int __vlan_vid_add(struct net_device *dev, struct net_bridge *br,
>> - u16 vid, u16 flags)
>> +static int br_switchdev_port_obj_add(struct net_device *dev, u16 vid, u16
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 CPU port.
I missed this
ation is actually 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
Ignore VLAN events where the orig_dev is the bridge device itself.
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
Ignore VLAN events where the orig_dev is the bridge device itself.
Signed-off-by: Petr Machata
---
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
port or a bridge.
Signed-off-by: Petr Machata
---
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
@@ -268,6 +268,10 @@ static
Ignore VLAN events where the orig_dev is the bridge device itself.
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
#x27;t adapt 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(-
Ignore VLAN events where the orig_dev is the bridge device itself.
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
del calls.
Thus to remove the duplication, extract the repetition into named
functions and reuse.
Signed-off-by: Petr Machata
---
net/bridge/br_vlan.c | 44 +++-
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/net/bridge/br_vlan.c b/net
63 matches
Mail list logo