All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT net-next 0/6] devlink: expose instance locking and simplify port splitting
@ 2022-03-10  0:16 Jakub Kicinski
  2022-03-10  0:16 ` [RFT net-next 1/6] devlink: expose instance locking and add locked port registering Jakub Kicinski
                   ` (9 more replies)
  0 siblings, 10 replies; 37+ messages in thread
From: Jakub Kicinski @ 2022-03-10  0:16 UTC (permalink / raw)
  To: idosch, petrm, simon.horman; +Cc: netdev, leonro, jiri, Jakub Kicinski

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.

I'd appreciate some testing, I don't have access to this HW.

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

 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                            | 148 ++++++++++--------
 15 files changed, 196 insertions(+), 171 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2022-03-15 17:55 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  0:16 [RFT net-next 0/6] devlink: expose instance locking and simplify port splitting Jakub Kicinski
2022-03-10  0:16 ` [RFT net-next 1/6] devlink: expose instance locking and add locked port registering Jakub Kicinski
2022-03-10  9:14   ` Jiri Pirko
2022-03-10 20:06     ` Jakub Kicinski
2022-03-11  9:15       ` Jiri Pirko
2022-03-11 16:33         ` Jakub Kicinski
2022-03-14 12:43           ` Jiri Pirko
2022-03-11 16:09   ` Leon Romanovsky
2022-03-11 16:26     ` Jakub Kicinski
2022-03-11 16:57       ` Leon Romanovsky
2022-03-11 17:39         ` Jakub Kicinski
2022-03-11 17:41           ` Jakub Kicinski
2022-03-11 17:49           ` Leon Romanovsky
2022-03-11 18:06             ` Jakub Kicinski
2022-03-11 18:19               ` Leon Romanovsky
2022-03-10  0:16 ` [RFT net-next 2/6] eth: nfp: wrap locking assertions in helpers Jakub Kicinski
2022-03-10  0:16 ` [RFT net-next 3/6] eth: nfp: replace driver's "pf" lock with devlink instance lock Jakub Kicinski
2022-03-10  0:16 ` [RFT net-next 4/6] eth: mlxsw: switch to explicit locking for port registration Jakub Kicinski
2022-03-10  9:17   ` Jiri Pirko
2022-03-10 20:08     ` Jakub Kicinski
2022-03-10  0:16 ` [RFT net-next 5/6] devlink: hold the instance lock in port_split / port_unsplit callbacks Jakub Kicinski
2022-03-10  0:16 ` [RFT net-next 6/6] devlink: pass devlink_port to " Jakub Kicinski
2022-03-10  8:57 ` [RFT net-next 0/6] devlink: expose instance locking and simplify port splitting Ido Schimmel
2022-03-10 21:13   ` Ido Schimmel
2022-03-10 21:28     ` Jakub Kicinski
2022-03-14 18:46     ` Jakub Kicinski
2022-03-14 19:10       ` Ido Schimmel
2022-03-14 20:11         ` Jakub Kicinski
2022-03-15  7:39       ` Leon Romanovsky
2022-03-15 15:58         ` Jakub Kicinski
2022-03-15 17:54           ` Leon Romanovsky
2022-03-10  9:05 ` Jiri Pirko
2022-03-10  9:07 ` Leon Romanovsky
2022-03-10 20:13   ` Jakub Kicinski
2022-03-11  6:30     ` Leon Romanovsky
2022-03-11 10:48 ` Simon Horman
2022-03-11 16:34   ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.