mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
mlx4: Fixing bad size of event queue buffer
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
53020092bd
commit
c379474591
1 changed files with 3 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue