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: <ac4374d5-0d39-c15b-15d1-f79c4c0ab3fe@intel.com>
Date: Tue, 8 Aug 2023 17:17:34 -0700
From: "Nambiar, Amritha" <amritha.nambiar@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>,
	<sridhar.samudrala@...el.com>
Subject: Re: [net-next PATCH v1 3/9] netdev-genl: spec: Extend netdev netlink
 spec in YAML for NAPI

On 7/31/2023 5:35 PM, Jakub Kicinski wrote:
> On Mon, 31 Jul 2023 17:24:51 -0700 Nambiar, Amritha wrote:
>>>> [{'ifindex': 6},
>>>>     {'napi-info': [{'irq': 296,
>>>>                     'napi-id': 390,
>>>>                     'pid': 3475,
>>>>                     'rx-queues': [5],
>>>>                     'tx-queues': [5]}]}]
>>>
>>> Dumps can be filtered, I'm saying:
>>>
>>> $ netdev.yaml --dump napi-get --json='{"ifindex": 6}'
>>>                   ^^^^
>>>
>>> [{'napi-id': 390, 'ifindex': 6, 'irq': 296, ...},
>>>    {'napi-id': 391, 'ifindex': 6, 'irq': 297, ...}]
>>
>> I see. Okay. Looks like this needs to be supported for "dump dev-get
>> ifindex" as well.
> 
> The main thing to focus on for next version is to make the NAPI objects
> "flat" and individual, rather than entries in multi-attr nest within
> per-netdev object.
> 

Would this be acceptable:
$ netdev.yaml  --do napi-get --json='{"ifindex": 12}'

{'napi-info': [{'ifindex': 12, 'irq': 293, 'napi-id': 595, ...},
                {'ifindex': 12, 'irq': 292, 'napi-id': 594, ...},
                {'ifindex': 12, 'irq': 291, 'napi-id': 593, ...}]}

Here, "napi-info" represents a list of NAPI objects. A NAPI object is an 
individual element in the list, and are not within per-netdev object. 
The ifindex is just another attribute that is part of the NAPI object. 
The result for non-NAPI devices will just be empty.

I am not sure how to totally avoid multi-attr nest in this case. For the 
'do napi-get' command, the response is a list of elements with multiple 
attributes and not an individual entry. This transforms to a struct 
array of NAPI objects in the 'do' response, and is achieved with the 
multi-attr nest in the YAML. Subsequently, the 'dump napi-get' response 
is a list of the 'NAPI objects struct list' for all netdevs. Am I 
missing any special type in the YAML that can also give out a 
struct-array in the 'do' response besides using multi-attr nest ?


> I'm 100% sure implementing the filtering by ifindex will be doable as
> a follow up so we can defer it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ