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: mvneta: convert to use .get_rx_ring_count

Convert the mvneta driver to use the new .get_rx_ring_count ethtool
operation instead of implementing .get_rxnfc solely for handling
ETHTOOL_GRXRINGS command. This simplifies the code by removing the
switch statement and replacing it with a direct return of the queue
count.

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

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20251121-marvell-v1-1-8338f3e55a4c@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
737e14c5 a8ff4842

+3 -11
+3 -11
drivers/net/ethernet/marvell/mvneta.c
··· 5012 5012 return MVNETA_RSS_LU_TABLE_SIZE; 5013 5013 } 5014 5014 5015 - static int mvneta_ethtool_get_rxnfc(struct net_device *dev, 5016 - struct ethtool_rxnfc *info, 5017 - u32 *rules __always_unused) 5015 + static u32 mvneta_ethtool_get_rx_ring_count(struct net_device *dev) 5018 5016 { 5019 - switch (info->cmd) { 5020 - case ETHTOOL_GRXRINGS: 5021 - info->data = rxq_number; 5022 - return 0; 5023 - default: 5024 - return -EOPNOTSUPP; 5025 - } 5017 + return rxq_number; 5026 5018 } 5027 5019 5028 5020 static int mvneta_config_rss(struct mvneta_port *pp) ··· 5348 5356 .get_ethtool_stats = mvneta_ethtool_get_stats, 5349 5357 .get_sset_count = mvneta_ethtool_get_sset_count, 5350 5358 .get_rxfh_indir_size = mvneta_ethtool_get_rxfh_indir_size, 5351 - .get_rxnfc = mvneta_ethtool_get_rxnfc, 5359 + .get_rx_ring_count = mvneta_ethtool_get_rx_ring_count, 5352 5360 .get_rxfh = mvneta_ethtool_get_rxfh, 5353 5361 .set_rxfh = mvneta_ethtool_set_rxfh, 5354 5362 .get_link_ksettings = mvneta_ethtool_get_link_ksettings,