Re: [Bridge] [PATCH net-next v4] Documentation: networking: Clarify switchdev devices behavior

2019-01-11 Thread Ido Schimmel
On Thu, Jan 10, 2019 at 11:32:06AM -0800, Florian Fainelli wrote: > This patch provides details on the expected behavior of switchdev > enabled network devices when operating in a "stand alone" mode, as well > as when being bridge members. This clarifies a number of things that > recently came up

[Bridge] [PATCH net 08/11] net: bridge: Fix VLANs memory leak

2019-01-08 Thread Ido Schimmel
k_rcv_skb+0x152/0x3c0 [<8be8d614>] rtnetlink_rcv+0x21/0x30 [<9ab2ca25>] netlink_unicast+0x52f/0x740 [<e7d9ac96>] netlink_sendmsg+0x9c7/0xf50 [<5d1e2050>] sock_sendmsg+0xbe/0x120 [<0000d51426bc>] ___sys_sendmsg+0x778/0x8f0

Re: [Bridge] [PATCH net-next v2] Documentation: networking: Clarify switchdev devices behavior

2019-01-04 Thread Ido Schimmel
On Thu, Jan 03, 2019 at 02:47:02PM -0800, Florian Fainelli wrote: > +A switchdev driver can also refuse to support dynamic toggling of the VLAN > +filtering knob at runtime and require a destruction of the bridge device(s) > and > +a creation of new bridge device(s) with a different VLAN

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-22 Thread Ido Schimmel
On Tue, Dec 18, 2018 at 12:13:38PM -0800, Florian Fainelli wrote: > On 12/17/18 11:01 PM, Ido Schimmel wrote: > > On Sun, Dec 16, 2018 at 09:14:09AM -0800, Florian Fainelli wrote: > >> Le 12/16/18 à 12:25 AM, Ido Schimmel a écrit : > >>> On Wed, Dec 12, 2018 at 03:0

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-17 Thread Ido Schimmel
On Sun, Dec 16, 2018 at 09:14:09AM -0800, Florian Fainelli wrote: > Le 12/16/18 à 12:25 AM, Ido Schimmel a écrit : > > On Wed, Dec 12, 2018 at 03:09:43PM -0800, Florian Fainelli wrote: > >> +Non-bridged network ports of the same switch fabric must not be disturbed > >&

Re: [Bridge] [PATCH net-next] Documentation: networking: Clarify switchdev devices behavior

2018-12-16 Thread Ido Schimmel
On Wed, Dec 12, 2018 at 03:09:43PM -0800, Florian Fainelli wrote: > This patch provides details on the expected behavior of switchdev > enabled network devices when operating in a "stand alone" mode, as well > as when being bridge members. This clarifies a number of things that > recently came up

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-15 Thread Ido Schimmel
On Sat, Dec 15, 2018 at 10:10:32AM -0800, Florian Fainelli wrote: > Le 12/12/18 à 1:02 AM, Ido Schimmel a écrit : > > On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: > >> Hi Nikolay, Roopa, Jiri, Ido, > >> > >> When a bridge has vlan_filt

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-15 Thread Ido Schimmel
On Wed, Dec 12, 2018 at 11:52:08AM -0800, Florian Fainelli wrote: > On 12/12/18 1:02 AM, Ido Schimmel wrote: > > On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: > >> Hi Nikolay, Roopa, Jiri, Ido, > >> > >> When a bridge has vlan_filtering=0

Re: [Bridge] Correct PVID behavior with bridge's VLAN filtering on/off?

2018-12-12 Thread Ido Schimmel
On Tue, Dec 11, 2018 at 11:48:21AM -0800, Florian Fainelli wrote: > Hi Nikolay, Roopa, Jiri, Ido, > > When a bridge has vlan_filtering=0 and notifies a switch driver through > HOST_OBJ_MDB about MC addresses that the CPU/management port is > interested in getting MC traffic for, I am seeing that

[Bridge] [PATCH net-next v2 11/12] selftests: mlxsw: vxlan: Test FDB un/marking on VXLAN join/leave

2018-12-07 Thread Ido Schimmel
under different scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/vxlan.sh | 177 ++ 1 file changed, 177 insertions(+) diff --git a/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh b/tools/testing/selftests/drivers

[Bridge] [PATCH net-next v2 12/12] selftests: forwarding: Add PVID test case for VXLAN with VLAN-aware bridges

2018-12-07 Thread Ido Schimmel
ve packets from the VTEP. Add a test case for above mentioned scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwarding/vxlan_bridge_1q.sh | 70 +++ 1 file changed, 70 insertions(+) diff --git a/tools/testing/selftests/net/

[Bridge] [PATCH net-next v2 10/12] mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable

2018-12-07 Thread Ido Schimmel
device as well as on its bridge master. An op to handle this, fdb_clear_offload, has been added to FID ops and NVE ops in previous patches. Add code to resolve the NVE device, NVE type, and dispatch to both fdb_clear_offload ops. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel

[Bridge] [PATCH net-next v2 09/12] mlxsw: spectrum: Add mlxsw_sp_fid_ops.fdb_clear_offload

2018-12-07 Thread Ido Schimmel
the operation for the 802.1q and 802.1d bridges. Add and publish a function mlxsw_sp_fid_fdb_clear_offload() to dispatch to the new operation according to FID type. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 2 ++ .../ethernet

[Bridge] [PATCH net-next v2 08/12] mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload

2018-12-07 Thread Ido Schimmel
currently supported by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/net

[Bridge] [PATCH net-next v2 07/12] mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_replay

2018-12-07 Thread Ido Schimmel
by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[Bridge] [PATCH net-next v2 06/12] mlxsw: spectrum_switchdev: Publish mlxsw_sp_switchdev_notifier

2018-12-07 Thread Ido Schimmel
From: Petr Machata The notifier block will need to be passed to vxlan_fdb_replay() in a follow-up patch. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2

[Bridge] [PATCH net-next v2 05/12] mlxsw: spectrum: Track NVE type at FIDs

2018-12-07 Thread Ido Schimmel
. Extend mlxsw_sp_fid_vni_set() to take it as an argument, and add mlxsw_sp_fid_nve_type(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 13 - .../net/ethernet/mellanox/mlxsw/spectrum_fid.c | 16 +++- .../net

[Bridge] [PATCH net-next v2 04/12] bridge: Add br_fdb_clear_offload()

2018-12-07 Thread Ido Schimmel
-by: Ido Schimmel --- include/linux/if_bridge.h | 6 ++ net/bridge/br_fdb.c | 20 2 files changed, 26 insertions(+) diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index ef7c3d376b21..627b788ba0ff 100644 --- a/include/linux/if_bridge.h +++ b

[Bridge] [PATCH net-next v2 03/12] vxlan: Add vxlan_fdb_clear_offload()

2018-12-07 Thread Ido Schimmel
From: Petr Machata When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that walks the FDB table, unsetting the offload flag on RDST with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers

[Bridge] [PATCH net-next v2 02/12] vxlan: Add vxlan_fdb_replay()

2018-12-07 Thread Ido Schimmel
with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 47 + include/net/vxlan.h | 9 + 2 files changed, 56 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index d3db0313c97e

[Bridge] [PATCH net-next v2 01/12] vxlan: Add a function to init switchdev_notifier_vxlan_fdb_info

2018-12-07 Thread Ido Schimmel
such function, vxlan_fdb_switchdev_notifier_info(), and call it from vxlan_fdb_switchdev_call_notifiers() and vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions

[Bridge] [PATCH net-next v2 00/12] mlxsw: Un/offload FDB on NVE detach/attach

2018-12-07 Thread Ido Schimmel
vxlan_fdb_switchdev_notifier_info() to initialize the structure through a passed-in pointer argument, instead of returning it as a value. - Patch #2: - Adapt to API change in vxlan_fdb_switchdev_notifier_info() Ido Schimmel (1): selftests: forwarding: Add PVID test case for VXLAN with VLAN-aware bridges

[Bridge] [PATCH net-next 11/12] selftests: mlxsw: vxlan: Test FDB un/marking on VXLAN join/leave

2018-12-05 Thread Ido Schimmel
under different scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../selftests/drivers/net/mlxsw/vxlan.sh | 177 ++ 1 file changed, 177 insertions(+) diff --git a/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh b/tools/testing/selftests/drivers

[Bridge] [PATCH net-next 10/12] mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable

2018-12-05 Thread Ido Schimmel
device as well as on its bridge master. An op to handle this, fdb_clear_offload, has been added to FID ops and NVE ops in previous patches. Add code to resolve the NVE device, NVE type, and dispatch to both fdb_clear_offload ops. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel

[Bridge] [PATCH net-next 09/12] mlxsw: spectrum: Add mlxsw_sp_fid_ops.fdb_clear_offload

2018-12-05 Thread Ido Schimmel
the operation for the 802.1q and 802.1d bridges. Add and publish a function mlxsw_sp_fid_fdb_clear_offload() to dispatch to the new operation according to FID type. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 2 ++ .../ethernet

[Bridge] [PATCH net-next 08/12] mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload

2018-12-05 Thread Ido Schimmel
currently supported by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/net

[Bridge] [PATCH net-next 12/12] selftests: forwarding: Add PVID test case for VXLAN with VLAN-aware bridges

2018-12-05 Thread Ido Schimmel
ve packets from the VTEP. Add a test case for above mentioned scenarios. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- .../net/forwarding/vxlan_bridge_1q.sh | 70 +++ 1 file changed, 70 insertions(+) diff --git a/tools/testing/selftests/net/

[Bridge] [PATCH net-next 03/12] vxlan: Add vxlan_fdb_clear_offload()

2018-12-05 Thread Ido Schimmel
From: Petr Machata When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that walks the FDB table, unsetting the offload flag on RDST with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers

[Bridge] [PATCH net-next 06/12] mlxsw: spectrum_switchdev: Publish mlxsw_sp_switchdev_notifier

2018-12-05 Thread Ido Schimmel
From: Petr Machata The notifier block will need to be passed to vxlan_fdb_replay() in a follow-up patch. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 2

[Bridge] [PATCH net-next 02/12] vxlan: Add vxlan_fdb_replay()

2018-12-05 Thread Ido Schimmel
with a given VNI. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 47 + include/net/vxlan.h | 9 + 2 files changed, 56 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index fe5cd22e4b4d

[Bridge] [PATCH net-next 07/12] mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_replay

2018-12-05 Thread Ido Schimmel
by mlxsw, VXLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.h | 1 + .../net/ethernet/mellanox/mlxsw/spectrum_nve_vxlan.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw

[Bridge] [PATCH net-next 05/12] mlxsw: spectrum: Track NVE type at FIDs

2018-12-05 Thread Ido Schimmel
. Extend mlxsw_sp_fid_vni_set() to take it as an argument, and add mlxsw_sp_fid_nve_type(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 13 - .../net/ethernet/mellanox/mlxsw/spectrum_fid.c | 16 +++- .../net

[Bridge] [PATCH net-next 04/12] bridge: Add br_fdb_clear_offload()

2018-12-05 Thread Ido Schimmel
From: Petr Machata When a driver unoffloads all FDB entries en bloc, it's inefficient to send the switchdev notification one by one. Add a helper that unsets the offload flag on FDB entries on a given bridge port and VLAN. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- include

[Bridge] [PATCH net-next 00/12] mlxsw: Un/offload FDB on NVE detach/attach

2018-12-05 Thread Ido Schimmel
the FDB management. In patch #11, the mlxsw-specific test case is extended to check that the management of offload marks under the newly-supported situations is correct. Patch #12, from Ido, exercises the new code paths in actual functional test. Ido Schimmel (1): selftests: forwarding: Add PVID test

[Bridge] [PATCH net-next 01/12] vxlan: Add a function to init switchdev_notifier_vxlan_fdb_info

2018-12-05 Thread Ido Schimmel
such function, vxlan_fdb_switchdev_notifier_info(), and call it from vxlan_fdb_switchdev_call_notifiers() and vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 45 ++--- 1 file changed, 22 insertions(+), 23

[Bridge] [PATCH net-next 6/8] selftests: mlxsw: Consider VLAN-aware bridges as valid

2018-11-28 Thread Ido Schimmel
Previous patches add the ability to work with VLAN-aware bridges and VxLAN devices, so make sure such configuration no longer fails. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- tools/testing/selftests/drivers/net/mlxsw/vxlan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Bridge] [PATCH net-next 4/8] mlxsw: spectrum_switchdev: Prepare function for VLAN-aware bridges

2018-11-28 Thread Ido Schimmel
bridges the FID would need to be resolved based on the VLAN to which the VNI is mapped to. Add the VLAN ID to the argument list of the function. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++-- drivers/net/ethernet/mellanox

[Bridge] [PATCH net-next 5/8] mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges

2018-11-28 Thread Ido Schimmel
N is added to / removed from a VxLAN device of interest. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 45 ++- .../net/ethernet/mellanox/mlxsw/spectrum.h| 21 ++ .../mellanox/mlxsw/spectrum_switchdev.c | 352 +

[Bridge] [PATCH net-next 7/8] selftests: mlxsw: Add a test for VxLAN configuration with a VLAN-aware bridge

2018-11-28 Thread Ido Schimmel
Extend the existing VLAN-unaware tests with their VLAN-aware counterparts. This includes sanitization of invalid configuration and offload indication on the local route performing decapsulation and the FDB entries perform encapsulation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata

[Bridge] [PATCH net-next 2/8] mlxsw: spectrum_fid: Add API to lookup 802.1Q FIDs without creating them

2018-11-28 Thread Ido Schimmel
FDB entry is added on the bridge port of the VxLAN device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 6 ++ drivers/net/ethernet/mellanox/mlxsw/spectrum_s

[Bridge] [PATCH net-next 3/8] mlxsw: spectrum_switchdev: Unify VxLAN leave function

2018-11-28 Thread Ido Schimmel
the FID differently for VLAN-aware and VLAN-unaware bridges, we can always use the VxLAN's device VNI. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.c| 4 +- .../net/ethernet/mellanox/mlxsw/spectrum.h| 1 - .../mellanox/mlxsw

[Bridge] [PATCH net-next 1/8] net: bridge: Extend br_vlan_get_pvid() for bridge ports

2018-11-28 Thread Ido Schimmel
Currently, the function only works for the bridge device itself, but subsequent patches will need to be able to query the PVID of a given bridge port, so extend the function. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- net/bridge/br_vlan.c | 6 +- 1 file changed, 5 insertions

[Bridge] [PATCH net-next 0/8] mlxsw: Add VxLAN support with VLAN-aware bridges

2018-11-28 Thread Ido Schimmel
VLAN-aware bridge. Patches #6-#8 add selftests to test the new functionality. Ido Schimmel (8): net: bridge: Extend br_vlan_get_pvid() for bridge ports mlxsw: spectrum_fid: Add API to lookup 802.1Q FIDs without creating them mlxsw: spectrum_switchdev: Unify VxLAN leave functi

[Bridge] [PATCH net-next 13/16] mlxsw: spectrum_switchdev: Allow deletion of learned FDB entries

2018-11-21 Thread Ido Schimmel
Allow users to delete learned FDB entries from the bridge's FDB before enabling VxLAN learning. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net

[Bridge] [PATCH net-next 16/16] selftests: forwarding: vxlan_bridge_1d: Add learning test

2018-11-21 Thread Ido Schimmel
Add a test which checks that the VxLAN driver can learn FDB entries and that these entries are correctly deleted and aged-out. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/forwarding/vxlan_bridge_1d.sh | 108 ++ 1 file changed, 108 insertions

[Bridge] [PATCH net-next 15/16] selftests: mlxsw: Consider VxLAN learning enabled as valid

2018-11-21 Thread Ido Schimmel
The test currently expects that a configuration which includes a VxLAN device with learning enabled to fail. Previous patches enabled VxLAN learning in mlxsw, so change the test accordingly. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- tools/testing/selftests/drivers/net/mlxsw

[Bridge] [PATCH net-next 14/16] mlxsw: spectrum_nve: Allow VxLAN learning

2018-11-21 Thread Ido Schimmel
Up until now the driver returned an error when learning was enabled on a VxLAN device enslaved to an offloaded bridge. Previous patches added VxLAN learning support, so remove the check. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw

[Bridge] [PATCH net-next 11/16] mlxsw: spectrum_nve: Add API to resolve learned IP addresses

2018-11-21 Thread Ido Schimmel
. Only IPv4 underlay is currently supported, so we cannot receive notifications for IPv6 addresses and therefore an error is returned when one tries to resolve such an address. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 3

[Bridge] [PATCH net-next 12/16] mlxsw: spectrum_switchdev: Process learned VxLAN FDB entries

2018-11-21 Thread Ido Schimmel
/ delete the entry to / from its database. The driver also makes sure to notify the bridge and VxLAN drivers about the new entry. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_switchdev.c | 203 -- 1 file changed, 189 insertions

[Bridge] [PATCH net-next 09/16] mlxsw: spectrum_fid: Store ifindex of NVE device in FID

2018-11-21 Thread Ido Schimmel
in the VxLAN and bridge drivers, the driver needs to generate a notification and update them about the new FDB entry. Store the ifindex of the NVE device in the FID so that the driver will be able to update the VxLAN and bridge drivers using it. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata

[Bridge] [PATCH net-next 10/16] mlxsw: spectrum_fid: Allow FID lookup by its index

2018-11-21 Thread Ido Schimmel
. These two parameters are stored in the FID, so add a new function that allows looking up a FID based on its index. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 2 + .../ethernet/mellanox/mlxsw/spectrum_fid.c| 42

[Bridge] [PATCH net-next 07/16] bridge: Allow querying bridge port flags

2018-11-21 Thread Ido Schimmel
Allow querying bridge port flags so that drivers capable of performing VxLAN learning will update the bridge driver only if learning is enabled on its bridge port corresponding to the VxLAN device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- include/linux/if_bridge.h | 6

[Bridge] [PATCH net-next 08/16] mlxsw: reg: Add definition of unicast tunnel record for SFN register

2018-11-21 Thread Ido Schimmel
Will be used to process learned FDB records from an NVE tunnel. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/reg.h | 64 +++ 1 file changed, 64 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers

[Bridge] [PATCH net-next 06/16] vxlan: Allow changing ageing time

2018-11-21 Thread Ido Schimmel
for a simple selftest. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/vxlan.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 03ba1b56ba6d..911066299a83 100644 --- a/drivers/net/vxlan.c +++ b/drivers

[Bridge] [PATCH net-next 05/16] vxlan: Add hardware FDB learning

2018-11-21 Thread Ido Schimmel
an NTF_EXT_LEARNED flag, and only entries marked as such can be unlearned by the _DEL_ event. They are also immediately marked as offloaded. This is the same behavior that the bridge driver observes. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 73

[Bridge] [PATCH net-next 03/16] vxlan: Mark user-added FDB entries

2018-11-21 Thread Ido Schimmel
bits and add a new private NTF flag to mark the user-added entries. This seems preferable to adding a dedicated boolean, because passing the flag, unlike passing e.g. a true, makes it clear what the meaning of the bit is. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net

[Bridge] [PATCH net-next 04/16] vxlan: Don't override user-added entries with ext-learned ones

2018-11-21 Thread Ido Schimmel
for these cases. This is in accordance with the bridge behavior. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9171c1f42fe9

[Bridge] [PATCH net-next 02/16] vxlan: vxlan_fdb_notify(): Make switchdev notification configurable

2018-11-21 Thread Ido Schimmel
whether the switchdev notifications should be sent. Propagate the argument to all call sites transitively, eventually passing true in all root calls. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 71 ++--- 1 file changed, 41

[Bridge] [PATCH net-next 01/16] vxlan: __vxlan_fdb_delete(): Drop unused argument vid

2018-11-21 Thread Ido Schimmel
From: Petr Machata This argument is necessary for vxlan_fdb_delete(), the API of which is prescribed by ndo_fdb_del, but __vxlan_fdb_delete() doesn't need it. Therefore drop it. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 7 +++ 1 file changed, 3

[Bridge] [PATCH net-next 00/16] mlxsw: Add VxLAN learning support

2018-11-21 Thread Ido Schimmel
and notified to the bridge driver in case learning is disabled on the bridge port. Next patches gradually add learning support in mlxsw. The last patch adds a new test case for VxLAN learning. Ido Schimmel (11): vxlan: Allow changing ageing time bridge: Allow querying bridge port flags

[Bridge] [PATCH net-next v2 18/18] mlxsw: spectrum_switchdev: Add support for VxLAN encapsulation

2018-10-17 Thread Ido Schimmel
hitting the entry will only be flooded by the kernel to remote VTEPs whereas the device will also flood the packets to other local ports member in the VLAN. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_switchdev.c | 406 +- 1 file

[Bridge] [PATCH net-next v2 17/18] mlxsw: spectrum: Enable VxLAN enslavement to bridges

2018-10-17 Thread Ido Schimmel
, the driver makes sure to enable / disable these functionalities based on NETDEV_PRE_UP and NETDEV_DOWN events. Note that NETDEV_PRE_UP is used in favor of NETDEV_UP, as the former allows to veto the operation, if necessary. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net

[Bridge] [PATCH net-next v2 16/18] bridge: switchdev: Allow clearing FDB entry offload indication

2018-10-17 Thread Ido Schimmel
. Therefore, bridge FDB entries pointing to a VxLAN device are only offloaded if there is a corresponding entry in the VxLAN FDB. Allow clearing the offload indication in case the corresponding entry was deleted from the VxLAN FDB. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata

[Bridge] [PATCH net-next v2 15/18] vxlan: Notify for each remote of a removed FDB entry

2018-10-17 Thread Ido Schimmel
the FDB entry is removed as a whole. Therefore send one notification for each remote of a removed FDB entry. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net

[Bridge] [PATCH net-next v2 14/18] vxlan: Support marking RDSTs as offloaded

2018-10-17 Thread Ido Schimmel
mark them with NTF_OFFLOADED. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 59 - include/net/switchdev.h | 1 + include/net/vxlan.h | 2 ++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/drivers/net

[Bridge] [PATCH net-next v2 13/18] vxlan: Add vxlan_fdb_find_uc() for FDB querying

2018-10-17 Thread Ido Schimmel
specifically UC FDBs: vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 40 include/net/vxlan.h | 12 2 files changed, 52 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c

[Bridge] [PATCH net-next v2 11/18] net: Add netif_is_vxlan()

2018-10-17 Thread Ido Schimmel
to configure the underlying device when a VxLAN netdev is being enslaved to an offloaded bridge. Convert nfp to use the newly introduced helper. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 3 ++- include/net/vxlan.h

[Bridge] [PATCH net-next v2 10/18] mlxsw: spectrum_router: Configure matching local routes for NVE decap

2018-10-17 Thread Ido Schimmel
decap" where existing local routes were promoted to perform NVE decapsulation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/mell

[Bridge] [PATCH net-next v2 09/18] mlxsw: spectrum_fid: Clear NVE configuration when destroying 802.1D FIDs

2018-10-17 Thread Ido Schimmel
destroying the FID make sure to disable its NVE configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c b/drivers/net

[Bridge] [PATCH net-next v2 08/18] mlxsw: spectrum_nve: Implement VxLAN operations

2018-10-17 Thread Ido Schimmel
initialization for this type. Implement these operations for VxLAN on the Spectrum ASIC. Spectrum-2 support will be added by a future patchset. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_nve_vxlan.c | 190 +- 1 file changed, 188 insertions

[Bridge] [PATCH net-next v2 06/18] inet: Refactor INET_ECN_decapsulate()

2018-10-17 Thread Ido Schimmel
the device. Signed-off-by: Ido Schimmel Suggested-by: Petr Machata Reviewed-by: Petr Machata --- include/net/inet_ecn.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 482a1b705362..c8e2bebd8d93 100644

[Bridge] [PATCH net-next v2 05/18] vxlan: Export address checking functions

2018-10-17 Thread Ido Schimmel
the functions that perform such checks. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/vxlan.c | 26 -- include/net/vxlan.h | 32 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/drivers/net/vxlan.c b

[Bridge] [PATCH net-next v2 02/18] mlxsw: spectrum_fid: Add APIs to lookup FID without creating it

2018-10-17 Thread Ido Schimmel
, but without creating it in order to catch above-mentioned situation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 4 ++ .../ethernet/mellanox/mlxsw/spectrum_fid.c| 45 --- 2 files changed, 44 insertions(+), 5

[Bridge] [PATCH net-next v2 01/18] mlxsw: spectrum_fid: Allow setting and clearing NVE properties on FID

2018-10-17 Thread Ido Schimmel
struct. Since the device requires a 1:1 mapping between FID and VNI, the driver maintains a hashtable keyed by VNI and checks if the VNI is already associated with an existing FID. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 8

[Bridge] [PATCH net-next 18/18] mlxsw: spectrum_switchdev: Add support for VxLAN encapsulation

2018-10-13 Thread Ido Schimmel
hitting the entry will only be flooded by the kernel to remote VTEPs whereas the device will also flood the packets to other local ports member in the VLAN. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_switchdev.c | 406 +- 1 file

[Bridge] [PATCH net-next 17/18] mlxsw: spectrum: Enable VxLAN enslavement to bridges

2018-10-13 Thread Ido Schimmel
, the driver makes sure to enable / disable these functionalities based on NETDEV_PRE_UP and NETDEV_DOWN events. Note that NETDEV_PRE_UP is used in favor of NETDEV_UP, as the former allows to veto the operation, if necessary. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net

[Bridge] [PATCH net-next 15/18] vxlan: Notify for each remote of a removed FDB entry

2018-10-13 Thread Ido Schimmel
the FDB entry is removed as a whole. Therefore send one notification for each remote of a removed FDB entry. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net

[Bridge] [PATCH net-next 16/18] bridge: switchdev: Allow clearing FDB entry offload indication

2018-10-13 Thread Ido Schimmel
. Therefore, bridge FDB entries pointing to a VxLAN device are only offloaded if there is a corresponding entry in the VxLAN FDB. Allow clearing the offload indication in case the corresponding entry was deleted from the VxLAN FDB. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata

[Bridge] [PATCH net-next 12/18] vxlan: Add switchdev notifications

2018-10-13 Thread Ido Schimmel
function from vxlan_fdb_notify(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 46 +++-- include/net/switchdev.h | 3 +++ include/net/vxlan.h | 11 ++ 3 files changed, 58 insertions(+), 2 deletions

[Bridge] [PATCH net-next 13/18] vxlan: Add vxlan_fdb_find_uc() for FDB querying

2018-10-13 Thread Ido Schimmel
specifically UC FDBs: vxlan_fdb_find_uc(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel --- drivers/net/vxlan.c | 40 include/net/vxlan.h | 12 2 files changed, 52 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c

[Bridge] [PATCH net-next 08/18] mlxsw: spectrum_nve: Implement VxLAN operations

2018-10-13 Thread Ido Schimmel
initialization for this type. Implement these operations for VxLAN on the Spectrum ASIC. Spectrum-2 support will be added by a future patchset. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../mellanox/mlxsw/spectrum_nve_vxlan.c | 190 +- 1 file changed, 188 insertions

[Bridge] [PATCH net-next 09/18] mlxsw: spectrum_fid: Clear NVE configuration when destroying 802.1D FIDs

2018-10-13 Thread Ido Schimmel
destroying the FID make sure to disable its NVE configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_fid.c b/drivers/net

[Bridge] [PATCH net-next 11/18] vxlan: Add netif_is_vxlan()

2018-10-13 Thread Ido Schimmel
to configure the underlying device when a VxLAN netdev is being enslaved to an offloaded bridge. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/vxlan.c | 1 + include/linux/netdevice.h | 8 2 files changed, 9 insertions(+) diff --git a/drivers/net/vxlan.c b

[Bridge] [PATCH net-next 07/18] mlxsw: spectrum_nve: Implement common NVE core

2018-10-13 Thread Ido Schimmel
) and the addition of remote VTEPs to the linked-list of VTEPs that traffic should be flooded to. Implement this common core and allow different ASICs to register different operations for different encapsulation types. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net

[Bridge] [PATCH net-next 06/18] inet: Refactor INET_ECN_decapsulate()

2018-10-13 Thread Ido Schimmel
the device. Signed-off-by: Ido Schimmel Suggested-by: Petr Machata Reviewed-by: Petr Machata --- include/net/inet_ecn.h | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/net/inet_ecn.h b/include/net/inet_ecn.h index 482a1b705362..c8e2bebd8d93 100644

[Bridge] [PATCH net-next 04/18] mlxsw: spectrum_router: Allow querying VR ID based on table ID

2018-10-13 Thread Ido Schimmel
the underlay VR where VxLAN encapsulated packets will undergo an L3 lookup. In this case, the kernel's table ID is derived from the VxLAN device's configuration. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++ .../net/ethernet

[Bridge] [PATCH net-next 05/18] vxlan: Export address checking functions

2018-10-13 Thread Ido Schimmel
the functions that perform such checks. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- drivers/net/vxlan.c | 26 -- include/net/vxlan.h | 32 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/drivers/net/vxlan.c b

[Bridge] [PATCH net-next 03/18] mlxsw: spectrum_router: Enable local routes promotion to perform NVE decap

2018-10-13 Thread Ido Schimmel
of the NVE tunnel will be handled in a subsequent patch in the set. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 7 ++ .../ethernet/mellanox/mlxsw/spectrum_router.c | 115 +- 2 files changed, 121 insertions(+), 1

[Bridge] [PATCH net-next 00/18] mlxsw: Add VxLAN support

2018-10-13 Thread Ido Schimmel
allow capable drivers to get a notification about the addition / deletion of FDB entries to / from the VxLAN's FDB. Subsequent patchset will add selftests (generic and mlxsw-specific), data plane learning, FDB extack and vetoing and support for VLAN-aware bridges (one VNI per VxLAN device model). Ido

[Bridge] [PATCH net-next 02/18] mlxsw: spectrum_fid: Add APIs to lookup FID without creating it

2018-10-13 Thread Ido Schimmel
, but without creating it in order to catch above-mentioned situation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 4 ++ .../ethernet/mellanox/mlxsw/spectrum_fid.c| 45 --- 2 files changed, 44 insertions(+), 5

[Bridge] [PATCH net-next 01/18] mlxsw: spectrum_fid: Allow setting and clearing NVE properties on FID

2018-10-13 Thread Ido Schimmel
struct. Since the device requires a 1:1 mapping between FID and VNI, the driver maintains a hashtable keyed by VNI and checks if the VNI is already associated with an existing FID. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata --- .../net/ethernet/mellanox/mlxsw/spectrum.h| 8

Re: [Bridge] [PATCH 1/1] bridge: remove BR_GROUPFWD_RESTRICTED for arbitrary forwarding of reserved addresses

2018-10-01 Thread Ido Schimmel
On Mon, Oct 01, 2018 at 08:54:08PM +0200, Richard Weinberger wrote: > So the only option is having a bridge and transport STP via tc-mirred > or patching the bridge code (what we do right now). And I vote for the first option. I understand it involves more typing, but I see no reason to push more

Re: [Bridge] [PATCH 1/1] bridge: remove BR_GROUPFWD_RESTRICTED for arbitrary forwarding of reserved addresses

2018-10-01 Thread Ido Schimmel
On Mon, Oct 01, 2018 at 08:32:12PM +0200, Richard Weinberger wrote: > Am Montag, 1. Oktober 2018, 20:25:26 CEST schrieb Ido Schimmel: > > On Mon, Oct 01, 2018 at 08:16:22PM +0200, Richard Weinberger wrote: > > > Florian, > > > > > > Am Montag, 1. Oktober

Re: [Bridge] [PATCH 1/1] bridge: remove BR_GROUPFWD_RESTRICTED for arbitrary forwarding of reserved addresses

2018-10-01 Thread Ido Schimmel
On Mon, Oct 01, 2018 at 08:16:22PM +0200, Richard Weinberger wrote: > Florian, > > Am Montag, 1. Oktober 2018, 18:24:25 CEST schrieb Florian Fainelli: > > If all you are doing is forwarding anything, one thing I experimented > > with before is the following: > > > > # tc qdisc add dev eth1

Re: [Bridge] [PATCH net-next 9/9] net: bridge: pack net_bridge better

2018-09-26 Thread Ido Schimmel
On Wed, Sep 26, 2018 at 03:18:02PM +0300, Nikolay Aleksandrov wrote: > Further reduce the size of net_bridge with 8 bytes and reduce the number of > holes in it: > Before: holes: 5, sum holes: 15 > After: holes: 2, sum holes: 3 > > Also as a bonus we get offload_fwd_mark in the first cache line

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

2018-05-29 Thread Ido Schimmel
On Tue, May 29, 2018 at 01:46:09PM +0300, Dan Carpenter wrote: > It occured to me that I should read the cover letter and here are the > answers I was looking for. But the cover letter isn't saved after the > commits are merged. DaveM adds the cover letter to the merge commit.

[Bridge] [PATCH net-next 4/4] mlxsw: spectrum_span: Support VLAN under mirror-to-gretap

2018-05-10 Thread Ido Schimmel
n over vlan-aware bridge where the egress device is phys Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- .../net/ethernet/mellanox/mlxsw/spectrum_span.c| 27 +++--- 1 file changed, 19 insertions(+), 8 deleti

[Bridge] [PATCH net-next 2/4] mlxsw: reg: Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH

2018-05-10 Thread Ido Schimmel
From: Petr Machata <pe...@mellanox.com> Add MLXSW_REG_MPAT_SPAN_TYPE_REMOTE_ETH to support VLAN-encapsulated port mirroring. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/reg.h

[Bridge] [PATCH net-next 1/4] net: bridge: Allow bridge master in br_vlan_get_info()

2018-05-10 Thread Ido Schimmel
asters as well. Signed-off-by: Petr Machata <pe...@mellanox.com> Signed-off-by: Ido Schimmel <ido...@mellanox.com> --- net/bridge/br_vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index df37a5137c25..dc832c0934c6 100644 --- a/net/brid

[Bridge] [PATCH net-next 0/4] mlxsw: Support VLAN devices in mirroring offloads

2018-05-10 Thread Ido Schimmel
Petr says: When offloading "tc action mirred mirror", there are several scenarios where VLAN devices can show up, that mlxsw can offload on Spectrum machines. I) A direct mirror to a VLAN device on top of a front-panel port device (commonly referred to as "RSPAN") II) VLAN device in egress

<    1   2   3   4   5   6   7   >