[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yim/a+sB0IKwTfxH@nanopsycho>
Date: Thu, 10 Mar 2022 10:05:47 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: idosch@...dia.com, petrm@...dia.com, simon.horman@...igine.com,
netdev@...r.kernel.org, leonro@...dia.com
Subject: Re: [RFT net-next 0/6] devlink: expose instance locking and simplify
port splitting
Thu, Mar 10, 2022 at 01:16:26AM CET, kuba@...nel.org wrote:
>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.
I like this patchset. To be honest, I made a mistake to not do have it
like this from the beginning. I tried to hide the devlink lock from the
user/driver, but as it turned out, that was probably not a good idea :)
>
>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
>
Powered by blists - more mailing lists