Skip to content

mlxsw: Handle changes in GRE configuration

Jiri Pirko netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16mlxsw: spectrum: Rename IPIP-related netdevice handlersdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+32 -300 replies
2/16mlxsw: spectrum_router: Extract mlxsw_sp_netdevice_ipip_can_offload()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+15 -50 replies
3/16mlxsw: spectrum: Move mlxsw_sp_ipip_netdev_{s,d}addr{,4}()drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 more+57 -600 replies
4/16mlxsw: spectrum_ipip: Split accessor functionsdrivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h+70 -330 replies
5/16mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_down_event()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+10 -20 replies
6/16mlxsw: spectrum_router: Make mlxsw_sp_netdevice_ipip_ol_up_event() voiddrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+4 -40 replies
7/16mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_up_event()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+14 -90 replies
8/16mlxsw: spectrum: Propagate extack for tunnel eventsdrivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+23 -170 replies
9/16mlxsw: spectrum_router: Extract __mlxsw_sp_ipip_entry_update_tunnel()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+46 -280 replies
10/16mlxsw: spectrum_router: Generalize __mlxsw_sp_ipip_entry_update_tunnel()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+50 -40 replies
11/16mlxsw: spectrum_router: Fix saddr deduction in mlxsw_sp_ipip_entry_create()drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+2 -20 replies
12/16mlxsw: spectrum_router: Onload conflicting tunnelsdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h+60 -210 replies
13/16mlxsw: spectrum: Support IPIP underlay VRF migrationdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+110 -00 replies
14/16mlxsw: spectrum: Handle NETDEV_CHANGE on L3 tunnelsdrivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 more+114 -70 replies
15/16mlxsw: spectrum_ipip: Handle underlay device changedrivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c+3 -20 replies
16/16mlxsw: spectrum_router: Handle down of tunnel underlaydrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+55 -20 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/16R-b
2/16R-b
3/16R-b
4/16R-b
5/16R-b
6/16R-b
7/16R-b
8/16R-b
9/16R-b
10/16R-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch net-next 00/16] mlxsw: Handle changes in GRE configuration

From: Jiri Pirko <[email protected]>

Petr says:

Until now, when an IP tunnel was offloaded by the mlxsw driver, the offload was pretty much static, and changes in Linux configuration were not reflected in the hardware. That led to discrepancies between traffic flows in slow path and fast path. The work-around used to be to remove all routes that forward to the netdevice and re-add them. This is clearly suboptimal, but actually, as of the decap-only patchset, it's not even enough anymore, and one needs to go all the way and simply drop the tunnel and recreate it correctly.

With this patchset, the NETDEV_CHANGE events that are generated for changes of up'd tunnel netdevices are captured and interpreted to correctly reconfigure the HW in accordance with changes requested at the software layer. In addition, NETDEV_CHANGEUPPER, NETDEV_UP and NETDEV_DOWN are now handled not only for tunnel devices themselves, but also for their bound devices. Each change is then translated to one or more of the following updates to the HW configuration:

- refresh of offload of local route that corresponds to tunnel's local address
- refresh of the loopback RIF
- refresh of offloads of routes that forward to the changed tunnel
- removal of tunnel offloads

These tools are used to implement the following configuration changes:

- addition of a new offloadable tunnel with local address that conflicts with that of an already-offloaded tunnel (the existing tunnel is onloaded, the new one isn't offloaded)
- changes to TTL, TOS that make tunnel unsuitable for offloading
- changes to ikey, okey, remote
- changes to local, which when they cause conflict with another tunnel, lead to onloading of both newly-conflicting tunnels
- migration of a bound device of an offloaded tunnel device to a different VRF
- changes to what device is bound to a tunnel device (i.e. like what "ip tunnel change name g dev another" does)
- changes to up / down state of a bound device. A down bound device doesn't forward encapsulated traffic anymore, but decap still works.

This patchset starts with a suite of patches that adapt the existing code base step by step to facilitate introduction of the offloading code. The five substantial patches at the end then implement the changes mentioned above.

Petr Machata (16):
mlxsw: spectrum: Rename IPIP-related netdevice handlers
mlxsw: spectrum_router: Extract mlxsw_sp_netdevice_ipip_can_offload()
mlxsw: spectrum: Move mlxsw_sp_ipip_netdev_{s,d}addr{,4}()
mlxsw: spectrum_ipip: Split accessor functions
mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_down_event()
mlxsw: spectrum_router: Make mlxsw_sp_netdevice_ipip_ol_up_event()
void
mlxsw: spectrum_router: Extract mlxsw_sp_ipip_entry_ol_up_event()
mlxsw: spectrum: Propagate extack for tunnel events
mlxsw: spectrum_router: Extract __mlxsw_sp_ipip_entry_update_tunnel()
mlxsw: spectrum_router: Generalize
__mlxsw_sp_ipip_entry_update_tunnel()
mlxsw: spectrum_router: Fix saddr deduction in
mlxsw_sp_ipip_entry_create()
mlxsw: spectrum_router: Onload conflicting tunnels
mlxsw: spectrum: Support IPIP underlay VRF migration
mlxsw: spectrum: Handle NETDEV_CHANGE on L3 tunnels
mlxsw: spectrum_ipip: Handle underlay device change
mlxsw: spectrum_router: Handle down of tunnel underlay

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |   8 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h     |  18 +-
 .../net/ethernet/mellanox/mlxsw/spectrum_ipip.c    | 183 ++++++-
 .../net/ethernet/mellanox/mlxsw/spectrum_ipip.h    |  12 +
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 539 +++++++++++++++------
 .../net/ethernet/mellanox/mlxsw/spectrum_router.h  |  29 +-
 6 files changed, 614 insertions(+), 175 deletions(-)
Signature · 1 line
2.9.5