* [PATCH net-next] net: vmxnet3: convert to use .get_rx_ring_count
@ 2025-11-18 9:44 Breno Leitao
2025-11-20 4:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Breno Leitao @ 2025-11-18 9:44 UTC (permalink / raw)
To: Ronak Doshi, Broadcom internal kernel review list, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Breno Leitao
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.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
Note: This was compile-tested only.
---
drivers/net/vmxnet3/vmxnet3_ethtool.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index cc4d7573839d..a14d0ad978e1 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -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,
--
Breno Leitao <leitao@debian.org>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: vmxnet3: convert to use .get_rx_ring_count
2025-11-18 9:44 [PATCH net-next] net: vmxnet3: convert to use .get_rx_ring_count Breno Leitao
@ 2025-11-20 4:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-20 4:30 UTC (permalink / raw)
To: Breno Leitao
Cc: ronak.doshi, bcm-kernel-feedback-list, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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_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.
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-20 4:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-18 9:44 [PATCH net-next] net: vmxnet3: convert to use .get_rx_ring_count Breno Leitao
2025-11-20 4:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®