From: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
To: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>
Cc: "rpearsonhpe@gmail.com" <rpearsonhpe@gmail.com>,
"leon@kernel.org" <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [rdma-core PATCH] providers/rxe: Replace '%' with '&' in check_qp_queue_full()
Date: Tue, 11 Jan 2022 02:22:58 +0000 [thread overview]
Message-ID: <61DCEA00.1030002@fujitsu.com> (raw)
In-Reply-To: <20220111014145.2374669-1-yangx.jy@fujitsu.com>
On 2022/1/11 9:41, Xiao Yang wrote:
> The expression "cons == ((qp->cur_index + 1) % q->index_mask)" mistakenly
> assumes the queue is full when qp->cur_index is equal to "maximum - 1"
> (maximum is correct).
Hi All,
The commit message seems inappropriate so I will resend this patch.
Best Regards,
Xiao Yang
> For example:
> If cons and qp->cur_index are 0 and q->index_mask is 1, check_qp_queue_full()
> reports ENOSPC.
>
> Fixes: 1a894ca10105 ("Providers/rxe: Implement ibv_create_qp_ex verb")
> Signed-off-by: Xiao Yang <yangx.jy@fujitsu.com>
> ---
> providers/rxe/rxe_queue.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/providers/rxe/rxe_queue.h b/providers/rxe/rxe_queue.h
> index 6de8140c..708e76ac 100644
> --- a/providers/rxe/rxe_queue.h
> +++ b/providers/rxe/rxe_queue.h
> @@ -205,7 +205,7 @@ static inline int check_qp_queue_full(struct rxe_qp *qp)
> if (qp->err)
> goto err;
>
> - if (cons == ((qp->cur_index + 1) % q->index_mask))
> + if (cons == ((qp->cur_index + 1) & q->index_mask))
> qp->err = ENOSPC;
> err:
> return qp->err;
next prev parent reply other threads:[~2022-01-11 2:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 1:41 [rdma-core PATCH] providers/rxe: Replace '%' with '&' in check_qp_queue_full() Xiao Yang
2022-01-11 2:22 ` yangx.jy [this message]
2022-01-13 20:51 ` Bob Pearson
2022-01-17 11:12 ` Haakon Bugge
2022-01-17 14:35 ` Jason Gunthorpe
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=61DCEA00.1030002@fujitsu.com \
--to=yangx.jy@fujitsu.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
/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.