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: <34993e14-2c33-8eaf-67a9-e3412778e6f0@intel.com>
Date:   Fri, 24 Feb 2023 01:14:15 -0800
From:   "Nambiar, Amritha" <amritha.nambiar@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     Alexander H Duyck <alexander.duyck@...il.com>,
        <netdev@...r.kernel.org>, <davem@...emloft.net>,
        <edumazet@...gle.com>, <pabeni@...hat.com>,
        "Saeed Mahameed" <saeed@...nel.org>,
        "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
Subject: Re: Kernel interface to configure queue-group parameters

On 2/16/2023 9:32 AM, Jakub Kicinski wrote:
> On Thu, 16 Feb 2023 02:35:35 -0800 Nambiar, Amritha wrote:
>>> The biggest issue I see is that there isn't any sort of sysfs interface
>>> exposed for NAPI which is what you would essentially need to justify
>>> something like this since that is what you are modifying.
>>
>> Right. Something like /sys/class/net/<iface>/napis/napi<0-N>
>> Maybe, initially there would be as many napis as queues due to 1:1
>> association, but as the queues bitmap is tuned for the napi, only those
>> napis that have queue[s] associated with it would be exposed.
> 
> Forget about using sysfs, please. We've been talking about making
> "queues first class citizen", mapping to pollers is part of that
> problem space. And it's complex enough to be better suited for netlink.

Okay. Can ethtool netlink be an option for this? For example,

ethtool --show-napis
	Lists all the napi instances and associated queue[s] list for each napi 
for the specified network device.

ethtool --set-napi
	Configure the attributes (say, queue[s] list) for each napi
	
	napi <napi_id>
		The napi instance to configure
	
	queues <q_id1, q_id2, ...>
		The queue[s] that are to be serviced by the napi instance.
	
Example:	
ethtool --set-napi eth0 napi 1477 queues 1,2,5

The 'set-napi' command for the napi<->queue[s] association would have 
the following affect :
1. If multiple napis are impacted due to an update, remove the queue[s] 
from the existing napi instance it is associated with.
2. Driver updates queue[s]<->vector mapping and associates with new napi 
instance.
3. Report the impacted napis and its new queue[s] list back to the stack.

The 'show-napi' command should now list all the napis and the updated 
queue[s] list.
This could also be extended for other napi attributes beyond queue[s] list.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ