* [PATCH] mlx4: Fixing bad size of event queue buffer
@ 2011-03-31 9:30 Yevgeny Petrilin
2011-03-31 9:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Petrilin @ 2011-03-31 9:30 UTC (permalink / raw)
To: davem; +Cc: netdev, yevgenyp
We should reduce the number of reserved completion queues from the total
number of entries. Since the queue size is power of two, not reducing the
reserved entries, caused a double queue size, which may lead to allocation
failures in some cases.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
drivers/net/mlx4/eq.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c
index 506cfd0..1ad1f60 100644
--- a/drivers/net/mlx4/eq.c
+++ b/drivers/net/mlx4/eq.c
@@ -603,7 +603,9 @@ int mlx4_init_eq_table(struct mlx4_dev *dev)
}
for (i = 0; i < dev->caps.num_comp_vectors; ++i) {
- err = mlx4_create_eq(dev, dev->caps.num_cqs + MLX4_NUM_SPARE_EQE,
+ err = mlx4_create_eq(dev, dev->caps.num_cqs -
+ dev->caps.reserved_cqs +
+ MLX4_NUM_SPARE_EQE,
(dev->flags & MLX4_FLAG_MSI_X) ? i : 0,
&priv->eq_table.eq[i]);
if (err) {
--
1.6.0.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mlx4: Fixing bad size of event queue buffer
2011-03-31 9:30 [PATCH] mlx4: Fixing bad size of event queue buffer Yevgeny Petrilin
@ 2011-03-31 9:52 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-03-31 9:52 UTC (permalink / raw)
To: yevgenyp; +Cc: netdev
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Thu, 31 Mar 2011 11:30:17 +0200
> We should reduce the number of reserved completion queues from the total
> number of entries. Since the queue size is power of two, not reducing the
> reserved entries, caused a double queue size, which may lead to allocation
> failures in some cases.
>
> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-31 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 9:30 [PATCH] mlx4: Fixing bad size of event queue buffer Yevgeny Petrilin
2011-03-31 9:52 ` 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).