* [PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring'
@ 2026-03-19 7:27 Wei Fang
2026-03-19 16:22 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Wei Fang @ 2026-03-19 7:27 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 rx_pending/tx_pending only if the corresponding
rx_max_pending/tx_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.
Fixes: e4a1717b677c ("ethtool: provide ring sizes with RINGS_GET request")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
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..0818a6e8e6db 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 = SZ_64K;
+ ring->tx_max_pending = SZ_64K;
ring->rx_pending = priv->rx_bd_count;
ring->tx_pending = priv->tx_bd_count;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring'
2026-03-19 7:27 [PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring' Wei Fang
@ 2026-03-19 16:22 ` Jakub Kicinski
2026-03-20 2:02 ` Wei Fang
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-03-19 16:22 UTC (permalink / raw)
To: Wei Fang
Cc: claudiu.manoil, vladimir.oltean, xiaoning.wang, andrew+netdev,
davem, edumazet, pabeni, mkubecek, netdev, linux-kernel, imx
On Thu, 19 Mar 2026 15:27:16 +0800 Wei Fang 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 rx_pending/tx_pending only if the corresponding
> rx_max_pending/tx_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.
Why set it to 64k vs priv->*x_bd_count ?
There's not set_ringparam so user can't actually change the value,
wouldn't setting max to 64k give user the impression they can increase
the size?
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring'
2026-03-19 16:22 ` Jakub Kicinski
@ 2026-03-20 2:02 ` Wei Fang
0 siblings, 0 replies; 3+ messages in thread
From: Wei Fang @ 2026-03-20 2:02 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Claudiu Manoil, Vladimir Oltean, Clark Wang,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, mkubecek@suse.cz, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev
> On Thu, 19 Mar 2026 15:27:16 +0800 Wei Fang 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 rx_pending/tx_pending only if the corresponding
> > rx_max_pending/tx_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.
>
> Why set it to 64k vs priv->*x_bd_count ?
> There's not set_ringparam so user can't actually change the value,
> wouldn't setting max to 64k give user the impression they can increase
> the size?
I thought that *x_max_pending represents the hardware's capabilities. You
are right, we don't currently support set_ringparam(), which might cause
confusion for users. I will change them to priv->*x_bd_count and state this
in the commit message, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-20 2:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 7:27 [PATCH net] net: enetc: fix the output issue of 'ethtool --show-ring' Wei Fang
2026-03-19 16:22 ` Jakub Kicinski
2026-03-20 2:02 ` Wei Fang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox