From: Jack Wang <jinpu.wang@ionos.com>
To: linux-rdma@vger.kernel.org
Cc: bvanassche@acm.org, leon@kernel.org, jgg@ziepe.ca,
selvin.xavier@broadcom.com, haris.iqbal@ionos.com,
jinpu.wang@ionos.com
Subject: [PATCH for-next 2/2] bnxt_re: Fix inv_key endianness
Date: Tue, 9 Jul 2024 17:01:19 +0200 [thread overview]
Message-ID: <20240709150119.29937-3-jinpu.wang@ionos.com> (raw)
In-Reply-To: <20240709150119.29937-1-jinpu.wang@ionos.com>
Similar like previous patch, this change the endianness for inv_key,
hw expect LE, so change the type accordingly.
Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +++---
drivers/infiniband/hw/bnxt_re/qplib_fp.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index c5080028247e..cdc8ebcf3a76 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -2483,7 +2483,7 @@ static int bnxt_re_build_send_wqe(struct bnxt_re_qp *qp,
break;
case IB_WR_SEND_WITH_INV:
wqe->type = BNXT_QPLIB_SWQE_TYPE_SEND_WITH_INV;
- wqe->send.inv_key = wr->ex.invalidate_rkey;
+ wqe->send.inv_key = cpu_to_le32(wr->ex.invalidate_rkey);
break;
default:
return -EINVAL;
@@ -2513,7 +2513,7 @@ static int bnxt_re_build_rdma_wqe(const struct ib_send_wr *wr,
break;
case IB_WR_RDMA_READ:
wqe->type = BNXT_QPLIB_SWQE_TYPE_RDMA_READ;
- wqe->rdma.inv_key = wr->ex.invalidate_rkey;
+ wqe->rdma.inv_key = cpu_to_le32(wr->ex.invalidate_rkey);
break;
default:
return -EINVAL;
@@ -2563,7 +2563,7 @@ static int bnxt_re_build_inv_wqe(const struct ib_send_wr *wr,
struct bnxt_qplib_swqe *wqe)
{
wqe->type = BNXT_QPLIB_SWQE_TYPE_LOCAL_INV;
- wqe->local_inv.inv_l_key = wr->ex.invalidate_rkey;
+ wqe->local_inv.inv_l_key = cpu_to_le32(wr->ex.invalidate_rkey);
if (wr->send_flags & IB_SEND_SIGNALED)
wqe->flags |= BNXT_QPLIB_SWQE_FLAGS_SIGNAL_COMP;
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
index 1fcaba0f680b..813332b2c872 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
@@ -165,7 +165,7 @@ struct bnxt_qplib_swqe {
struct {
union {
__le32 imm_data;
- u32 inv_key;
+ __le32 inv_key;
};
u32 q_key;
u32 dst_qp;
@@ -183,7 +183,7 @@ struct bnxt_qplib_swqe {
struct {
union {
__le32 imm_data;
- u32 inv_key;
+ __le32 inv_key;
};
u64 remote_va;
u32 r_key;
@@ -199,7 +199,7 @@ struct bnxt_qplib_swqe {
/* Local Invalidate */
struct {
- u32 inv_l_key;
+ __le32 inv_l_key;
} local_inv;
/* FR-PMR */
--
2.34.1
next prev parent reply other threads:[~2024-07-09 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 15:01 [PATCH for-next 0/2] Fix for bnxt_re endianness issue Jack Wang
2024-07-09 15:01 ` [PATCH for-next 1/2] bnxt_re: Fix imm_data endianness Jack Wang
2024-07-10 8:27 ` Selvin Xavier
2024-07-10 8:49 ` Jinpu Wang
2024-07-10 9:30 ` Jinpu Wang
2024-07-09 15:01 ` Jack Wang [this message]
2024-07-11 3:08 ` [PATCH for-next 2/2] bnxt_re: Fix inv_key endianness Greg Sword
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=20240709150119.29937-3-jinpu.wang@ionos.com \
--to=jinpu.wang@ionos.com \
--cc=bvanassche@acm.org \
--cc=haris.iqbal@ionos.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=selvin.xavier@broadcom.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