mlxsw: Remove RTNL from route insertion path
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest12 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | mlxsw: spectrum_mr: Publish multicast route after writing it to the devicedrivers/ | +8 | 0 replies | |
| 2/12 | mlxsw: spectrum_mr: Protect multicast table list with a lockdrivers/ | +11 | 0 replies | |
| 3/12 | mlxsw: spectrum_mr: Protect multicast route list with a lockdrivers/ | +20 | 0 replies | |
| 4/12 | mlxsw: spectrum_router: Expose router struct to internal usersdrivers/ drivers/ | +33 | 0 replies | |
| 5/12 | mlxsw: spectrum_router: Store NVE decapsulation configuration in routerdrivers/ drivers/ drivers/ +1 more | +46 | 0 replies | |
| 6/12 | mlxsw: spectrum_router: Introduce router lockdrivers/ drivers/ | +5 | 0 replies | |
| 7/12 | mlxsw: spectrum_router: Take router lock from inside routing codedrivers/ | +17 | 0 replies | |
| 8/12 | mlxsw: spectrum_dpipe: Take router lock from dpipe codedrivers/ | +18 | 0 replies | |
| 9/12 | mlxsw: spectrum_router: Take router lock from netdev listenerdrivers/ drivers/ | +45 | 0 replies | |
| 10/12 | mlxsw: spectrum_router: Take router lock from inetaddr listenersdrivers/ | +9 | 0 replies | |
| 11/12 | mlxsw: spectrum_router: Take router lock from exported helpersdrivers/ | +58 | 0 replies | |
| 12/12 | mlxsw: spectrum: Remove RTNL where possibledrivers/ drivers/ | +0 | 0 replies |
Reviews trailers per patch
All 12 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Pirko |
|---|---|
| 1/12 | A-b |
| 2/12 | A-b |
| 3/12 | A-b |
| 4/12 | A-b |
| 5/12 | A-b |
| 6/12 | A-b |
| 7/12 | A-b |
| 8/12 | A-b |
| 9/12 | A-b |
| 10/12 | A-b |
| 11/12 | A-b |
| 12/12 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 00/12] mlxsw: Remove RTNL from route insertion path
From: Ido Schimmel <[email protected]>
This patch set removes RTNL from the route insertion path in mlxsw in order to reduce the control plane latency: the time it takes to push routes from user space to the kernel and mlxsw.
Up until now mlxsw did not have a lock to protect its shared router data structures and instead relied on RTNL. While this was simple and worked, it resulted in large control plane latencies as RTNL was heavily contended - by both the task receiving the netlink messages from user space and the mlxsw workqueue that programs the routes to the device.
By removing RTNL and introducing a new router mutex, this patch set reduces the control plane latency by ~80%. A single mutex is added as inside mlxsw there is not a lot of concurrency. In addition, a more fine-grained locking scheme is much more error-prone.
Patches #1-#6 are preparations. They add needed locking in NVE and multicast routing code instead of relying on RTNL
Patch #7 introduces the new mutex
Patches #8-#12 gradually take the lock in various entry points into the routing code
Patch #13 removes RTNL in places where it is no longer required
Ido Schimmel (12):
mlxsw: spectrum_mr: Publish multicast route after writing it to the
device
mlxsw: spectrum_mr: Protect multicast table list with a lock
mlxsw: spectrum_mr: Protect multicast route list with a lock
mlxsw: spectrum_router: Expose router struct to internal users
mlxsw: spectrum_router: Store NVE decapsulation configuration in
router
mlxsw: spectrum_router: Introduce router lock
mlxsw: spectrum_router: Take router lock from inside routing code
mlxsw: spectrum_dpipe: Take router lock from dpipe code
mlxsw: spectrum_router: Take router lock from netdev listener
mlxsw: spectrum_router: Take router lock from inetaddr listeners
mlxsw: spectrum_router: Take router lock from exported helpers
mlxsw: spectrum: Remove RTNL where possible
.../net/ethernet/mellanox/mlxsw/spectrum.h | 5 +- .../ethernet/mellanox/mlxsw/spectrum_dpipe.c | 35 +-- .../net/ethernet/mellanox/mlxsw/spectrum_mr.c | 52 +++- .../ethernet/mellanox/mlxsw/spectrum_nve.c | 21 -- .../ethernet/mellanox/mlxsw/spectrum_router.c | 267 +++++++++++------- .../ethernet/mellanox/mlxsw/spectrum_router.h | 43 +++ 6 files changed, 267 insertions(+), 156 deletions(-)
Signature · 1 line
2.24.1