Re: [PATCH net-next v4 11/14] netkit: Implement rtnl_link_ops->alloc and ndo_queue_create
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-11-07 15:54:32
Also in:
bpf
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-11-07 15:54:32
Also in:
bpf
On Fri, 7 Nov 2025 16:01:44 +0100 Daniel Borkmann wrote:
On 11/7/25 1:41 AM, Jakub Kicinski wrote:quoted
On Fri, 31 Oct 2025 22:21:00 +0100 Daniel Borkmann wrote:quoted
+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 ? 😶️