[rdma-core 1/4] bnxt_re/lib: fix AH validity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixing the AH validity check when initializing the
UD SQE from AH.

Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
---
 providers/bnxt_re/verbs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c
index ca561662..a015bed7 100644
--- a/providers/bnxt_re/verbs.c
+++ b/providers/bnxt_re/verbs.c
@@ -1193,13 +1193,13 @@ static int bnxt_re_build_ud_sqe(struct bnxt_re_qp *qp, void *wqe,
 	int len;
 
 	len = bnxt_re_build_send_sqe(qp, wqe, wr, is_inline);
-	sqe->qkey = htole32(wr->wr.ud.remote_qkey);
-	sqe->dst_qp = htole32(wr->wr.ud.remote_qpn);
 	if (!wr->wr.ud.ah) {
 		len = -EINVAL;
 		goto bail;
 	}
 	ah = to_bnxt_re_ah(wr->wr.ud.ah);
+	sqe->qkey = htole32(wr->wr.ud.remote_qkey);
+	sqe->dst_qp = htole32(wr->wr.ud.remote_qpn);
 	sqe->avid = htole32(ah->avid & 0xFFFFF);
 bail:
 	return len;
-- 
2.25.1

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux