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 <lei...@debian.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 *,