]> 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)
commitb4078e05e27a75bb4245b9b3489fedcadae32c2d
treeac2651c5d31fede401c5e8348abdb04431ef7c12
parenta4154c538b0734e93148264aa89cd73323a7ad86
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: 0fbb3be946fa ('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