iavf: convert to NAPI IRQ affinity API
Subsystems (3)
PATCH 1/1 iavf: convert to NAPI IRQ affinity API
Commit bd7c00605ee0 ("net: move aRFS rmap management and CPU affinity to core") allows the drivers to delegate the IRQ affinity to the NAPI instance. However, the driver needs to use a persistent NAPI config and explicitly set/unset the NAPI<->IRQ association.
Convert to the new IRQ affinity API.
--- drivers/net/ethernet/intel/iavf/iavf.h | 2 - drivers/net/ethernet/intel/iavf/iavf_main.c | 58 ++++----------------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 3 +- 3 files changed, 12 insertions(+), 51 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +0 -2
@@ -114,8 +114,6 @@ struct iavf_q_vector {u16 reg_idx;/* register index of the interrupt */ char name[IFNAMSIZ +15 ];bool arm_wb_state; -cpumask_t affinity_mask; -struct irq_affinity_notify affinity_notify; };/* Helper macros to switch between ints/sec and what the register uses.
drivers/net/ethernet/intel/iavf/iavf_main.c +10 -48
118 lines not on this page · raw message
drivers/net/ethernet/intel/iavf/iavf_txrx.c +2 -1
@@ -1650,7 +1650,8 @@ int iavf_napi_poll(struct napi_struct *napi, int budget)* continue to poll, otherwise we must stop polling so the * interrupt can move to the correct cpu. */ -if (!cpumask_test_cpu (cpu_id, &q_vector->affinity_mask)) { +if (!cpumask_test_cpu (cpu_id, + &q_vector->napi.config->affinity_mask)) {/* Tell napi that we are done polling */ napi_complete_done (napi, work_done);
Signature · 1 line
2.43.0
drivers/net/ethernet/intel/iavf/iavf.h struct iavf_q_vector {
Quoted 30 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Ahmed Zaki
Sent: Saturday, May 17, 2025 12:19 AM
To: [email protected]
Cc: [email protected]; Zaki, Ahmed <[email protected]>; Keller, Jacob E <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-next] iavf: convert to NAPI IRQ affinity APICommit
bd7c00605ee0("net: move aRFS rmap management and CPU affinity to core") allows the drivers to delegate the IRQ affinity to the NAPI instance. However, the driver needs to use a persistent NAPI config and explicitly set/unset the NAPI<->IRQ association.Convert to the new IRQ affinity API.
Reviewed-by Jacob Keller <[email protected]>Signed-off-by Ahmed Zaki <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf.h | 2 - drivers/net/ethernet/intel/iavf/iavf_main.c | 58 ++++----------------- drivers/net/ethernet/intel/iavf/iavf_txrx.c | 3 +- 3 files changed, 12 insertions(+), 51 deletions(-)drivers/net/ethernet/intel/iavf/iavf.h +0
-0@@ -114,8 +114,6 @@ struct iavf_q_vector {