From: Jason Gunthorpe <jgg@ziepe.ca>
To: Gal Pressman <galpress@amazon.com>
Cc: Yishai Hadas <yishaih@mellanox.com>,
Leon Romanovsky <leonro@mellanox.com>,
linux-rdma@vger.kernel.org, "Leybovich,
Yossi" <sleybo@amazon.com>
Subject: Re: Issue in "Introduce create/destroy QP commands over ioctl"?
Date: Wed, 27 May 2020 09:53:01 -0300 [thread overview]
Message-ID: <20200527125301.GP744@ziepe.ca> (raw)
In-Reply-To: <948a84a4-a8f7-5554-111a-4b191ed0344b@amazon.com>
On Wed, May 27, 2020 at 03:34:33PM +0300, Gal Pressman wrote:
> Hi,
>
> The recent transition of create/destroy QP commands to ioctl broke the EFA
> provider in [1].
> With the new ioctl the 'ibv_resp' part of the response is all zero'd, opposed to
> the write method.
It is a bug in the efa provider. It is not allowed to touch the
'ibv_resp' parts of the structure from a provider.
Something like this
diff --git a/providers/efa/verbs.c b/providers/efa/verbs.c
index 5f8e7b800210bb..92bb7432a92a2b 100644
--- a/providers/efa/verbs.c
+++ b/providers/efa/verbs.c
@@ -541,7 +541,9 @@ static void efa_sq_terminate(struct efa_qp *qp)
efa_wq_terminate(&qp->sq.wq);
}
-static int efa_sq_initialize(struct efa_qp *qp, struct efa_create_qp_resp *resp)
+static int efa_sq_initialize(struct efa_qp *qp,
+ const struct ibv_qp_init_attr_ex *attr,
+ struct efa_create_qp_resp *resp)
{
struct efa_dev *dev = to_efa_dev(qp->verbs_qp.qp.context->device);
size_t desc_ring_size;
@@ -559,7 +561,7 @@ static int efa_sq_initialize(struct efa_qp *qp, struct efa_create_qp_resp *resp)
desc_ring_size = qp->sq.wq.wqe_cnt * sizeof(struct efa_io_tx_wqe);
qp->sq.desc_ring_mmap_size = align(desc_ring_size + qp->sq.desc_offset,
qp->page_size);
- qp->sq.max_inline_data = resp->ibv_resp.max_inline_data;
+ qp->sq.max_inline_data = attr->cap.max_inline_data;
qp->sq.local_queue = malloc(desc_ring_size);
if (!qp->sq.local_queue) {
@@ -840,7 +842,7 @@ static struct ibv_qp *create_qp(struct ibv_context *ibvctx,
if (err)
goto err_destroy_qp;
- err = efa_sq_initialize(qp, &resp);
+ err = efa_sq_initialize(qp, attr, &resp);
if (err)
goto err_terminate_rq;
next prev parent reply other threads:[~2020-05-27 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 12:34 Issue in "Introduce create/destroy QP commands over ioctl"? Gal Pressman
2020-05-27 12:53 ` Jason Gunthorpe [this message]
2020-05-27 13:18 ` Gal Pressman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200527125301.GP744@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=galpress@amazon.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sleybo@amazon.com \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).