* [PATCH 4/9 V2] mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
@ 2008-12-29 9:56 Yevgeny Petrilin
2008-12-30 2:38 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Petrilin @ 2008-12-29 9:56 UTC (permalink / raw)
To: davem; +Cc: jeff, rdreier, netdev
Required in cases were dev->caps.num_comp_vectors > MAX_RX_RINGS.
For current values this would happen on machines that have more
then 16 cores.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
drivers/net/mlx4/en_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index c1c0585..34f3a19 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -170,7 +170,8 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
mlx4_info(mdev, "Using %d tx rings for port:%d\n",
mdev->profile.prof[i].tx_ring_num, i);
if (!mdev->profile.prof[i].rx_ring_num) {
- mdev->profile.prof[i].rx_ring_num = dev->caps.num_comp_vectors;
+ mdev->profile.prof[i].rx_ring_num =
+ min_t(int, 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);
} else
--
1.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-30 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-29 9:56 [PATCH 4/9 V2] mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS Yevgeny Petrilin
2008-12-30 2:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).