devlink: expose instance locking and simplify port splitting
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 10 repliesIn review
Changes in v1 from the cover letter
- redo the lockdep check (patch 1)
- add a small section to the docs (patch 1)
- build fix (patch 2)
- keeping the devl_ prefix :X
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | devlink: expose instance locking and add locked port registeringDocumentation/ include/ net/ | +98 | 4 replies | |
| 2/6 | eth: nfp: wrap locking assertions in helpersdrivers/ drivers/ drivers/ +1 more | +14 | 0 replies | |
| 3/6 | eth: nfp: replace driver's "pf" lock with devlink instance lockdrivers/ drivers/ drivers/ +3 more | +48 | 2 replies | |
| 4/6 | eth: mlxsw: switch to explicit locking for port registrationdrivers/ drivers/ drivers/ | +22 | 1 reply | |
| 5/6 | devlink: hold the instance lock in port_split / port_unsplit callbacksdrivers/ drivers/ net/ | +8 | 1 reply | |
| 6/6 | devlink: pass devlink_port to port_split / port_unsplit callbacksdrivers/ drivers/ drivers/ +3 more | +35 | 1 reply |
Reviews trailers per patch
4 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Ido Schimmel | Leon Romanovsky |
|---|---|---|
| 1/6 | R-b | |
| 2/6 | ||
| 3/6 | ||
| 4/6 | R-b T-b | |
| 5/6 | R-b T-b | |
| 6/6 | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/6] devlink: expose instance locking and simplify port splitting
This series puts the devlink ports fully under the devlink instance lock's protection. As discussed in the past it implements my preferred solution of exposing the instance lock to the drivers. This way drivers which want to support port splitting can lock the devlink instance themselves on the probe path, and we can take that lock in the core on the split/unsplit paths.
nfp and mlxsw are converted, with slightly deeper changes done in nfp since I'm more familiar with that driver.
Now that the devlink port is protected we can pass a pointer to the drivers, instead of passing a port index and forcing the drivers to do their own lookups. Both nfp and mlxsw can container_of() to their own structures.
v1:
- redo the lockdep check (patch 1)
- add a small section to the docs (patch 1)
- build fix (patch 2)
- keeping the devl_ prefix :X
Jakub Kicinski (6):
devlink: expose instance locking and add locked port registering
eth: nfp: wrap locking assertions in helpers
eth: nfp: replace driver's "pf" lock with devlink instance lock
eth: mlxsw: switch to explicit locking for port registration
devlink: hold the instance lock in port_split / port_unsplit callbacks
devlink: pass devlink_port to port_split / port_unsplit callbacks
Documentation/networking/devlink/index.rst | 16 ++ drivers/net/ethernet/mellanox/mlxsw/core.c | 36 ++--- drivers/net/ethernet/mellanox/mlxsw/minimal.c | 6 + .../net/ethernet/mellanox/mlxsw/spectrum.c | 7 + .../net/ethernet/netronome/nfp/flower/main.c | 4 +- drivers/net/ethernet/netronome/nfp/nfp_app.c | 2 +- drivers/net/ethernet/netronome/nfp/nfp_app.h | 12 +- .../net/ethernet/netronome/nfp/nfp_devlink.c | 55 +++---- drivers/net/ethernet/netronome/nfp/nfp_main.c | 19 +-- drivers/net/ethernet/netronome/nfp/nfp_main.h | 6 +- .../net/ethernet/netronome/nfp/nfp_net_main.c | 34 +++-- .../net/ethernet/netronome/nfp/nfp_net_repr.c | 4 +- drivers/net/ethernet/netronome/nfp/nfp_port.c | 17 --- drivers/net/ethernet/netronome/nfp/nfp_port.h | 2 - include/net/devlink.h | 15 +- net/core/devlink.c | 144 ++++++++++-------- 16 files changed, 208 insertions(+), 171 deletions(-)
Signature · 1 line
2.34.1