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] [day] [month] [year] [list]
Message-ID: <20251107075430.6a4f32ff@kernel.org>
Date: Fri, 7 Nov 2025 07:54:30 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
 razor@...ckwall.org, 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 v4 11/14] netkit: Implement
 rtnl_link_ops->alloc and ndo_queue_create

On Fri, 7 Nov 2025 16:01:44 +0100 Daniel Borkmann wrote:
> On 11/7/25 1:41 AM, Jakub Kicinski wrote:
> > On Fri, 31 Oct 2025 22:21:00 +0100 Daniel Borkmann wrote:  
> >> +static void netkit_get_channels(struct net_device *dev,
> >> +				struct ethtool_channels *channels)
> >> +{
> >> +	channels->max_rx = dev->num_rx_queues;
> >> +	channels->max_tx = dev->num_tx_queues;
> >> +	channels->max_other = 0;
> >> +	channels->max_combined = 1;
> >> +	channels->rx_count = dev->real_num_rx_queues;
> >> +	channels->tx_count = dev->real_num_tx_queues;
> >> +	channels->other_count = 0;
> >> +	channels->combined_count = 0;
> >>   }  
> > 
> > Why do we need to implement get_channels?  
> 
> Thanks for the feedback. I think this one was useful imho since it allowed
> for introspection via ethtool on netkit side e.g. the max_rx vs rx_count.

Right, but we have netdev-nl queue-get now which also reports the new
"lease"/"peer" info so it will be much clearer.

Ah, is this because libbpf looks at channels to figure out the queue
count? Can we make it use netdev-nl ?

I guess it could also count the entries in $sysfs/queues/rx-* but that
doesn't express the fact that queue 0 is unusable. Which I suppose the
get_channels implementation was trying to "express" by setting
max_combined=1 ? 😶️

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ