Commit 0133654d authored by Gal Pressman's avatar Gal Pressman Committed by Jason Gunthorpe

RDMA/efa: Set maximum pkeys device attribute

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). This information is
exposed to userspace and can cause malfunction

Fixes: 40909f66 ("RDMA/efa: Add EFA verbs implementation")
Link: https://lore.kernel.org/r/20200614103534.88060-1-galpress@amazon.comReviewed-by: default avatarFiras JahJah <firasj@amazon.com>
Reviewed-by: default avatarYossi Leybovich <sleybo@amazon.com>
Signed-off-by: default avatarGal Pressman <galpress@amazon.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 90a239ee
...@@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev, ...@@ -212,6 +212,7 @@ int efa_query_device(struct ib_device *ibdev,
props->max_send_sge = dev_attr->max_sq_sge; props->max_send_sge = dev_attr->max_sq_sge;
props->max_recv_sge = dev_attr->max_rq_sge; props->max_recv_sge = dev_attr->max_rq_sge;
props->max_sge_rd = dev_attr->max_wr_rdma_sge; props->max_sge_rd = dev_attr->max_wr_rdma_sge;
props->max_pkeys = 1;
if (udata && udata->outlen) { if (udata && udata->outlen) {
resp.max_sq_sge = dev_attr->max_sq_sge; resp.max_sq_sge = dev_attr->max_sq_sge;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment