RDMA/rxe: Remove redundant num_sge fields
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 13 Sep 2022 22:27:17 +0000 (17:27 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 27 Sep 2022 13:15:24 +0000 (10:15 -0300)
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 kernel driver.

The userspace would set these values, but the kernel never read them.

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.

Link: https://lore.kernel.org/r/20220913222716.18335-1-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_verbs.c
include/uapi/rdma/rdma_user_rxe.h

index 3d37216609e4839b17aa533905a5c4eda15cb53d..88825edc7dce19c0ac4a2806586fe68202e7d4aa 100644 (file)
@@ -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;
 
index f09c5c9e3dd5d87108a3cb3967eae8480c0ee315..73f679dfd2dfb126ffeaf9949fd3c871da912ea9 100644 (file)
@@ -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;
 };