diff mbox series

[for-rc] RDMA/efa: Set maximum pkeys device attribute

Message ID 20200614103534.88060-1-galpress@amazon.com (mailing list archive)
State Mainlined
Commit 0133654d8eb8607eacc96badfe49bf992155f4cb
Delegated to: Jason Gunthorpe
Headers show
Series [for-rc] RDMA/efa: Set maximum pkeys device attribute | expand

Commit Message

Gal Pressman June 14, 2020, 10:35 a.m. UTC
The max_pkeys device attribute was not set in query device verb, set it
to one in order to account for the default pkey (0xffff).

Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
Reviewed-by: Firas JahJah <firasj@amazon.com>
Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/hw/efa/efa_verbs.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: 3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162

Comments

Jason Gunthorpe June 18, 2020, 12:46 p.m. UTC | #1
On Sun, Jun 14, 2020 at 01:35:34PM +0300, Gal Pressman wrote:
> The max_pkeys device attribute was not set in query device verb, set it
> to one in order to account for the default pkey (0xffff).
> 
> Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
> Reviewed-by: Firas JahJah <firasj@amazon.com>
> Reviewed-by: Yossi Leybovich <sleybo@amazon.com>
> Signed-off-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_verbs.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-rc 

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 5c57098a4aee..3420c7742486 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -209,6 +209,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;