From: Zhu Yanjun <yanjun.zhu@linux.dev>
To: zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Zhu Yanjun <yanjun.zhu@linux.dev>
Subject: [PATCH v2 2/2] RDMA/rxe: Replace struct rxe_sge with struct ib_sge
Date: Sun, 21 Dec 2025 18:34:04 -0500 [thread overview]
Message-ID: <20251221233404.332108-2-yanjun.zhu@linux.dev> (raw)
In-Reply-To: <20251221233404.332108-1-yanjun.zhu@linux.dev>
The struct rxe_sge is the same with struct ib_sge. Thus,
the struct rxe_sge can be repaced with the struct ib_sge.
No functional changes.
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
drivers/infiniband/sw/rxe/rxe_mr.c | 4 ++--
drivers/infiniband/sw/rxe/rxe_resp.c | 2 +-
include/uapi/rdma/rdma_user_rxe.h | 8 +-------
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index b1df05238848..ac31cc599f13 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -341,7 +341,7 @@ int copy_data(
enum rxe_mr_copy_dir dir)
{
int bytes;
- struct rxe_sge *sge = &dma->sge[dma->cur_sge];
+ struct ib_sge *sge = &dma->sge[dma->cur_sge];
int offset = dma->sge_offset;
int resid = dma->resid;
struct rxe_mr *mr = NULL;
@@ -580,7 +580,7 @@ enum resp_states rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)
int advance_dma_data(struct rxe_dma_info *dma, unsigned int length)
{
- struct rxe_sge *sge = &dma->sge[dma->cur_sge];
+ struct ib_sge *sge = &dma->sge[dma->cur_sge];
int offset = dma->sge_offset;
int resid = dma->resid;
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 711f73e0bbb1..74f5b695da7a 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -283,7 +283,7 @@ static enum resp_states get_srq_wqe(struct rxe_qp *qp)
rxe_dbg_qp(qp, "invalid num_sge in SRQ entry\n");
return RESPST_ERR_MALFORMED_WQE;
}
- size = sizeof(*wqe) + wqe->dma.num_sge*sizeof(struct rxe_sge);
+ size = sizeof(*wqe) + wqe->dma.num_sge*sizeof(struct ib_sge);
memcpy(&qp->resp.srq_wqe, wqe, size);
qp->resp.wqe = &qp->resp.srq_wqe.wqe;
diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h
index bb092fccb813..74eaae779c81 100644
--- a/include/uapi/rdma/rdma_user_rxe.h
+++ b/include/uapi/rdma/rdma_user_rxe.h
@@ -132,12 +132,6 @@ struct rxe_send_wr {
} wr;
};
-struct rxe_sge {
- __aligned_u64 addr;
- __u32 length;
- __u32 lkey;
-};
-
struct mminfo {
__aligned_u64 offset;
__u32 size;
@@ -154,7 +148,7 @@ struct rxe_dma_info {
union {
__DECLARE_FLEX_ARRAY(__u8, inline_data);
__DECLARE_FLEX_ARRAY(__u8, atomic_wr);
- __DECLARE_FLEX_ARRAY(struct rxe_sge, sge);
+ __DECLARE_FLEX_ARRAY(struct ib_sge, sge);
};
};
--
2.39.5
next prev parent reply other threads:[~2025-12-21 23:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-21 23:34 [PATCH v2 1/2] RDMA/rxe: Avoid -Wflex-array-member-not-at-end warnings Zhu Yanjun
2025-12-21 23:34 ` Zhu Yanjun [this message]
2025-12-22 16:36 ` [PATCH v2 2/2] RDMA/rxe: Replace struct rxe_sge with struct ib_sge kernel test robot
2025-12-22 20:49 ` kernel test robot
2025-12-22 22:49 ` kernel test robot
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=20251221233404.332108-2-yanjun.zhu@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.