* [PATCH] IB/mlx5: Expose correct max_fast_reg_page_list_len
@ 2016-03-03 11:37 Sagi Grimberg
[not found] ` <1457005071-4900-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Sagi Grimberg @ 2016-03-03 11:37 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Matan Barak, Leon Romanovsky
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 <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 90c5e24..136ed67 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -536,7 +536,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
props->local_ca_ack_delay = MLX5_CAP_GEN(mdev, local_ca_ack_delay);
props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp;
props->max_srq_sge = max_rq_sg - 1;
- props->max_fast_reg_page_list_len = (unsigned int)-1;
+ props->max_fast_reg_page_list_len =
+ 1 << MLX5_CAP_GEN(mdev, log_max_klm_list_size);
get_atomic_caps(dev, props);
props->masked_atomic_cap = IB_ATOMIC_NONE;
props->max_mcast_grp = 1 << MLX5_CAP_GEN(mdev, log_max_mcg);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IB/mlx5: Expose correct max_fast_reg_page_list_len
[not found] ` <1457005071-4900-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2016-03-03 16:27 ` Doug Ledford
0 siblings, 0 replies; 2+ messages in thread
From: Doug Ledford @ 2016-03-03 16:27 UTC (permalink / raw)
To: Sagi Grimberg
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Matan Barak, Leon Romanovsky
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
On 03/03/2016 06:37 AM, Sagi Grimberg wrote:
> 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 <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/hw/mlx5/main.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> index 90c5e24..136ed67 100644
> --- a/drivers/infiniband/hw/mlx5/main.c
> +++ b/drivers/infiniband/hw/mlx5/main.c
> @@ -536,7 +536,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
> props->local_ca_ack_delay = MLX5_CAP_GEN(mdev, local_ca_ack_delay);
> props->max_res_rd_atom = props->max_qp_rd_atom * props->max_qp;
> props->max_srq_sge = max_rq_sg - 1;
> - props->max_fast_reg_page_list_len = (unsigned int)-1;
> + props->max_fast_reg_page_list_len =
> + 1 << MLX5_CAP_GEN(mdev, log_max_klm_list_size);
> get_atomic_caps(dev, props);
> props->masked_atomic_cap = IB_ATOMIC_NONE;
> props->max_mcast_grp = 1 << MLX5_CAP_GEN(mdev, log_max_mcg);
>
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-03 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 11:37 [PATCH] IB/mlx5: Expose correct max_fast_reg_page_list_len Sagi Grimberg
[not found] ` <1457005071-4900-1-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-03-03 16:27 ` Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox