summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/en_main.c
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2009-08-07 06:27:51 +0400
committerDavid S. Miller <davem@davemloft.net>2009-08-07 06:27:51 +0400
commitb6b912e0804dc1b3e856da3cc82fbe78b50e968c (patch)
treecc35371a7ad0caed0841183cf7356b398b1e9588 /drivers/net/mlx4/en_main.c
parenta35ee541a66d11d26da30d3f6046dbddd073334e (diff)
downloadlinux-b6b912e0804dc1b3e856da3cc82fbe78b50e968c.tar.xz
mlx4_en: Using real number of rings as RSS map size
There is no point in using more QPs then actual number of receive rings. If the RSS function for two streams gives the same result modulo number of rings, they will arrive to the same RX ring anyway. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_main.c')
-rw-r--r--drivers/net/mlx4/en_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index 9ed4a158f895..507e11fce9ed 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -218,8 +218,9 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) {
mlx4_info(mdev, "Using %d tx rings for port:%d\n",
mdev->profile.prof[i].tx_ring_num, i);
- mdev->profile.prof[i].rx_ring_num =
- min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS);
+ mdev->profile.prof[i].rx_ring_num = min_t(int,
+ roundup_pow_of_two(dev->caps.num_comp_vectors),
+ MAX_RX_RINGS);
mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
mdev->profile.prof[i].rx_ring_num, i);
}