projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68888d1
)
mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
author
Yevgeny Petrilin
<
[email protected]
>
Tue, 30 Dec 2008 02:38:21 +0000
(18:38 -0800)
committer
David S. Miller
<
[email protected]
>
Tue, 30 Dec 2008 02:38:21 +0000
(18:38 -0800)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/mlx4/en_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/mlx4/en_main.c
b/drivers/net/mlx4/en_main.c
index c1c05852a95ebf34e357f86a6b0465758e5458f9..34f3a191fbdf759b755c9acffcd8339bc0d4ffba 100644
(file)
--- 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