Skip to content

Commit 70b439b

Browse files
WeiFang-NXPkuba-moo
authored andcommitted
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 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: e4a1717 ("ethtool: provide ring sizes with RINGS_GET request") Signed-off-by: Wei Fang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e537dd1 commit 70b439b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/freescale/enetc/enetc_ethtool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ static void enetc_get_ringparam(struct net_device *ndev,
813813
{
814814
struct enetc_ndev_priv *priv = netdev_priv(ndev);
815815

816+
ring->rx_max_pending = priv->rx_bd_count;
817+
ring->tx_max_pending = priv->tx_bd_count;
816818
ring->rx_pending = priv->rx_bd_count;
817819
ring->tx_pending = priv->tx_bd_count;
818820

0 commit comments

Comments
 (0)