[PATCH for-next v2 18/18] RDMA/rxe: Enable sg code in rxe

Bob Pearson
2022-10-31T20:29:06Z

Make changes to enable sg code in rxe.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
drivers/infiniband/sw/rxe/rxe.c | 2 +-
drivers/infiniband/sw/rxe/rxe_req.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 388d8103ec20..fd5e916ecce9 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -14,7 +14,7 @@ MODULE_DESCRIPTION("Soft RDMA transport");
MODULE_LICENSE("Dual BSD/GPL");

/* if true allow using fragmented skbs */
-bool rxe_use_sg;
+bool rxe_use_sg = true;

/* free resources for a rxe device all objects created for this device must
* have been destroyed
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index 984e3e957aef..a3760a84aa5d 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -521,8 +521,8 @@ static struct sk_buff *rxe_init_req_packet(struct rxe_qp *qp,
struct rxe_av *av;
struct rxe_ah *ah = NULL;
int pad;
+ bool frag;
int err = -EINVAL;
- bool frag = false;

pkt->rxe = rxe;
pkt->opcode = opcode;
@@ -543,7 +543,7 @@ static struct sk_buff *rxe_init_req_packet(struct rxe_qp *qp,
pad + RXE_ICRC_SIZE;

/* init skb */
- skb = rxe_init_packet(qp, av, pkt, NULL);
+ skb = rxe_init_packet(qp, av, pkt, &frag);
if (unlikely(!skb))
goto err_out;

--
2.34.1