linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Pearson <rpearsonhpe@gmail.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: jgg@nvidia.com, xyjxyj2000@gmail.com, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 5/5] Providers/rxe: Support XRC traffic
Date: Fri, 13 Aug 2021 16:39:53 -0500	[thread overview]
Message-ID: <32738f39-840b-eace-4b4c-900b71fd6d05@gmail.com> (raw)
In-Reply-To: <YQetIxKBrtpBvL5Y@unreal>

On 8/2/21 3:30 AM, Leon Romanovsky wrote:
> On Fri, Jul 30, 2021 at 10:21:58AM -0500, Bob Pearson wrote:
>> Extended create_qp and create_qp_ex verbs to support XRC QP types.
>> Extended WRs to support XRC operations.
>>
>> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
>> ---
>>  providers/rxe/rxe.c | 132 ++++++++++++++++++++++++++++++++------------
>>  1 file changed, 96 insertions(+), 36 deletions(-)
> 
> <...>
> 
>> +static void wr_set_xrc_srqn(struct ibv_qp_ex *ibqp, uint32_t remote_srqn)
>> +{
>> +	struct rxe_qp *qp = container_of(ibqp, struct rxe_qp, vqp.qp_ex);
>> +	struct rxe_send_wqe *wqe = addr_from_index(qp->sq.queue,
>> +						   qp->cur_index - 1);
>> +
>> +	if (qp->err)
>> +		return;
> 
> Why is that?
> 
>> +
>> +	wqe->wr.wr.xrc.srq_num = remote_srqn;
>> +}
>> +

qp->err is used to detect overrun in the send WQ. Each of the 'builders' calls check_qp_queue_full()
and sets qp->err if there isn't any more room in the send queue. Since the routines are of type void
there is no way to tell the caller that something bad has happened. Once the builder fails the
'setters' have to fail as well because there is no place to write the WQE parameters. If this happens
the user space caller will will see the operations succeed up to the point that it ran out of room and
then stop. This is sort of a half solution to the problem. The alternative is to say that the user can
never make this mistake and just keep building WQEs wrapping around the queue.

Bob


      reply	other threads:[~2021-08-13 21:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 15:21 [PATCH 0/5] Providers/rxe: Implement XRC transport for rxe Bob Pearson
2021-07-30 15:21 ` [PATCH 1/5] Update kernel headers Bob Pearson
2021-07-30 15:21 ` [PATCH 2/5] Providers/rxe: Support alloc/dealloc xrcd Bob Pearson
2021-07-30 15:21 ` [PATCH 3/5] Providers/rxe: Support extended create srq Bob Pearson
2021-07-30 15:21 ` [PATCH 4/5] Providers/rxe: Support get srq number Bob Pearson
2021-07-30 15:21 ` [PATCH 5/5] Providers/rxe: Support XRC traffic Bob Pearson
2021-08-02  8:30   ` Leon Romanovsky
2021-08-13 21:39     ` Bob Pearson [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=32738f39-840b-eace-4b4c-900b71fd6d05@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=xyjxyj2000@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).