diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2009-08-07 06:27:51 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-07 06:27:51 +0400 |
commit | b6b912e0804dc1b3e856da3cc82fbe78b50e968c (patch) | |
tree | cc35371a7ad0caed0841183cf7356b398b1e9588 /drivers/net/mlx4/en_main.c | |
parent | a35ee541a66d11d26da30d3f6046dbddd073334e (diff) | |
download | linux-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.c | 5 |
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); } |