[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250908115114.GE2015@horms.kernel.org>
Date: Mon, 8 Sep 2025 12:51:14 +0100
From: Simon Horman <horms@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
kuba@...nel.org, "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, virtualization@...ts.linux.dev,
jdamato@...tly.com, kernel-team@...a.com
Subject: Re: [PATCH RFC net-next 4/7] net: ethtool: add get_rxrings callback
to optimize RX ring queries
On Fri, Sep 05, 2025 at 10:07:23AM -0700, Breno Leitao wrote:
> Add a new optional get_rxrings callback in ethtool_ops to allow drivers
> to provide the number of RX rings directly without going through the
> full get_rxnfc flow classification interface.
>
> Modify ethtool_get_rxrings() to use get_rxrings() if available,
> falling back to get_rxnfc() otherwise.
>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
> ---
> include/linux/ethtool.h | 1 +
> net/ethtool/ioctl.c | 25 +++++++++++++++++++++----
> 2 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index de5bd76a400ca..4f6da35a77eb1 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -1141,6 +1141,7 @@ struct ethtool_ops {
> struct ethtool_ringparam *,
> struct kernel_ethtool_ringparam *,
> struct netlink_ext_ack *);
> + int (*get_rxrings)(struct net_device *dev);
Hi Breno,
Please also add get_rxrings to the Kernel doc for struct ethtool_ops.
> void (*get_pause_stats)(struct net_device *dev,
> struct ethtool_pause_stats *pause_stats);
> void (*get_pauseparam)(struct net_device *,
Powered by blists - more mailing lists