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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8994bee9-d384-4c95-b4f9-1f322c240242@blackwall.org>
Date: Wed, 22 Oct 2025 16:00:30 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org
Cc: bpf@...r.kernel.org, kuba@...nel.org, davem@...emloft.net,
 pabeni@...hat.com, willemb@...gle.com, sdf@...ichev.me,
 john.fastabend@...il.com, martin.lau@...nel.org, jordan@...fe.io,
 maciej.fijalkowski@...el.com, magnus.karlsson@...el.com, dw@...idwei.uk,
 toke@...hat.com, yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH net-next v3 13/15] netkit: Implement rtnl_link_ops->alloc
 and ndo_queue_create

On 10/20/25 19:23, Daniel Borkmann wrote:
> From: David Wei <dw@...idwei.uk>
> 
> Implement rtnl_link_ops->alloc that allows the number of rx queues to be
> set when netkit is created. By default, netkit has only a single rxq (and
> single txq). The number of queues is deliberately not allowed to be changed
> via ethtool -L and is fixed for the lifetime of a netkit instance.
> 
> For netkit device creation, numrxqueues with larger than one rxq can be
> specified. These rxqs are then mappable to real rxqs in physical netdevs:
> 
>   ip link add type netkit peer numrxqueues 64      # for device pair
>   ip link add numrxqueues 64 type netkit single    # for single device
> 
> The limit of numrxqueues for netkit is currently set to 256, which allows
> binding multiple real rxqs from physical netdevs.
> 
> The implementation of ndo_queue_create() adds a new rxq during the bind
> queue operation. We allow to create queues either in single device mode or
> for the case of dual device mode for the netkit peer device which gets
> placed into the target network namespace. For dual device mode the bind
> against the primary device does not make sense for the targeted use cases,
> and therefore gets rejected.
> 
> We also need to add a lockdep class for netkit, such that lockdep does
> not trip over us, similarly done as in commit 0bef512012b1 ("net: add
> netdev_lockdep_set_classes() to virtual drivers").
> 
> Signed-off-by: David Wei <dw@...idwei.uk>
> Co-developed-by: Daniel Borkmann <daniel@...earbox.net>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> ---
>  drivers/net/netkit.c | 129 +++++++++++++++++++++++++++++++++++++++----
>  1 file changed, 117 insertions(+), 12 deletions(-)
> 

Reviewed-by: Nikolay Aleksandrov <razor@...ckwall.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ