diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-02-26 19:51:43 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-02-26 19:51:43 -0800 |
commit | 0493f7a54e5bcf490f943f7b25ec6e1051832f98 (patch) | |
tree | 8891f6113e03f007c711cddc12fe5662c920c8fc /lib/cpu_rmap.c | |
parent | 28d68d396a1cd21591e8c6d74afbde33a7ea107e (diff) | |
parent | 185646a8a0a88c9016a782f9b98eea0eb6078512 (diff) |
Merge branch 'net-napi-add-cpu-affinity-to-napi-config'
Ahmed Zaki says:
====================
net: napi: add CPU affinity to napi->config
Drivers usually need to re-apply the user-set IRQ affinity to their IRQs
after reset. However, since there can be only one IRQ affinity notifier
for each IRQ, registering IRQ notifiers conflicts with the ARFS rmap
management in the core (which also registers separate IRQ affinity
notifiers).
Move the IRQ affinity management to the napi struct. This way we can have
a unified IRQ notifier to re-apply the user-set affinity and also manage
the ARFS rmaps.
The first patch moves the aRFS rmap management to core. It also adds the
IRQ affinity mask to napi_config and re-applies the mask after reset.
Patches 2, 4 and 5 use the new API for ena, ice and idpf drivers.
ICE does not always delete the NAPIs before releasing the IRQs. The third
patch makes sure the driver removes the IRQ number along with the queue
when the NAPIs are disabled. Without this, the next patches in this series
would free the IRQ before releasing the IRQ notifier (which generates
warnings).
Tested on ice and idpf.
v8: https://lore.kernel.org/20250211210657.428439-1-ahmed.zaki@intel.com
v7: https://lore.kernel.org/20250204220622.156061-1-ahmed.zaki@intel.com
v6: https://lore.kernel.org/20250118003335.155379-1-ahmed.zaki@intel.com
v5: https://lore.kernel.org/20250113171042.158123-1-ahmed.zaki@intel.com
v4: https://lore.kernel.org/20250109233107.17519-1-ahmed.zaki@intel.com
v3: https://lore.kernel.org/20250104004314.208259-1-ahmed.zaki@intel.com
v2: https://lore.kernel.org/202412190454.nwvp3hU2-lkp@intel.com
v1: https://lore.kernel.org/20241210002626.366878-1-ahmed.zaki@intel.com
====================
Link: https://patch.msgid.link/20250224232228.990783-1-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib/cpu_rmap.c')
-rw-r--r-- | lib/cpu_rmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cpu_rmap.c b/lib/cpu_rmap.c index 4c348670da314..f03d9be3f06ba 100644 --- a/lib/cpu_rmap.c +++ b/lib/cpu_rmap.c @@ -73,7 +73,7 @@ static void cpu_rmap_release(struct kref *ref) * cpu_rmap_get - internal helper to get new ref on a cpu_rmap * @rmap: reverse-map allocated with alloc_cpu_rmap() */ -static inline void cpu_rmap_get(struct cpu_rmap *rmap) +void cpu_rmap_get(struct cpu_rmap *rmap) { kref_get(&rmap->refcount); } |