netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/2] devlink: Acquire device lock during reload
@ 2023-06-19 12:50 Ido Schimmel
  2023-06-19 12:50 ` [RFC PATCH net-next 1/2] devlink: Hold a reference on parent device Ido Schimmel
  2023-06-19 12:50 ` [RFC PATCH net-next 2/2] devlink: Acquire device lock during reload Ido Schimmel
  0 siblings, 2 replies; 14+ messages in thread
From: Ido Schimmel @ 2023-06-19 12:50 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, pabeni, edumazet, jiri, petrm, Ido Schimmel

These two patches change devlink to acquire the device lock during
reload. This is needed by device drivers that need to invoke a PCI reset
via PCI core during devlink reload, as PCI core requires the device lock
to be held. See detailed explanation in the second patch.

As a preparation for this change, devlink needs to hold a reference on
the underlying device since reload can be invoked asynchronously as part
of netns dismantle. Unfortunately, this change results in a crash which
I'm not sure how to solve. Detailed description and reproducer are
provided in the first patch.

Ido Schimmel (2):
  devlink: Hold a reference on parent device
  devlink: Acquire device lock during reload

 net/devlink/core.c          |  7 +++++--
 net/devlink/dev.c           |  8 ++++++++
 net/devlink/devl_internal.h | 19 ++++++++++++++++++-
 net/devlink/health.c        |  3 ++-
 net/devlink/leftover.c      |  4 +++-
 net/devlink/netlink.c       | 18 ++++++++++++------
 6 files changed, 48 insertions(+), 11 deletions(-)

-- 
2.40.1


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

end of thread, other threads:[~2023-06-27 10:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 12:50 [RFC PATCH net-next 0/2] devlink: Acquire device lock during reload Ido Schimmel
2023-06-19 12:50 ` [RFC PATCH net-next 1/2] devlink: Hold a reference on parent device Ido Schimmel
2023-06-20  6:23   ` Jiri Pirko
2023-06-20  7:05     ` Ido Schimmel
2023-06-20 17:43       ` Jakub Kicinski
2023-06-21  6:31         ` Ido Schimmel
2023-06-21 19:03           ` Jakub Kicinski
2023-06-22  6:03             ` Ido Schimmel
2023-06-21 11:48   ` Jiri Pirko
2023-06-21 15:35     ` Ido Schimmel
2023-06-22  6:29       ` Jiri Pirko
2023-06-25 11:55         ` Ido Schimmel
2023-06-27 10:13           ` Jiri Pirko
2023-06-19 12:50 ` [RFC PATCH net-next 2/2] devlink: Acquire device lock during reload Ido Schimmel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).