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]
Date:   Wed, 8 Dec 2021 17:18:48 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Lahav Schlesinger <lschlesinger@...venets.com>,
        netdev@...r.kernel.org, nikolay@...dia.com
Subject: Re: [PATCH net-next v5] rtnetlink: Support fine-grained netdevice
 bulk deletion

On 12/8/21 5:04 PM, Jakub Kicinski wrote:
> On Wed, 8 Dec 2021 16:43:28 -0700 David Ahern wrote:
>> On 12/8/21 2:47 PM, Lahav Schlesinger wrote:
>>> No visible changes from what I saw, this API is as fast as group
>>> deletion. Maybe a few tens of milliseconds slower, but it's lost in the
>>> noise.
>>> I'll run more thorough benchmarks to get to a more conclusive conclusion.
>>>
>>> Also just pointing out that the sort will be needed even if we pass an
>>> array (IFLA_IFINDEX_LIST) instead.
>>> Feels like CS 101, but do you have a better approach for detecting
>>> duplicates in an array? I imagine a hash table will be slower as it will
>>> need to allocate a node object for each device (assuming we don't want
>>> to add a new hlist_node to 'struct net_device' just for this)  
>>
>> I think marking the dev's and then using a delete loop is going to be
>> the better approach - avoid the sort and duplicate problem. I use that
>> approach for nexthop deletes:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/net/ipv4/nexthop.c#n1849
>>
>> Find a hole in net_device struct in an area used only for control path
>> and add 'bool grp_delete' (or a 1-bit hole). Mark the devices on pass
>> and delete them on another.
> 
> If we want to keep state in the netdev itself we can probably piggy
> back on dev->unreg_list. It should be initialized to empty and not
> touched unless device goes thru unregister.
> 

isn't that used when the delink function calls unregister_netdevice_queue?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ