aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_main.c
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2009-08-06 22:27:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-06 22:27:51 -0400
commitb6b912e0804dc1b3e856da3cc82fbe78b50e968c (patch)
treecc35371a7ad0caed0841183cf7356b398b1e9588 /drivers/net/mlx4/en_main.c
parenta35ee541a66d11d26da30d3f6046dbddd073334e (diff)
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)
218 mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { 218 mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) {
219 mlx4_info(mdev, "Using %d tx rings for port:%d\n", 219 mlx4_info(mdev, "Using %d tx rings for port:%d\n",
220 mdev->profile.prof[i].tx_ring_num, i); 220 mdev->profile.prof[i].tx_ring_num, i);
221 mdev->profile.prof[i].rx_ring_num = 221 mdev->profile.prof[i].rx_ring_num = min_t(int,
222 min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS); 222 roundup_pow_of_two(dev->caps.num_comp_vectors),
223 MAX_RX_RINGS);
223 mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n", 224 mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
224 mdev->profile.prof[i].rx_ring_num, i); 225 mdev->profile.prof[i].rx_ring_num, i);
225 } 226 }