public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bob Pearson <rpearsonhpe@gmail.com>
To: jgg@nvidia.com, zyjzyj2000@gmail.com, linux-rdma@vger.kernel.org
Cc: Bob Pearson <rpearsonhpe@gmail.com>
Subject: [PATCH for-next v5 6/6] RDMA/rxe: Convert kernel UD post send to use ah_num
Date: Tue,  5 Oct 2021 20:58:15 -0500	[thread overview]
Message-ID: <20211006015815.28350-7-rpearsonhpe@gmail.com> (raw)
In-Reply-To: <20211006015815.28350-1-rpearsonhpe@gmail.com>

Modify ib_post_send for kernel UD sends to put the AH index into the
WQE instead of the address vector.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 8854ace63acd..b808777e2221 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -537,8 +537,11 @@ static void init_send_wr(struct rxe_qp *qp, struct rxe_send_wr *wr,
 	if (qp_type(qp) == IB_QPT_UD ||
 	    qp_type(qp) == IB_QPT_SMI ||
 	    qp_type(qp) == IB_QPT_GSI) {
+		struct ib_ah *ibah = ud_wr(ibwr)->ah;
+
 		wr->wr.ud.remote_qpn = ud_wr(ibwr)->remote_qpn;
 		wr->wr.ud.remote_qkey = ud_wr(ibwr)->remote_qkey;
+		wr->wr.ud.ah_num = to_rah(ibah)->ah_num;
 		if (qp_type(qp) == IB_QPT_GSI)
 			wr->wr.ud.pkey_index = ud_wr(ibwr)->pkey_index;
 		if (wr->opcode == IB_WR_SEND_WITH_IMM)
@@ -610,12 +613,6 @@ static void init_send_wqe(struct rxe_qp *qp, const struct ib_send_wr *ibwr,
 		return;
 	}
 
-	if (qp_type(qp) == IB_QPT_UD ||
-	    qp_type(qp) == IB_QPT_SMI ||
-	    qp_type(qp) == IB_QPT_GSI)
-		memcpy(&wqe->wr.wr.ud.av, &to_rah(ud_wr(ibwr)->ah)->av,
-		       sizeof(struct rxe_av));
-
 	if (unlikely(ibwr->send_flags & IB_SEND_INLINE))
 		copy_inline_data_to_wqe(wqe, ibwr);
 	else
-- 
2.30.2


  parent reply	other threads:[~2021-10-06  1:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06  1:58 [PATCH for-next v5 0/6] Replace AV by AH in UD sends Bob Pearson
2021-10-06  1:58 ` [PATCH for-next v5 1/6] RDMA/rxe: Move AV from rxe_send_wqe to rxe_send_wr Bob Pearson
2021-10-06  1:58 ` [PATCH for-next v5 2/6] RDMA/rxe: Change AH objects to indexed Bob Pearson
2021-10-06  1:58 ` [PATCH for-next v5 3/6] RDMA/rxe: Create AH index and return to user space Bob Pearson
2021-10-06  1:58 ` [PATCH for-next v5 4/6] RDMA/rxe: Replace ah->pd by ah->ibah.pd Bob Pearson
2021-10-06  1:58 ` [PATCH for-next v5 5/6] RDMA/rxe: Lookup kernel AH from ah index in UD WQEs Bob Pearson
2021-10-06 11:55   ` Zhu Yanjun
2021-10-06 14:42     ` Pearson, Robert B
2021-10-07  3:12       ` Zhu Yanjun
2021-10-06  1:58 ` Bob Pearson [this message]
2021-10-06 19:37 ` [PATCH for-next v5 0/6] Replace AV by AH in UD sends Jason Gunthorpe
     [not found]   ` <8fb347bb-81b2-2ba6-a97c-16a5db86541d@gmail.com>
     [not found]     ` <20211006224906.GE2744544@nvidia.com>
     [not found]       ` <086698cc-9e50-49be-aea8-7a4426f2e502@gmail.com>
     [not found]         ` <20211007190543.GM2744544@nvidia.com>
2021-10-07 19:51           ` Bob Pearson
2021-10-07 19:57             ` Jason Gunthorpe
2021-10-07 20:40               ` Shoaib Rao
2021-10-07 22:00                 ` Bob Pearson
2021-10-07 22:53                   ` Shoaib Rao

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=20211006015815.28350-7-rpearsonhpe@gmail.com \
    --to=rpearsonhpe@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --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