Skip to content

Commit 12faad5

Browse files
Sindhu-Devalerleon
authored andcommitted
RDMA/irdma: Report the correct max cqes from query device
Report the correct max cqes available to an application taking into account a reserved entry to detect overflow. Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Sindhu-Devale <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent bc7a2c9 commit 12faad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static int irdma_query_device(struct ib_device *ibdev,
3939
props->max_send_sge = hw_attrs->uk_attrs.max_hw_wq_frags;
4040
props->max_recv_sge = hw_attrs->uk_attrs.max_hw_wq_frags;
4141
props->max_cq = rf->max_cq - rf->used_cqs;
42-
props->max_cqe = rf->max_cqe;
42+
props->max_cqe = rf->max_cqe - 1;
4343
props->max_mr = rf->max_mr - rf->used_mrs;
4444
props->max_mw = props->max_mr;
4545
props->max_pd = rf->max_pd - rf->used_pds;

0 commit comments

Comments
 (0)