* [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count
@ 2026-01-08 11:43 Breno Leitao
2026-01-12 15:26 ` Simon Horman
2026-01-12 20:57 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Breno Leitao @ 2026-01-08 11:43 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Breno Leitao
Convert the stmmac driver to use the new .get_rx_ring_count
ethtool operation instead of implementing .get_rxnfc for handling
ETHTOOL_GRXRINGS command.
Since stmmac_get_rxnfc() only handled ETHTOOL_GRXRINGS (returning
-EOPNOTSUPP for all other commands), remove it entirely and replace
it with the simpler stmmac_get_rx_ring_count() callback.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
Changes in v2:
- no change from v1. Basically resending it now that net-next is open.
- Link to v1: https://patch.msgid.link/20251222-gxring_stmicro-v1-1-d018a14644a5@debian.org
---
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index b155e71aac51..c1e26965d9b5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -914,20 +914,11 @@ static int stmmac_set_per_queue_coalesce(struct net_device *dev, u32 queue,
return __stmmac_set_coalesce(dev, ec, queue);
}
-static int stmmac_get_rxnfc(struct net_device *dev,
- struct ethtool_rxnfc *rxnfc, u32 *rule_locs)
+static u32 stmmac_get_rx_ring_count(struct net_device *dev)
{
struct stmmac_priv *priv = netdev_priv(dev);
- switch (rxnfc->cmd) {
- case ETHTOOL_GRXRINGS:
- rxnfc->data = priv->plat->rx_queues_to_use;
- break;
- default:
- return -EOPNOTSUPP;
- }
-
- return 0;
+ return priv->plat->rx_queues_to_use;
}
static u32 stmmac_get_rxfh_key_size(struct net_device *dev)
@@ -1121,7 +1112,7 @@ static const struct ethtool_ops stmmac_ethtool_ops = {
.get_eee = stmmac_ethtool_op_get_eee,
.set_eee = stmmac_ethtool_op_set_eee,
.get_sset_count = stmmac_get_sset_count,
- .get_rxnfc = stmmac_get_rxnfc,
+ .get_rx_ring_count = stmmac_get_rx_ring_count,
.get_rxfh_key_size = stmmac_get_rxfh_key_size,
.get_rxfh_indir_size = stmmac_get_rxfh_indir_size,
.get_rxfh = stmmac_get_rxfh,
---
base-commit: 8e7148b5602321be48614bcde048cbe1c738ce3e
change-id: 20251222-gxring_stmicro-40bac6fcad86
Best regards,
--
Breno Leitao <leitao@debian.org>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count
2026-01-08 11:43 [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count Breno Leitao
@ 2026-01-12 15:26 ` Simon Horman
2026-01-12 20:57 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-01-12 15:26 UTC (permalink / raw)
To: Breno Leitao
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Maxime Coquelin, Alexandre Torgue, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
On Thu, Jan 08, 2026 at 03:43:00AM -0800, Breno Leitao wrote:
> Convert the stmmac driver to use the new .get_rx_ring_count
> ethtool operation instead of implementing .get_rxnfc for handling
> ETHTOOL_GRXRINGS command.
>
> Since stmmac_get_rxnfc() only handled ETHTOOL_GRXRINGS (returning
> -EOPNOTSUPP for all other commands), remove it entirely and replace
> it with the simpler stmmac_get_rx_ring_count() callback.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> Changes in v2:
> - no change from v1. Basically resending it now that net-next is open.
> - Link to v1: https://patch.msgid.link/20251222-gxring_stmicro-v1-1-d018a14644a5@debian.org
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count
2026-01-08 11:43 [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count Breno Leitao
2026-01-12 15:26 ` Simon Horman
@ 2026-01-12 20:57 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-01-12 20:57 UTC (permalink / raw)
To: Breno Leitao
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
alexandre.torgue, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 08 Jan 2026 03:43:00 -0800 you wrote:
> Convert the stmmac driver to use the new .get_rx_ring_count
> ethtool operation instead of implementing .get_rxnfc for handling
> ETHTOOL_GRXRINGS command.
>
> Since stmmac_get_rxnfc() only handled ETHTOOL_GRXRINGS (returning
> -EOPNOTSUPP for all other commands), remove it entirely and replace
> it with the simpler stmmac_get_rx_ring_count() callback.
>
> [...]
Here is the summary with links:
- [net-next,v2] net: stmmac: convert to use .get_rx_ring_count
https://git.kernel.org/netdev/net-next/c/959728f9931e
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] 3+ messages in thread
end of thread, other threads:[~2026-01-12 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 11:43 [PATCH net-next v2] net: stmmac: convert to use .get_rx_ring_count Breno Leitao
2026-01-12 15:26 ` Simon Horman
2026-01-12 20:57 ` 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