Message ID | 20200706075419.361484-3-kamalheib1@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | RDMA/providers: Set max_pkey attribute | expand |
On 06/07/2020 10:54, Kamal Heib wrote: > Make sure to set the max_pkeys attribute to indicate the maximum number > of partitions supported by the efa device. > > Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") > Signed-off-by: Kamal Heib <kamalheib1@gmail.com> > Cc: Gal Pressman <galpress@amazon.com> > --- > drivers/infiniband/hw/efa/efa_verbs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c > index 08313f7c73bc..7dd082441333 100644 > --- a/drivers/infiniband/hw/efa/efa_verbs.c > +++ b/drivers/infiniband/hw/efa/efa_verbs.c > @@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev, > props->max_send_sge = dev_attr->max_sq_sge; > props->max_recv_sge = dev_attr->max_rq_sge; > props->max_sge_rd = dev_attr->max_wr_rdma_sge; > + props->max_pkeys = 1; > > if (udata && udata->outlen) { > resp.max_sq_sge = dev_attr->max_sq_sge; > Thanks Kamal, a similar patch was already merged: f25022a53ef3 ("RDMA/efa: Set maximum pkeys device attribute")
On Mon, Jul 06, 2020 at 10:58:34AM +0300, Gal Pressman wrote: > On 06/07/2020 10:54, Kamal Heib wrote: > > Make sure to set the max_pkeys attribute to indicate the maximum number > > of partitions supported by the efa device. > > > > Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") > > Signed-off-by: Kamal Heib <kamalheib1@gmail.com> > > Cc: Gal Pressman <galpress@amazon.com> > > --- > > drivers/infiniband/hw/efa/efa_verbs.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c > > index 08313f7c73bc..7dd082441333 100644 > > --- a/drivers/infiniband/hw/efa/efa_verbs.c > > +++ b/drivers/infiniband/hw/efa/efa_verbs.c > > @@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev, > > props->max_send_sge = dev_attr->max_sq_sge; > > props->max_recv_sge = dev_attr->max_rq_sge; > > props->max_sge_rd = dev_attr->max_wr_rdma_sge; > > + props->max_pkeys = 1; > > > > if (udata && udata->outlen) { > > resp.max_sq_sge = dev_attr->max_sq_sge; > > > > Thanks Kamal, a similar patch was already merged: > f25022a53ef3 ("RDMA/efa: Set maximum pkeys device attribute") Correct, Now I see it with diff commit id under the for-rc branch, while I did my work on top of the for-next branch. I'll send a v2 that drops this patch. 0133654d8eb8 RDMA/efa: Set maximum pkeys device attribute Thanks, Kamal
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index 08313f7c73bc..7dd082441333 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev, props->max_send_sge = dev_attr->max_sq_sge; props->max_recv_sge = dev_attr->max_rq_sge; props->max_sge_rd = dev_attr->max_wr_rdma_sge; + props->max_pkeys = 1; if (udata && udata->outlen) { resp.max_sq_sge = dev_attr->max_sq_sge;
Make sure to set the max_pkeys attribute to indicate the maximum number of partitions supported by the efa device. Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation") Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Cc: Gal Pressman <galpress@amazon.com> --- drivers/infiniband/hw/efa/efa_verbs.c | 1 + 1 file changed, 1 insertion(+)