Skip to content

net: prevent deadlocks and mis-configuration with per-NAPI threaded config

Jakub Kicinski linux-kselftest netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied 3/3
  2. v13 patches 0 repliesSuperseded

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3selftests: drv-net: don't assume device has only 2 queuestools/testing/selftests/drivers/net/napi_threaded.py+6 -41 replyApplied
2/3net: update NAPI threaded config even for disabled NAPIsinclude/linux/netdevice.h net/core/dev.c+10 -21 replyApplied
3/3net: prevent deadlocks when enabling NAPIs with mixed kthread confignet/core/dev.c net/core/dev.h+11 -21 replyApplied

Reviews trailers per patch

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

PatchJoe Damato
1/3R-b
2/3R-b
3/3R-b

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

Read the v2 thread

Cover letter [PATCH net v2 0/3] net: prevent deadlocks and mis-configuration with per-NAPI threaded config

Running the test added with a recent fix on a driver with persistent NAPI config leads to a deadlock. The deadlock is fixed by patch 3, patch 2 is I think a more fundamental problem with the way we implemented the config.

I hope the fix makes sense, my own thinking is definitely colored by my preference (IOW how the per-queue config RFC was implemented).

v2: add missing kdoc
v1: https://lore.kernel.org/[email protected]

Jakub Kicinski (3):
selftests: drv-net: don't assume device has only 2 queues
net: update NAPI threaded config even for disabled NAPIs
net: prevent deadlocks when enabling NAPIs with mixed kthread config

 include/linux/netdevice.h                            |  5 ++++-
 net/core/dev.h                                       |  8 ++++++++
 net/core/dev.c                                       | 12 +++++++++---
 tools/testing/selftests/drivers/net/napi_threaded.py | 10 ++++++----
 4 files changed, 27 insertions(+), 8 deletions(-)
Signature · 1 line
2.50.1