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

Configure Feed

Select the types of activity you want to include in your feed.

net: gve: convert to use .get_rx_ring_count

Convert the Google Virtual Ethernet (GVE) driver to use the new
.get_rx_ring_count ethtool operation instead of handling
ETHTOOL_GRXRINGS in .get_rxnfc. This simplifies the code by moving the
ring count query to a dedicated callback.

The new callback provides the same functionality in a more direct way,
following the ongoing ethtool API modernization.

Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260105-gxring_google-v2-1-e7cfe924d429@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
48b27ea6 27a01c19

+8 -3
+8 -3
drivers/net/ethernet/google/gve/gve_ethtool.c
··· 815 815 return err; 816 816 } 817 817 818 + static u32 gve_get_rx_ring_count(struct net_device *netdev) 819 + { 820 + struct gve_priv *priv = netdev_priv(netdev); 821 + 822 + return priv->rx_cfg.num_queues; 823 + } 824 + 818 825 static int gve_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd, u32 *rule_locs) 819 826 { 820 827 struct gve_priv *priv = netdev_priv(netdev); 821 828 int err = 0; 822 829 823 830 switch (cmd->cmd) { 824 - case ETHTOOL_GRXRINGS: 825 - cmd->data = priv->rx_cfg.num_queues; 826 - break; 827 831 case ETHTOOL_GRXCLSRLCNT: 828 832 if (!priv->max_flow_rules) 829 833 return -EOPNOTSUPP; ··· 970 966 .get_channels = gve_get_channels, 971 967 .set_rxnfc = gve_set_rxnfc, 972 968 .get_rxnfc = gve_get_rxnfc, 969 + .get_rx_ring_count = gve_get_rx_ring_count, 973 970 .get_rxfh_indir_size = gve_get_rxfh_indir_size, 974 971 .get_rxfh_key_size = gve_get_rxfh_key_size, 975 972 .get_rxfh = gve_get_rxfh,