Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: Honggang LI <honggangli@163.com>,
	zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org,
	linux-rdma@vger.kernel.org
Cc: dledford@redhat.com, kamalh@mellanox.com, amirv@mellanox.com,
	monis@mellanox.com, haggaie@mellanox.com
Subject: Re: [PATCH] RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
Date: Mon, 24 Jun 2024 21:33:06 +0800	[thread overview]
Message-ID: <93f8901a-15fb-4a5b-a378-f26c8c93b43a@linux.dev> (raw)
In-Reply-To: <20240624020348.494338-1-honggangli@163.com>

在 2024/6/24 10:03, Honggang LI 写道:
> BTH_ACK_MASK bit is used to indicate that an acknowledge
> (for this packet) should be scheduled by the responder.
> Both UC and UD QPs are unacknowledged, so don't set
> BTH_ACK_MASK for UC or UD QPs.

 From IBTA
"
o9-30: If a TCA responder implements Reliable Connection service, or if
a CA responder implements Reliable Datagram or XRC service, the 
responder shall behave as follows. A responder shall acknowledge each 
request packet received. A responder shall generate an explicit response
for each RDMA READ request received. A responder shall generate an
explicit response for each ATOMIC Request received. A responder shall
generate response packets in the PSN order in which the original request
packets were received, including RDMA READ responses.
"

This ack_req should be based on "Reliable Connection service".
As such, I am fine with this commit.

Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>

Thanks,
Zhu Yanjun

> 
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Honggang LI <honggangli@163.com>
> ---
>   drivers/infiniband/sw/rxe/rxe_req.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
> index cd14c4c2dff9..ffd7ed712a02 100644
> --- a/drivers/infiniband/sw/rxe/rxe_req.c
> +++ b/drivers/infiniband/sw/rxe/rxe_req.c
> @@ -445,8 +445,12 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
>   	qp_num = (pkt->mask & RXE_DETH_MASK) ? ibwr->wr.ud.remote_qpn :
>   					 qp->attr.dest_qp_num;
>   
> -	ack_req = ((pkt->mask & RXE_END_MASK) ||
> -		(qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK));
> +	if (qp_type(qp) == IB_QPT_UD || qp_type(qp) == IB_QPT_UC)
> +		ack_req = 0;
> +	else {
> +		ack_req = ((pkt->mask & RXE_END_MASK) ||
> +			(qp->req.noack_pkts++ > RXE_MAX_PKT_PER_ACK));
> +	}
>   	if (ack_req)
>   		qp->req.noack_pkts = 0;
>   


  reply	other threads:[~2024-06-24 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  2:03 [PATCH] RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs Honggang LI
2024-06-24 13:33 ` Zhu Yanjun [this message]
2024-06-24 14:18 ` Leon Romanovsky
2024-06-24 14:18 ` Leon Romanovsky

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=93f8901a-15fb-4a5b-a378-f26c8c93b43a@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=amirv@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=haggaie@mellanox.com \
    --cc=honggangli@163.com \
    --cc=jgg@ziepe.ca \
    --cc=kamalh@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.com \
    --cc=zyjzyj2000@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