linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields
@ 2022-09-13 22:27 Bob Pearson
  2022-09-20 18:10 ` Leon Romanovsky
  2022-09-26 17:57 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Bob Pearson @ 2022-09-13 22:27 UTC (permalink / raw)
  To: jgg, zyjzyj2000, linux-rdma; +Cc: Bob Pearson

In include/uapi/rdma/rdma_user_rxe.h there are redundant copies of
num_sge in the rxe_send_wr, rxe_recv_wqe, and rxe_dma_info. Only the
ones in rxe_dma_info are actually used by the rxe driver. This patch
replaces the ones in rxe_send_wr and rxe_recv_wqe by reserved. This
patch matches a user space change to the rxe provider driver in
rdma-core. This change has no affect on the current ABI and new or old
versions of rdma-core operate correctly with new or old versions of
the kernel rxe driver.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 --
 include/uapi/rdma/rdma_user_rxe.h     | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 9ebe9decad34..7073a0a0adf4 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -262,7 +262,6 @@ static int post_one_recv(struct rxe_rq *rq, const struct ib_recv_wr *ibwr)
 
 	recv_wqe = queue_producer_addr(rq->queue, QUEUE_TYPE_TO_DRIVER);
 	recv_wqe->wr_id = ibwr->wr_id;
-	recv_wqe->num_sge = num_sge;
 
 	memcpy(recv_wqe->dma.sge, ibwr->sg_list,
 	       num_sge * sizeof(struct ib_sge));
@@ -526,7 +525,6 @@ static void init_send_wr(struct rxe_qp *qp, struct rxe_send_wr *wr,
 			 const struct ib_send_wr *ibwr)
 {
 	wr->wr_id = ibwr->wr_id;
-	wr->num_sge = ibwr->num_sge;
 	wr->opcode = ibwr->opcode;
 	wr->send_flags = ibwr->send_flags;
 
diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h
index f09c5c9e3dd5..73f679dfd2df 100644
--- a/include/uapi/rdma/rdma_user_rxe.h
+++ b/include/uapi/rdma/rdma_user_rxe.h
@@ -74,7 +74,7 @@ struct rxe_av {
 
 struct rxe_send_wr {
 	__aligned_u64		wr_id;
-	__u32			num_sge;
+	__u32			reserved;
 	__u32			opcode;
 	__u32			send_flags;
 	union {
@@ -166,7 +166,7 @@ struct rxe_send_wqe {
 
 struct rxe_recv_wqe {
 	__aligned_u64		wr_id;
-	__u32			num_sge;
+	__u32			reserved;
 	__u32			padding;
 	struct rxe_dma_info	dma;
 };

base-commit: db77d84cfe3608eac938302f8f7178e44415bcba
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields
  2022-09-13 22:27 [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields Bob Pearson
@ 2022-09-20 18:10 ` Leon Romanovsky
  2022-09-26 17:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2022-09-20 18:10 UTC (permalink / raw)
  To: Bob Pearson; +Cc: jgg, zyjzyj2000, linux-rdma

On Tue, Sep 13, 2022 at 05:27:17PM -0500, Bob Pearson wrote:
> In include/uapi/rdma/rdma_user_rxe.h there are redundant copies of
> num_sge in the rxe_send_wr, rxe_recv_wqe, and rxe_dma_info. Only the
> ones in rxe_dma_info are actually used by the rxe driver. This patch
> replaces the ones in rxe_send_wr and rxe_recv_wqe by reserved. This
> patch matches a user space change to the rxe provider driver in
> rdma-core. This change has no affect on the current ABI and new or old
> versions of rdma-core operate correctly with new or old versions of
> the kernel rxe driver.

I don't see how. Old rdma-core has rxe_post_one_recv() function that
uses num_sge in struct rxe_recv_wqe.

Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields
  2022-09-13 22:27 [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields Bob Pearson
  2022-09-20 18:10 ` Leon Romanovsky
@ 2022-09-26 17:57 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-09-26 17:57 UTC (permalink / raw)
  To: Bob Pearson; +Cc: zyjzyj2000, linux-rdma

On Tue, Sep 13, 2022 at 05:27:17PM -0500, Bob Pearson wrote:
> In include/uapi/rdma/rdma_user_rxe.h there are redundant copies of
> num_sge in the rxe_send_wr, rxe_recv_wqe, and rxe_dma_info. Only the
> ones in rxe_dma_info are actually used by the rxe driver. This patch
> replaces the ones in rxe_send_wr and rxe_recv_wqe by reserved. This
> patch matches a user space change to the rxe provider driver in
> rdma-core. This change has no affect on the current ABI and new or old
> versions of rdma-core operate correctly with new or old versions of
> the kernel rxe driver.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 2 --
>  include/uapi/rdma/rdma_user_rxe.h     | 4 ++--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 22:27 [PATCH for-next] RDMA/rxe: Remove redundant num_sge fields Bob Pearson
2022-09-20 18:10 ` Leon Romanovsky
2022-09-26 17:57 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).