[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjGhF2AYAq/XNh+F@unreal>
Date: Wed, 16 Mar 2022 10:34:31 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, jiri@...dia.com,
idosch@...dia.com, petrm@...dia.com, simon.horman@...igine.com,
louis.peens@...igine.com
Subject: Re: [PATCH net-next 3/6] eth: nfp: replace driver's "pf" lock with
devlink instance lock
On Mon, Mar 14, 2022 at 11:00:06PM -0700, Jakub Kicinski wrote:
> The whole reason for existence of the pf mutex is that we could
> not lock the devlink instance around port splitting. There are
> more types of reconfig which can make ports appear or disappear.
> Now that the devlink instance lock is exposed to drivers and
> "locked" helpers exist we can switch to using the devlink lock
> directly.
>
> Next patches will move the locking inside .port_(un)split to
> the core.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> drivers/net/ethernet/netronome/nfp/nfp_app.h | 11 +++---
> .../net/ethernet/netronome/nfp/nfp_devlink.c | 16 ++++-----
> 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 +++++++++++--------
> drivers/net/ethernet/netronome/nfp/nfp_port.c | 3 +-
> 6 files changed, 48 insertions(+), 41 deletions(-)
<...>
> -#define nfp_app_is_locked(app) lockdep_is_held(&(app)->pf->lock)
> +static inline bool nfp_app_is_locked(struct nfp_app *app)
> +{
> + return devl_lock_is_held(priv_to_devlink(app->pf));
> +}
Does it compile if you set CONFIG_LOCKDEP=n?
Thanks
Powered by blists - more mailing lists