Commit 57d0f00d authored by Dotan Barak's avatar Dotan Barak Committed by David S. Miller
Browse files

mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes

The reason for the pre-allocation of one CQE is to enable resizing of
the CQ.
Fix comment accordingly.

Signed-off-by: default avatarDotan Barak <>
Signed-off-by: default avatarEli Cohen <>
Signed-off-by: default avatarVladimir Sokolovsky <>
Signed-off-by: default avatarYuval Shaia <>
Reviewed-by: default avatarTariq Toukan <>
Signed-off-by: default avatarDavid S. Miller <>
parent e684000b
......@@ -514,8 +514,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
dev->caps.max_rq_desc_sz = dev_cap->max_rq_desc_sz;
* Subtract 1 from the limit because we need to allocate a
* spare CQE so the HCA HW can tell the difference between an
* empty CQ and a full CQ.
* spare CQE to enable resizing the CQ.
dev->caps.max_cqes = dev_cap->max_cq_sz - 1;
dev->caps.reserved_cqs = dev_cap->reserved_cqs;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment