Message ID | 1559222731-16715-8-git-send-email-maxg@mellanox.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Introduce new API for T10-PI offload | expand |
> + props->max_pi_fast_reg_page_list_len = > + props->max_fast_reg_page_list_len / 2; is it page_list_len or sg_list_len? Also need to document that both data and meta sges need to fit in this (and not respectively)
On 6/5/2019 10:28 PM, Sagi Grimberg wrote: > >> + props->max_pi_fast_reg_page_list_len = >> + props->max_fast_reg_page_list_len / 2; > > is it page_list_len or sg_list_len? Also need to document that > both data and meta sges need to fit in this (and not respectively) in iSER: if (iser_conn->ib_conn.pi_support) max_num_sg = attr->max_pi_fast_reg_page_list_len; else max_num_sg = attr->max_fast_reg_page_list_len; so max_pi_fast_reg_page_list_len is the length of *each* list in case we do PI (not the sum of the 2 lists length), the same way as max_fast_reg_page_list_len is the length of the list in the non-PI case.
>>> + props->max_pi_fast_reg_page_list_len = >>> + props->max_fast_reg_page_list_len / 2; >> >> is it page_list_len or sg_list_len? Also need to document that >> both data and meta sges need to fit in this (and not respectively) > > > in iSER: > > > if (iser_conn->ib_conn.pi_support) > max_num_sg = attr->max_pi_fast_reg_page_list_len; > else > max_num_sg = attr->max_fast_reg_page_list_len; > > > so max_pi_fast_reg_page_list_len is the length of *each* list in case we > do PI (not the sum of the 2 lists length), the same way as > max_fast_reg_page_list_len is the length of the list in the non-PI case. OK, I thought it was related to the fact that we use klms which are twice the size of mtts.
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index b6588cdef1cf..7b48aeafef9e 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1008,6 +1008,8 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, props->max_srq_sge = max_rq_sg - 1; props->max_fast_reg_page_list_len = 1 << MLX5_CAP_GEN(mdev, log_max_klm_list_size); + props->max_pi_fast_reg_page_list_len = + props->max_fast_reg_page_list_len / 2; get_atomic_caps_qp(dev, props); props->masked_atomic_cap = IB_ATOMIC_NONE; props->max_mcast_grp = 1 << MLX5_CAP_GEN(mdev, log_max_mcg); diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 0a1713b86398..6e30ca4f1ef5 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -401,6 +401,7 @@ struct ib_device_attr { int max_srq_wr; int max_srq_sge; unsigned int max_fast_reg_page_list_len; + unsigned int max_pi_fast_reg_page_list_len; u16 max_pkeys; u8 local_ca_ack_delay; int sig_prot_cap;