]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix ethtool -g/G rx ring parameter report with striding RQ
authorEran Ben Elisha <eranbe@mellanox.com>
Sun, 28 Aug 2016 22:13:46 +0000 (01:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Aug 2016 03:24:15 +0000 (23:24 -0400)
commitadc6e9a0657e537a022c9474d38d5fe0e891c146
treeac2651c5d31fede401c5e8348abdb04431ef7c12
parent8189241cde136a1ee96b6138f8660e8e1983c168
net/mlx5e: Fix ethtool -g/G rx ring parameter report with striding RQ

The driver RQ has two possible configurations: striding RQ and
non-striding RQ.  Until this patch, the driver always reported the
number of hardware WQEs (ring descriptors). For non striding RQ
configuration, this was OK since we have one WQE per pending packet
For striding RQ, multiple packets can fit into one WQE. For better
user experience we normalize the rx_pending parameter (size of wqe/mtu)
as the average ring size in case of striding RQ.

Fixes: 1e2f0e4a69b3 ('net/mlx5e: Support RX multi-packet WQE ...')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c