From: Breno Leitao Date: Thu, 22 Jan 2026 18:40:21 +0000 (-0800) Subject: net: sfc: falcon: convert to use .get_rx_ring_count X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f584347c1a2ba44ba589688100de7b482f04d00f;p=thirdparty%2Fkernel%2Flinux.git net: sfc: falcon: convert to use .get_rx_ring_count Use the newly introduced .get_rx_ring_count ethtool ops callback instead of handling ETHTOOL_GRXRINGS directly in .get_rxnfc(). Signed-off-by: Breno Leitao Reviewed-by: Brett Creeley Link: https://patch.msgid.link/20260122-grxring_big_v4-v2-9-94dbe4dcaa10@debian.org Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/sfc/falcon/ethtool.c b/drivers/net/ethernet/sfc/falcon/ethtool.c index 27d1cd6f24ca1..0493640315454 100644 --- a/drivers/net/ethernet/sfc/falcon/ethtool.c +++ b/drivers/net/ethernet/sfc/falcon/ethtool.c @@ -974,6 +974,13 @@ ef4_ethtool_get_rxfh_fields(struct net_device *net_dev, return 0; } +static u32 ef4_ethtool_get_rx_ring_count(struct net_device *net_dev) +{ + struct ef4_nic *efx = netdev_priv(net_dev); + + return efx->n_rx_channels; +} + static int ef4_ethtool_get_rxnfc(struct net_device *net_dev, struct ethtool_rxnfc *info, u32 *rule_locs) @@ -981,10 +988,6 @@ ef4_ethtool_get_rxnfc(struct net_device *net_dev, struct ef4_nic *efx = netdev_priv(net_dev); switch (info->cmd) { - case ETHTOOL_GRXRINGS: - info->data = efx->n_rx_channels; - return 0; - case ETHTOOL_GRXCLSRLCNT: info->data = ef4_filter_get_rx_id_limit(efx); if (info->data == 0) @@ -1348,6 +1351,7 @@ const struct ethtool_ops ef4_ethtool_ops = { .reset = ef4_ethtool_reset, .get_rxnfc = ef4_ethtool_get_rxnfc, .set_rxnfc = ef4_ethtool_set_rxnfc, + .get_rx_ring_count = ef4_ethtool_get_rx_ring_count, .get_rxfh_indir_size = ef4_ethtool_get_rxfh_indir_size, .get_rxfh = ef4_ethtool_get_rxfh, .set_rxfh = ef4_ethtool_set_rxfh,