From: Adit Ranadive <aditr@vmware.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
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 17:06:07 +0000 [thread overview]
Message-ID: <48518d0c-f04a-fa80-71f1-bf8db27da36e@vmware.com> (raw)
In-Reply-To: <20191028165813.GG29652@ziepe.ca>
On 10/28/19 9:58 AM, Jason Gunthorpe wrote:
> On Mon, Oct 28, 2019 at 04:46:09PM +0000, Adit Ranadive wrote:
>> On 10/28/19 9:27 AM, Jason Gunthorpe wrote:
>>> 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.
>>
>> I thought about using != or < before sending the patch. Since we removed
>> the flag anyways using != here made sense to be more strict about what's
>> acceptable. I'm not sure if we'll ever make it bigger.
>
> It is a big gamble you will never need to add new entries to this
> struct forever more. Better to be safe, IMHO.
>
Okay. Will send a v3 for this.
prev parent reply other threads:[~2019-10-28 17:06 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
2019-10-28 16:46 ` Adit Ranadive
2019-10-28 16:58 ` Jason Gunthorpe
2019-10-28 17:06 ` Adit Ranadive [this message]
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=48518d0c-f04a-fa80-71f1-bf8db27da36e@vmware.com \
--to=aditr@vmware.com \
--cc=Pv-drivers@vmware.com \
--cc=bryantan@vmware.com \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--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