From: Jason Gunthorpe <jgg@ziepe.ca>
To: Adit Ranadive <aditr@vmware.com>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Bryan Tan <bryantan@vmware.com>,
Pv-drivers <Pv-drivers@vmware.com>
Subject: Re: [PATCH v2] RDMA/vmw_pvrdma: Use resource ids from physical device if available
Date: Mon, 28 Oct 2019 13:27:56 -0300 [thread overview]
Message-ID: <20191028162756.GA16475@ziepe.ca> (raw)
In-Reply-To: <20191022200642.22762-1-aditr@vmware.com>
On Tue, Oct 22, 2019 at 08:06:50PM +0000, Adit Ranadive wrote:
> @@ -195,7 +198,9 @@ struct ib_qp *pvrdma_create_qp(struct ib_pd *pd,
> union pvrdma_cmd_resp rsp;
> struct pvrdma_cmd_create_qp *cmd = &req.create_qp;
> struct pvrdma_cmd_create_qp_resp *resp = &rsp.create_qp_resp;
> + struct pvrdma_cmd_create_qp_resp_v2 *resp_v2 = &rsp.create_qp_resp_v2;
> struct pvrdma_create_qp ucmd;
> + struct pvrdma_create_qp_resp qp_resp = {};
> unsigned long flags;
> int ret;
> bool is_srq = !!init_attr->srq;
> @@ -260,6 +265,15 @@ struct ib_qp *pvrdma_create_qp(struct ib_pd *pd,
> goto err_qp;
> }
>
> + /* Userspace supports qpn and qp handles? */
> + if (dev->dsr_version >= PVRDMA_QPHANDLE_VERSION &&
> + udata->outlen != sizeof(qp_resp)) {
Is != really what you want? Or is <= better? != means you can't ever
make qp_resp bigger.
> + if (!qp->is_kernel) {
> + if (udata->outlen == sizeof(qp_resp)) {
Same comment, this really should be min()? Didn't I mention that already?
Jason
next prev parent reply other threads:[~2019-10-28 16:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 20:06 [PATCH v2] RDMA/vmw_pvrdma: Use resource ids from physical device if available Adit Ranadive
2019-10-28 16:27 ` Jason Gunthorpe [this message]
2019-10-28 16:46 ` Adit Ranadive
2019-10-28 16:58 ` Jason Gunthorpe
2019-10-28 17:06 ` Adit Ranadive
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=20191028162756.GA16475@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=Pv-drivers@vmware.com \
--cc=aditr@vmware.com \
--cc=bryantan@vmware.com \
--cc=dledford@redhat.com \
--cc=linux-rdma@vger.kernel.org \
/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