[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251221233404.332108-2-yanjun.zhu@linux.dev>
Date: Sun, 21 Dec 2025 18:34:04 -0500
From: Zhu Yanjun <yanjun.zhu@...ux.dev>
To: zyjzyj2000@...il.com,
jgg@...pe.ca,
leon@...nel.org,
linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Zhu Yanjun <yanjun.zhu@...ux.dev>
Subject: [PATCH v2 2/2] RDMA/rxe: Replace struct rxe_sge with struct ib_sge
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@...ux.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
Powered by blists - more mailing lists