net: enetc: fix the output issue of 'ethtool --show-ring'
Wei Fang
maintainerPATCH 1/1 net: enetc: fix the output issue of 'ethtool --show-ring'
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.
--- drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c +2 -0
@@ -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;
Signature · 1 line
2.34.1
Jakub Kicinski
maintainerQuoted 6 lines · On Thu, 19 Mar 2026 15:27:16 +0800 Wei Fang wrote:
Currently,
enetc_get_ringparam()only providesrx_pendingandtx_pending, but 'ethtool --show-ring' no longer displays these fields. Because the ringparam retrieval path has moved to the new netlink interface, whererings_fill_reply()emits rx_pending/tx_pending only if the corresponding rx_max_pending/tx_max_pending values are non-zero. Sorx_max_pendingandtx_max_pendingto are added toenetc_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?
Wei Fang
maintainerQuoted 6 lines · On Thu, 19 Mar 2026 15:27:16 +0800 Wei Fang wrote:
Quoted 5 lines
Currently,
enetc_get_ringparam()only providesrx_pendingandtx_pending, but 'ethtool --show-ring' no longer displays these fields. Because the ringparam retrieval path has moved to the new netlink interface, whererings_fill_reply()emits rx_pending/tx_pending only if the corresponding rx_max_pending/tx_max_pending values are non-zero. Sorx_max_pending
Quoted 7 lines
and
Quoted 1 line
tx_max_pendingto are added toenetc_get_ringparam()to fix the issue.Why set it to 64k vs priv->*x_bd_count ?
There's notset_ringparamso 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.