From: Bart Van Assche <Bart.VanAssche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org"
<sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
Cc: "hch-jcswGhMUV9g@public.gmane.org" <hch-jcswGhMUV9g@public.gmane.org>
Subject: Re: [PATCH] IB/cq: Don't process more than the given budget
Date: Wed, 8 Mar 2017 22:09:08 +0000 [thread overview]
Message-ID: <1489010916.2813.4.camel@sandisk.com> (raw)
In-Reply-To: <1489003801-4410-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
On Wed, 2017-03-08 at 22:10 +0200, Sagi Grimberg wrote:
> The caller might not want this overhead.
>
> Signed-off-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
> ---
> drivers/infiniband/core/cq.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/cq.c b/drivers/infiniband/core/cq.c
> index 2746d2eb3d52..c98d15ce2880 100644
> --- a/drivers/infiniband/core/cq.c
> +++ b/drivers/infiniband/core/cq.c
> @@ -29,7 +29,8 @@ static int __ib_process_cq(struct ib_cq *cq, int budget)
> {
> int i, n, completed = 0;
>
> - while ((n = ib_poll_cq(cq, IB_POLL_BATCH, cq->wc)) > 0) {
> + while ((n = ib_poll_cq(cq, min(IB_POLL_BATCH, budget - completed),
> + cq->wc)) > 0) {
> for (i = 0; i < n; i++) {
> struct ib_wc *wc = &cq->wc[i];
>
This breaks the SRP initiator driver since that driver can pass -1 as budget.
Bart.--
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
next prev parent reply other threads:[~2017-03-08 22:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 20:10 [PATCH] IB/cq: Don't process more than the given budget Sagi Grimberg
[not found] ` <1489003801-4410-1-git-send-email-sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-03-08 21:36 ` Christoph Hellwig
2017-03-08 22:09 ` Bart Van Assche [this message]
[not found] ` <1489010916.2813.4.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-03-08 22:12 ` hch-jcswGhMUV9g
[not found] ` <20170308221227.GA447-jcswGhMUV9g@public.gmane.org>
2017-03-08 22:14 ` Bart Van Assche
[not found] ` <1489011263.2813.9.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-03-08 22:59 ` Sagi Grimberg
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=1489010916.2813.4.camel@sandisk.com \
--to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sagi-NQWnxTmZq1alnMjI0IkVqw@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.