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

2018-12-07 Thread David Miller
From: Ido Schimmel Date: Fri, 7 Dec 2018 19:55:01 + > Petr says: > > When a VXLAN device is attached to a bridge of a driver capable of > offloading such, or upped, the FDB entries already present at the device > need to be offloaded. Similarly when an offloaded VXLAN device ceases > being

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata When a VXLAN device is attached to an offloaded bridge, or when a front-panel port is attached to a bridge that already has a VXLAN device, mlxsw should offload the existing offloadable FDB entries. Similarly when VXLAN device is downed, the FDB entries are unoffloaded, and

[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
When using VLAN-aware bridges with VXLAN, the VLAN that is mapped to the VNI of the VXLAN device is that which is configured as "pvid untagged" on the corresponding bridge port. When these flags are toggled or when the VLAN is deleted entirely, remote hosts should not be able to receive packets

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata Any existing NVE FDB entries need to be offloaded when NVE is enabled for a given FID. Recent patches have added fdb_replay op for this, so just invoke it from mlxsw_sp_nve_fid_enable(). When NVE is disabled on a FID, any existing FDB offloaded marks need to be cleared on NVE

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata If there are any offloaded FDB entries at bridge master of an NVE device at the time that it's un-offloaded, their offloaded marks need to be cleared. How that is done depends on whether the bridge in question is vlan aware. Therefore add a per-FID-type operation. Implement

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata If there are any offloaded FDB entries at an NVE device at the time that it's un-offloaded, their offloaded marks need to be cleared. How that is done depends on NVE device type, and therefore add a per-NVE-type operation. Implement the operation for the sole NVE device type

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata A replay of FDB needs to be performed so that the FDB entries existing at the NVE device are offloaded. How the replay is done depends on NVE device type, and therefore add a per-NVE-type operation. Implement the operation for the sole NVE device type currently supported by

[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
From: Petr Machata A follow-up patch will add support for replay and for clearing of offload marks. These are NVE type-sensitive operations, and to be able to dispatch them properly, a FID needs to know what NVE type is attached to it. Therefore, track the NVE type at struct mlxsw_sp_fid.

[Bridge] [PATCH net-next v2 04/12] bridge: Add br_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 unsets the offload flag on FDB entries on a given bridge port and VLAN. Signed-off-by: Petr Machata Acked-by: Nikolay Aleksandrov

[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 ---

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata When a VXLAN device becomes relevant to a driver (such as when it is attached to an offloaded bridge), the driver will generally need to walk the existing FDB entries and offload them. Add a function vxlan_fdb_replay() to call a given notifier block for each FDB entry with a

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

2018-12-07 Thread Ido Schimmel
From: Petr Machata There are currently two places that need to initialize the notifier info structure, and one more is coming next when vxlan_fdb_replay() is introduced. These three instances have / will have very similar code that is easy to abstract away into a named function. Add such

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

2018-12-07 Thread Ido Schimmel
Petr says: When a VXLAN device is attached to a bridge of a driver capable of offloading such, or upped, the FDB entries already present at the device need to be offloaded. Similarly when an offloaded VXLAN device ceases being interesting (it is downed, or detached, or a front-panel port