Skip to content

RFC devlink: Acquire device lock during reload

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2devlink: Hold a reference on parent devicenet/devlink/core.c+3 -011 replies
2/2devlink: Acquire device lock during reloadnet/devlink/core.c net/devlink/dev.c net/devlink/devl_internal.h +3 more+45 -110 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJiri Pirko
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH net-next 0/2] devlink: Acquire device lock during reload

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(-)
Signature · 1 line
2.40.1