lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a5841c8-f43b-3c6d-ea00-ac9a2b310490@intel.com>
Date: Mon, 31 Jul 2023 16:22:33 -0700
From: "Nambiar, Amritha" <amritha.nambiar@...el.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: <netdev@...r.kernel.org>, <kuba@...nel.org>, <davem@...emloft.net>,
	<sridhar.samudrala@...el.com>
Subject: Re: [net-next PATCH v1 7/9] net: Add NAPI IRQ support

On 7/28/2023 9:05 PM, Stephen Hemminger wrote:
> On Fri, 28 Jul 2023 17:47:28 -0700
> Amritha Nambiar <amritha.nambiar@...el.com> wrote:
> 
>> Add support to associate the interrupt vector number for a
>> NAPI instance.
>>
>> Signed-off-by: Amritha Nambiar <amritha.nambiar@...el.com>
>> ---
>>   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.

For devices that does not call napi_set_irq(), irq will be initialized 
to -1 as part of netif_napi_add_weight().

> Also, there are some weird devices where there may not be a 1:1:1 mapping
> between IRQ, NAPI, and netdev.
> 

IIUC, there's a 1:1 mapping between IRQ and NAPI, and need not be mapped 
:1 with netdev.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ