All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, jiri@resnulli.us, leonro@nvidia.com,
	saeedm@nvidia.com, idosch@idosch.org, michael.chan@broadcom.com,
	simon.horman@corigine.com, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 0/5] devlink: hold the instance lock in eswitch callbacks
Date: Wed, 16 Mar 2022 21:20:18 -0700	[thread overview]
Message-ID: <20220317042023.1470039-1-kuba@kernel.org> (raw)

Series number 2 in the effort to hold the devlink instance lock
in call driver callbacks. We have the following drivers using
this API:

 - bnxt, nfp, netdevsim - their own locking is removed / simplified
   by this series; all of them needed a lock to protect from changes
   to the number of VFs while switching modes, now the VF config bus
   callback takes the devlink instance lock via devl_lock();
 - ice - appears not to allow changing modes while SR-IOV enabled,
   so nothing to do there;
 - liquidio - does not contain any locking;
 - octeontx2/af - is very special but at least doesn't have locking
   so doesn't get in the way either;
 - mlx5 has a wealth of locks - I chickened out and dropped the lock
   in the callbacks so that I can leave the driver be, for now.

The last one is obviously not ideal, but I would prefer to transition
the API already as it make take longer.

LMK if it's an abuse of power / I'm not thinking straight.

Jakub Kicinski (5):
  bnxt: use the devlink instance lock to protect sriov
  devlink: add explicitly locked flavor of the rate node APIs
  netdevsim: replace port_list_lock with devlink instance lock
  netdevsim: replace vfs_lock with devlink instance lock
  devlink: hold the instance lock during eswitch_mode callbacks

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     |  1 -
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  6 --
 .../net/ethernet/broadcom/bnxt/bnxt_sriov.c   |  4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c | 22 ++---
 .../mellanox/mlx5/core/eswitch_offloads.c     | 15 +++-
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  7 +-
 drivers/net/netdevsim/dev.c                   | 85 +++++++++---------
 drivers/net/netdevsim/netdevsim.h             |  2 -
 include/net/devlink.h                         |  4 +
 net/core/devlink.c                            | 90 ++++++++++++-------
 10 files changed, 128 insertions(+), 108 deletions(-)

-- 
2.34.1


             reply	other threads:[~2022-03-17  4:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17  4:20 Jakub Kicinski [this message]
2022-03-17  4:20 ` [PATCH net-next 1/5] bnxt: use the devlink instance lock to protect sriov Jakub Kicinski
     [not found]   ` <CACKFLi=O4ffBLgP=Xi_CFzwpFVc+zGRH4pmZ15h_YP-imzNpvw@mail.gmail.com>
2022-03-17 17:45     ` Sriharsha Basavapatna
2022-03-17 18:19       ` Jakub Kicinski
2022-03-17 19:24         ` Sriharsha Basavapatna
2022-03-17  4:20 ` [PATCH net-next 2/5] devlink: add explicitly locked flavor of the rate node APIs Jakub Kicinski
2022-03-17  8:02   ` Jiri Pirko
2022-03-17  4:20 ` [PATCH net-next 3/5] netdevsim: replace port_list_lock with devlink instance lock Jakub Kicinski
2022-03-17  4:20 ` [PATCH net-next 4/5] netdevsim: replace vfs_lock " Jakub Kicinski
2022-03-17  4:20 ` [PATCH net-next 5/5] devlink: hold the instance lock during eswitch_mode callbacks Jakub Kicinski
2022-03-17  7:52   ` Leon Romanovsky
2022-03-17 15:41     ` Jakub Kicinski
2022-03-17  8:37   ` Jiri Pirko
2022-03-18  8:12 ` [PATCH net-next 0/5] devlink: hold the instance lock in eswitch callbacks Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220317042023.1470039-1-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=leonro@nvidia.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.