Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ixgbevf: extract GRXRINGS from .get_rxnfc

Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.

Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().

This simplifies the RX ring count retrieval and aligns ixgbevf with the new
ethtool API for querying RX ring parameters.

Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Link: https://patch.msgid.link/20251125-gxring_intel-v2-7-f55cd022d28b@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
3399fd51 768ce58d

+3 -11
+3 -11
drivers/net/ethernet/intel/ixgbevf/ethtool.c
··· 867 867 return 0; 868 868 } 869 869 870 - static int ixgbevf_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, 871 - u32 *rules __always_unused) 870 + static u32 ixgbevf_get_rx_ring_count(struct net_device *dev) 872 871 { 873 872 struct ixgbevf_adapter *adapter = netdev_priv(dev); 874 873 875 - switch (info->cmd) { 876 - case ETHTOOL_GRXRINGS: 877 - info->data = adapter->num_rx_queues; 878 - return 0; 879 - default: 880 - hw_dbg(&adapter->hw, "Command parameters not supported\n"); 881 - return -EOPNOTSUPP; 882 - } 874 + return adapter->num_rx_queues; 883 875 } 884 876 885 877 static u32 ixgbevf_get_rxfh_indir_size(struct net_device *netdev) ··· 979 987 .get_ethtool_stats = ixgbevf_get_ethtool_stats, 980 988 .get_coalesce = ixgbevf_get_coalesce, 981 989 .set_coalesce = ixgbevf_set_coalesce, 982 - .get_rxnfc = ixgbevf_get_rxnfc, 990 + .get_rx_ring_count = ixgbevf_get_rx_ring_count, 983 991 .get_rxfh_indir_size = ixgbevf_get_rxfh_indir_size, 984 992 .get_rxfh_key_size = ixgbevf_get_rxfh_key_size, 985 993 .get_rxfh = ixgbevf_get_rxfh,