[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181205154958.20262-1-idosch@mellanox.com>
Date: Wed, 5 Dec 2018 15:50:22 +0000
From: Ido Schimmel <idosch@...lanox.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bridge@...ts.linux-foundation.org"
<bridge@...ts.linux-foundation.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
Jiri Pirko <jiri@...lanox.com>,
Petr Machata <petrm@...lanox.com>,
"roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
"nikolay@...ulusnetworks.com" <nikolay@...ulusnetworks.com>,
mlxsw <mlxsw@...lanox.com>, Ido Schimmel <idosch@...lanox.com>
Subject: [PATCH net-next 00/12] mlxsw: Un/offload FDB on NVE detach/attach
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
netdevice is detached from the bridge that the VXLAN device is attached
to), any offloaded FDB entries need to be unoffloaded and unmarked. This
attach / detach processing is implemented in this patchset.
In patch #1, a code pattern is extracted into a named function for
easier reuse.
In patch #2, vxlan_fdb_replay() is added to send
SWITCHDEV_VXLAN_FDB_ADD_TO_DEVICE for each FDB entry with a given VNI.
The intention is that the offloading driver will interpret these events
like any other and thus offload the FDB entries that existed prior to
VXLAN attach.
In patches #3 and #4, the functions vxlan_fdb_clear_offload() resp.
br_fdb_clear_offload() are added. These clear the offloaded flag at
matching FDB entries.
In patches #5-#9, we introduce FID-type-specific and NVE-type-specific
ops necessary to properly abstract invocations of the replay/clear
functions.
Finally patch #10 implements 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 case for VXLAN with VLAN-aware
bridges
Petr Machata (11):
vxlan: Add a function to init switchdev_notifier_vxlan_fdb_info
vxlan: Add vxlan_fdb_replay()
vxlan: Add vxlan_fdb_clear_offload()
bridge: Add br_fdb_clear_offload()
mlxsw: spectrum: Track NVE type at FIDs
mlxsw: spectrum_switchdev: Publish mlxsw_sp_switchdev_notifier
mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_replay
mlxsw: spectrum_nve: Add mlxsw_sp_nve_ops.fdb_clear_offload
mlxsw: spectrum: Add mlxsw_sp_fid_ops.fdb_clear_offload
mlxsw: spectrum_nve: Un/offload FDB on nve_fid_disable/enable
selftests: mlxsw: vxlan: Test FDB un/marking on VXLAN join/leave
.../net/ethernet/mellanox/mlxsw/spectrum.h | 16 +-
.../ethernet/mellanox/mlxsw/spectrum_fid.c | 44 ++++-
.../ethernet/mellanox/mlxsw/spectrum_nve.c | 44 ++++-
.../ethernet/mellanox/mlxsw/spectrum_nve.h | 2 +
.../mellanox/mlxsw/spectrum_nve_vxlan.c | 20 ++
.../mellanox/mlxsw/spectrum_switchdev.c | 2 +-
drivers/net/vxlan.c | 114 ++++++++---
include/linux/if_bridge.h | 6 +
include/net/vxlan.h | 15 ++
net/bridge/br_fdb.c | 20 ++
.../selftests/drivers/net/mlxsw/vxlan.sh | 177 ++++++++++++++++++
.../net/forwarding/vxlan_bridge_1q.sh | 70 +++++++
12 files changed, 499 insertions(+), 31 deletions(-)
--
2.19.1
Powered by blists - more mailing lists