[ofa-general] [PATCH] IB-mlx4: query_device needs to return one less srq wqe for max_srq_wr
Jack Morgenstein
jackm at dev.mellanox.co.il
Tue Jun 19 08:20:46 PDT 2007
Need to have 1 spare wqe for srq (so that there is always a "next wqe" available
when posting).
Found by Mellanox QA
Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
index 402f3a2..6cb0ba1 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -120,7 +120,7 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
props->max_qp_init_rd_atom = dev->dev->caps.max_qp_init_rdma;
props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp;
props->max_srq = dev->dev->caps.num_srqs - dev->dev->caps.reserved_srqs;
- props->max_srq_wr = dev->dev->caps.max_srq_wqes;
+ props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1;
props->max_srq_sge = dev->dev->caps.max_srq_sge;
props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay;
props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ?
More information about the general
mailing list