public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] net: enetc: fix the output issue of 'ethtool --show-ring'
@ 2026-03-20  9:42 Wei Fang
  2026-03-24  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Fang @ 2026-03-20  9:42 UTC (permalink / raw)
  To: claudiu.manoil, vladimir.oltean, xiaoning.wang, andrew+netdev,
	davem, edumazet, kuba, pabeni, mkubecek
  Cc: netdev, linux-kernel, imx

Currently, enetc_get_ringparam() only provides rx_pending and tx_pending,
but 'ethtool --show-ring' no longer displays these fields. Because the
ringparam retrieval path has moved to the new netlink interface, where
rings_fill_reply() emits the *x_pending only if the *x_max_pending values
are non-zero. So rx_max_pending and tx_max_pending to are added to
enetc_get_ringparam() to fix the issue.

Note that the maximum tx/rx ring size of hardware is 64K, but we haven't
added set_ringparam() to make the ring size configurable. To avoid users
mistakenly believing that the ring size can be increased, so set
the *x_max_pending to priv->*x_bd_count.

Fixes: e4a1717b677c ("ethtool: provide ring sizes with RINGS_GET request")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
v2:
Set ring->*x_max_pending to priv->*x_bd_count instead of SZ_64K, this is
also explained in the commit message.
---
 drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index fed89d4f1e1d..2fe140ddebb2 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -813,6 +813,8 @@ static void enetc_get_ringparam(struct net_device *ndev,
 {
 	struct enetc_ndev_priv *priv = netdev_priv(ndev);
 
+	ring->rx_max_pending = priv->rx_bd_count;
+	ring->tx_max_pending = priv->tx_bd_count;
 	ring->rx_pending = priv->rx_bd_count;
 	ring->tx_pending = priv->tx_bd_count;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] net: enetc: fix the output issue of 'ethtool --show-ring'
  2026-03-20  9:42 [PATCH v2] net: enetc: fix the output issue of 'ethtool --show-ring' Wei Fang
@ 2026-03-24  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-24  2:00 UTC (permalink / raw)
  To: Wei Fang
  Cc: claudiu.manoil, vladimir.oltean, xiaoning.wang, andrew+netdev,
	davem, edumazet, kuba, pabeni, mkubecek, netdev, linux-kernel,
	imx

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 20 Mar 2026 17:42:22 +0800 you wrote:
> Currently, enetc_get_ringparam() only provides rx_pending and tx_pending,
> but 'ethtool --show-ring' no longer displays these fields. Because the
> ringparam retrieval path has moved to the new netlink interface, where
> rings_fill_reply() emits the *x_pending only if the *x_max_pending values
> are non-zero. So rx_max_pending and tx_max_pending to are added to
> enetc_get_ringparam() to fix the issue.
> 
> [...]

Here is the summary with links:
  - [v2] net: enetc: fix the output issue of 'ethtool --show-ring'
    https://git.kernel.org/netdev/net/c/70b439bf06f6

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:[~2026-03-24  2:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20  9:42 [PATCH v2] net: enetc: fix the output issue of 'ethtool --show-ring' Wei Fang
2026-03-24  2:00 ` 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