From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Bryan Tan <bryantan-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH for-next] RDMA/vmw_pvrdma: Add shared receive queue support
Date: Thu, 2 Nov 2017 20:29:32 +0200 [thread overview]
Message-ID: <20171102182932.GH16127@mtr-leonro.local> (raw)
In-Reply-To: <20171102182325.GC24375-qXbCdz4EeRo1jLI2hToXVI42T8aCTgcwy4vvyvUx+exJXi8ZT2ovy+oDBWuYMCC/JZORHMmSJCU@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1928 bytes --]
On Thu, Nov 02, 2017 at 11:23:25AM -0700, Bryan Tan wrote:
> On Thu, Nov 02, 2017 at 08:02:47PM +0200, Leon Romanovsky wrote:
> > > Here we assumed that the verbs layer will only call down to us to
> > > destroy a valid SRQ. If an SRQ has been created, then the srq_tbl
> > > should exist. I can add a check here if that's not behaviour we
> > > should rely on.
> >
> > By saying "verbs layer", are you referring to libibverbs or IB/core?
> >
>
> IB/core. Looking at core/verbs.c, it seems like the parameters are
> assumed to be good. I'm unclear on who is responsible for ensuring
> or checking for good inputs, kernel clients, IB/core, or the driver.
The first one who can recognize the wrong parameters - fail early.
So if IB/core provides to you clean input, there is no need to check it
again.
>
> > > > > +int pvrdma_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
> > > > > + enum ib_srq_attr_mask attr_mask, struct ib_udata *udata)
> > > > > +{
> > > > > + struct pvrdma_srq *vsrq = to_vsrq(ibsrq);
> > > > > + union pvrdma_cmd_req req;
> > > > > + struct pvrdma_cmd_modify_srq *cmd = &req.modify_srq;
> > > > > + struct pvrdma_dev *dev = to_vdev(ibsrq->device);
> > > > > + int ret;
> > > > > +
> > > > > + /* No support for resizing SRQs. */
> > > >
> > > > Better to write that you support, so future additions to ib_srq_attr_mask
> > > > won't need to change your code.
> > > >
> > >
> > > I'm a little unclear on what you mean here. Do you mean that we
> > > should explicitly check for the only attribute we support
> > > (IB_SRQ_LIMIT) and fail otherwise?
> >
> > Yes, it will ensure that your driver doesn't get untested input.
> >
>
> Sure, I will do that then.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-11-02 18:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 2:20 [PATCH for-next] RDMA/vmw_pvrdma: Add shared receive queue support Bryan Tan
[not found] ` <20171030022037.GA20100-qXbCdz4EeRo1jLI2hToXVI42T8aCTgcwy4vvyvUx+exJXi8ZT2ovy+oDBWuYMCC/JZORHMmSJCU@public.gmane.org>
2017-10-30 6:03 ` Leon Romanovsky
[not found] ` <20171030060317.GS16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-02 17:52 ` Bryan Tan
[not found] ` <20171102175225.GB24375-qXbCdz4EeRo1jLI2hToXVI42T8aCTgcwy4vvyvUx+exJXi8ZT2ovy+oDBWuYMCC/JZORHMmSJCU@public.gmane.org>
2017-11-02 18:02 ` Leon Romanovsky
[not found] ` <20171102180247.GF16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-02 18:23 ` Bryan Tan
[not found] ` <20171102182325.GC24375-qXbCdz4EeRo1jLI2hToXVI42T8aCTgcwy4vvyvUx+exJXi8ZT2ovy+oDBWuYMCC/JZORHMmSJCU@public.gmane.org>
2017-11-02 18:29 ` Leon Romanovsky [this message]
[not found] ` <20171102182932.GH16127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-02 23:04 ` Bryan Tan
2017-10-31 14:02 ` Yuval Shaia
2017-11-02 18:39 ` Bryan Tan
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=20171102182932.GH16127@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=bryantan-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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