Skip to content

Commit 911f433

Browse files
Sagi Grimbergdledford
authored andcommitted
IB/mlx5: Expose correct max_fast_reg_page_list_len
While documentation indicates that the number of translation entries per memory key is unlimited, in practice, we can only fit a finite amount of translation entries in a single registration wqe (which is log_max_klm_list_size). Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 0025b0b commit 911f433

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
539539
props->local_ca_ack_delay = MLX5_CAP_GEN(mdev, local_ca_ack_delay);
540540
props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp;
541541
props->max_srq_sge = max_rq_sg - 1;
542-
props->max_fast_reg_page_list_len = (unsigned int)-1;
542+
props->max_fast_reg_page_list_len =
543+
1 << MLX5_CAP_GEN(mdev, log_max_klm_list_size);
543544
get_atomic_caps(dev, props);
544545
props->masked_atomic_cap = IB_ATOMIC_NONE;
545546
props->max_mcast_grp = 1 << MLX5_CAP_GEN(mdev, log_max_mcg);

0 commit comments

Comments
 (0)