net: vmxnet3: convert to use .get_rx_ring_count
Subsystems (3)
PATCH 1/1 net: vmxnet3: convert to use .get_rx_ring_count
Convert the vmxnet3 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.
---
Note: This was compile-tested only.
--- drivers/net/vmxnet3/vmxnet3_ethtool.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
drivers/net/vmxnet3/vmxnet3_ethtool.c +3 -15
@@ -1081,23 +1081,11 @@ vmxnet3_set_rss_hash_opt(struct net_device *netdev,return 0 ; } -static int -vmxnet3_get_rxnfc (struct net_device *netdev,struct ethtool_rxnfc *info, -u32 *rules) +static u32 vmxnet3_get_rx_ring_count (struct net_device *netdev) {struct vmxnet3_adapter *adapter =netdev_priv (netdev); -int err =0 ; - -switch (info->cmd) { -case ETHTOOL_GRXRINGS : - info->data = adapter->num_rx_queues; -break ; -default : - err = -EOPNOTSUPP ; -break ; - } -return err; +return adapter->num_rx_queues; }#ifdef VMXNET3_RSS
@@ -1335,7 +1323,7 @@ static const struct ethtool_ops vmxnet3_ethtool_ops = { .get_ethtool_stats = vmxnet3_get_ethtool_stats, .get_ringparam = vmxnet3_get_ringparam, .set_ringparam = vmxnet3_set_ringparam, - .get_rxnfc = vmxnet3_get_rxnfc, + .get_rx_ring_count = vmxnet3_get_rx_ring_count, #ifdef VMXNET3_RSS .get_rxfh_indir_size = vmxnet3_get_rss_indir_size, .get_rxfh = vmxnet3_get_rss,
---
base-commit: c9dfb92de0738eb7fe6a591ad1642333793e8b6e
change-id: 20251118-vmxnet3_grxrings-539b41bce645
Best regards,
Signature · 1 line
Breno Leitao <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Tue, 18 Nov 2025 01:44:56 -0800 you wrote:
Convert the vmxnet3 driver to use the new .get_rx_ring_count ethtool operation instead of implementing .get_rxnfc solely for handling
ETHTOOL_GRXRINGScommand. 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.
[...]
Here is the summary with links:
- [net-next] net: vmxnet3: convert to use .get_rx_ring_count
https://git.kernel.org/netdev/net-next/c/672cb5c2a958
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html