diff mbox series

[for-rc,v1,1/4] RDMA/siw: Set max_pkeys attribute

Message ID 20200706091119.367697-2-kamalheib1@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series RDMA/providers: Set max_pkey attribute | expand

Commit Message

Kamal Heib July 6, 2020, 9:11 a.m. UTC
Make sure to set the max_pkeys attribute to indicate the maximum number
of partitions supported by the siw device.

Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Cc: Bernard Metzler <bmt@zurich.ibm.com>
---
 drivers/infiniband/sw/siw/siw_verbs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Bernard Metzler July 6, 2020, 2:57 p.m. UTC | #1
-----"Kamal Heib" <kamalheib1@gmail.com> wrote: -----

>To: linux-rdma@vger.kernel.org
>From: "Kamal Heib" <kamalheib1@gmail.com>
>Date: 07/06/2020 11:11AM
>Cc: "Jason Gunthorpe" <jgg@ziepe.ca>, "Doug Ledford"
><dledford@redhat.com>, "Kamal Heib" <kamalheib1@gmail.com>, "Bernard
>Metzler" <bmt@zurich.ibm.com>
>Subject: [EXTERNAL] [PATCH for-rc v1 1/4] RDMA/siw: Set max_pkeys
>attribute
>
>Make sure to set the max_pkeys attribute to indicate the maximum
>number
>of partitions supported by the siw device.
>
>Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
>Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
>Cc: Bernard Metzler <bmt@zurich.ibm.com>
>---
> drivers/infiniband/sw/siw/siw_verbs.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
>b/drivers/infiniband/sw/siw/siw_verbs.c
>index 987e2ba05dbc..bef35d566aee 100644
>--- a/drivers/infiniband/sw/siw/siw_verbs.c
>+++ b/drivers/infiniband/sw/siw/siw_verbs.c
>@@ -151,6 +151,7 @@ int siw_query_device(struct ib_device *base_dev,
>struct ib_device_attr *attr,
> 	attr->max_srq = sdev->attrs.max_srq;
> 	attr->max_srq_sge = sdev->attrs.max_srq_sge;
> 	attr->max_srq_wr = sdev->attrs.max_srq_wr;
>+	attr->max_pkeys = 1;
> 	attr->page_size_cap = PAGE_SIZE;
> 	attr->vendor_id = SIW_VENDOR_ID;
> 	attr->vendor_part_id = sdev->vendor_part_id;
>-- 
>2.25.4
>
>
Thank you!
Reviewed-by: Bernard Metzler <bmt@zurich.ibm.com>
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index 987e2ba05dbc..bef35d566aee 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -151,6 +151,7 @@  int siw_query_device(struct ib_device *base_dev, struct ib_device_attr *attr,
 	attr->max_srq = sdev->attrs.max_srq;
 	attr->max_srq_sge = sdev->attrs.max_srq_sge;
 	attr->max_srq_wr = sdev->attrs.max_srq_wr;
+	attr->max_pkeys = 1;
 	attr->page_size_cap = PAGE_SIZE;
 	attr->vendor_id = SIW_VENDOR_ID;
 	attr->vendor_part_id = sdev->vendor_part_id;