public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan Tan <bryantan-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+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 11:39:04 -0700	[thread overview]
Message-ID: <20171102183904.GD24375@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> (raw)
In-Reply-To: <20171031140205.GA4317@yuvallap>

On Tue, Oct 31, 2017 at 04:02:07PM +0200, Yuval Shaia wrote:
> > +	if (is_srq) {
> > +		if (dev->dsr->caps.max_srq == 0) {
> 
> Let us be consist, so if in function pvrdma_init_device the assumption is
> that max_srq can have negative value then also check it here. Or on the
> other hands if not (and i assume it is not) then modify the check on
> pvrdma_init_device.
> 
> Also, suggesting:
> 	if (is_srq && !dev->dsr->caps.max_srq)
> Or (if you do not accept my comment):
> 	if (is_srq && dev->dsr->caps.max_srq == 0)
> 

Sure. I'll take your comment and fix the check in
pvrdma_register_device as well.

> > +	if (init_attr->srq_type != IB_SRQT_BASIC)
> > +		return ERR_PTR(-EINVAL);
> > +
> > +	if (init_attr->attr.max_wr  > dev->dsr->caps.max_srq_wr ||
> > +	    init_attr->attr.max_sge > dev->dsr->caps.max_srq_sge)
> 
> Again - let us be consist, if we got warning in pvrdma_create_qp we should
> get one here as well.
> 

Added a warning here, as well as in the srq_type check above.

> > +	if (!(pd->uobject && udata)) {
> > +		/* No support for kernel clients. */
> > +		ret = -EOPNOTSUPP;
> > +		goto err_srq;
> > +	}
> 
> Why this check cannot be performed before the above initialization??
> Also, suggesting a debug message here.
> 

Moved check to beginning, and added a warning here.


Thanks for the review!
Bryan
--
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

      reply	other threads:[~2017-11-02 18:39 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
     [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 [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=20171102183904.GD24375@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com \
    --to=bryantan-pghwnbhtmq7qt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@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