linux/include
Jakub Kicinski 67e4bb2ced net: page_pool: don't try to stash the napi id
Page ppol tried to cache the NAPI ID in page pool info to avoid
having a dependency on the life cycle of the NAPI instance.
Since commit under Fixes the NAPI ID is not populated until
napi_enable() and there's a good chance that page pool is
created before NAPI gets enabled.

Protect the NAPI pointer with the existing page pool mutex,
the reading path already holds it. napi_id itself we need
to READ_ONCE(), it's protected by netdev_lock() which are
not holding in page pool.

Before this patch napi IDs were missing for mlx5:

 # ./cli.py --spec netlink/specs/netdev.yaml --dump page-pool-get

 [{'id': 144, 'ifindex': 2, 'inflight': 3072, 'inflight-mem': 12582912},
  {'id': 143, 'ifindex': 2, 'inflight': 5568, 'inflight-mem': 22806528},
  {'id': 142, 'ifindex': 2, 'inflight': 5120, 'inflight-mem': 20971520},
  {'id': 141, 'ifindex': 2, 'inflight': 4992, 'inflight-mem': 20447232},
  ...

After:

 [{'id': 144, 'ifindex': 2, 'inflight': 3072, 'inflight-mem': 12582912,
   'napi-id': 565},
  {'id': 143, 'ifindex': 2, 'inflight': 4224, 'inflight-mem': 17301504,
   'napi-id': 525},
  {'id': 142, 'ifindex': 2, 'inflight': 4288, 'inflight-mem': 17563648,
   'napi-id': 524},
  ...

Fixes: 86e25f40aa ("net: napi: Add napi_config")
Reviewed-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/20250123231620.1086401-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-27 14:37:41 -08:00
..
acpi
asm-generic fprobe: Add fprobe_header encoding feature 2024-12-26 10:50:05 -05:00
clocksource
crypto
cxl
drm drm/bridge: fix documentation for the hdmi_audio_prepare() callback 2025-01-15 12:32:47 +02:00
dt-bindings
keys
kunit
kvm KVM: arm64: Add unified helper for reprogramming counters by mask 2024-12-18 13:22:25 -08:00
linux net: the appletalk subsystem no longer uses ndo_do_ioctl 2025-01-27 14:07:19 -08:00
math-emu
media
memory
misc
net net: page_pool: don't try to stash the napi id 2025-01-27 14:37:41 -08:00
pcmcia
ras
rdma
rv
scsi block: simplify tag allocation policy selection 2025-01-06 07:37:41 -07:00
soc net: mscc: ocelot: add TX timestamping statistics 2025-01-17 20:01:10 -08:00
sound drm-misc-next for 6.14: 2025-01-09 15:48:50 +10:00
target
trace Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
uapi Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
ufs scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_sequence() 2025-01-02 13:00:16 -05:00
vdso vdso: Correct typo in PAGE_SHIFT comment 2025-01-15 11:07:08 +01:00
video
xen