RDMA/rxe: Remove redundant num_sge fields
Subsystems (2)
PATCH 1/1 RDMA/rxe: Remove redundant num_sge fields
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.
--- drivers/infiniband/sw/rxe/rxe_verbs.c | 2 -- include/uapi/rdma/rdma_user_rxe.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_verbs.c +0 -2
@@ -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;
include/uapi/rdma/rdma_user_rxe.h +2 -2
@@ -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
Signature · 1 line
2.34.1
Quoted 8 lines · Bob Pearson
In
include/uapi/rdma/rdma_user_rxe.hthere are redundant copies ofnum_sgein therxe_send_wr,rxe_recv_wqe, andrxe_dma_info. Only the ones inrxe_dma_infoare actually used by the rxe driver. This patch replaces the ones inrxe_send_wrandrxe_recv_wqeby 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
Quoted 9 lines · Bob Pearson
In
include/uapi/rdma/rdma_user_rxe.hthere are redundant copies ofnum_sgein therxe_send_wr,rxe_recv_wqe, andrxe_dma_info. Only the ones inrxe_dma_infoare actually used by the rxe driver. This patch replaces the ones inrxe_send_wrandrxe_recv_wqeby 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.
Quoted 5 lines
Signed-off-by Bob Pearson <[email protected]>--- 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