Subject: Re: [net-next PATCH v1 7/9] net: Add NAPI IRQ support

From: Stephen Hemminger <[email-masked]>
Date: Fri, 28 Jul 2023 21:05:45 -0700

On Fri, 28 Jul 2023 17:47:28 -0700
Amritha Nambiar <[email-masked]> wrote:

> Add support to associate the interrupt vector number for a
> NAPI instance.
> 
> Signed-off-by: Amritha Nambiar <[email-masked]>
> ---
>  drivers/net/ethernet/intel/ice/ice_lib.c |    3 +++
>  include/linux/netdevice.h                |    6 ++++++
>  net/core/dev.c                           |    1 +
>  net/core/netdev-genl.c                   |    4 ++++
>  4 files changed, 14 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> index 171177db8fb4..1ebd293ca7de 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> @@ -2975,6 +2975,9 @@ int ice_q_vector_add_napi_queues(struct ice_q_vector *q_vector)
>  			return ret;
>  	}
>  
> +	/* Also set the interrupt number for the NAPI */
> +	napi_set_irq(&q_vector->napi, q_vector->irq.virq);
> +
>  	return ret;
>  }

Doing this for only one device seems like a potential problem.
Also, there are some weird devices where there may not be a 1:1:1 mapping
between IRQ, NAPI, and netdev.