Skip to contentSkip to conversation

RDMA/rxe: Fix rxe_modify_srq

PATCH Applied Bob Pearson 1 participant 1 message Jun 20, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 3/3 RDMA/rxe: Fix rxe_modify_srq

This patch corrects an error in rxe_modify_srq where if the caller changes the srq size the actual new value is not returned to the caller since it may be larger than what is requested. Additionally it open codes the subroutine rcv_wqe_size() which adds very little value, and makes some whitespace changes.

Fixes 8700e3e7c485 ("Soft RoCE driver")

---
v2: Reverted an incorrect change in v1 which partially removed the
variable q in rxe_srq_from_init(). Fixed a typo in the subject line.

 drivers/infiniband/sw/rxe/rxe_loc.h |  6 ---
 drivers/infiniband/sw/rxe/rxe_srq.c | 60 +++++++++++++++++------------
 2 files changed, 36 insertions(+), 30 deletions(-)
drivers/infiniband/sw/rxe/rxe_loc.h +0 -6
index 666e06a82bc9..4d2a8ef52c85 100644
@@ -136,12 +136,6 @@ static inline int qp_mtu(struct rxe_qp *qp)
 		return IB_MTU_4096;
 }
 
-static inline int rcv_wqe_size(int max_sge)
-{
-	return sizeof(struct rxe_recv_wqe) +
-		max_sge * sizeof(struct ib_sge);
-}
-
 void free_rd_atomic_resource(struct resp_res *res);
 
 static inline void rxe_advance_resp_resource(struct rxe_qp *qp)
drivers/infiniband/sw/rxe/rxe_srq.c +36 -24

110 lines not on this page · raw message

Signature · 1 line
2.39.2