diff options
author | Amir Vadai <amirv@mellanox.com> | 2014-10-27 11:37:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-28 17:18:01 -0400 |
commit | d5ec899adb442161b8ae43777572ef8076f379a0 (patch) | |
tree | 4d41103e45c1b086d74f0b2cd1ec5d1892738196 /drivers/net/ethernet/mellanox/mlx4 | |
parent | 207af6c5073021dfe32ae01d342a4dbf08e57515 (diff) |
net/mlx4_en: Report actual number of rings in indirection table
Hardware requires the number of rings in indirection table to be a power
of 2. When setting number of channels to a non power of 2 number,
indirection table is using only the closest power of 2 rings.
Report this number in 'ethtool -x' and not the total number of rx rings.
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 144d6bdc183f..8ea4d5be7376 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -982,6 +982,7 @@ static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key) int err = 0; rss_rings = priv->prof->rss_rings ?: priv->rx_ring_num; + rss_rings = 1 << ilog2(rss_rings); while (n--) { ring_index[n] = rss_map->qps[n % rss_rings].qpn - |