diff mbox series

[for-next,v3,10/10] RDMA/rxe: Enable sg code in rxe

Message ID 20230727200128.65947-11-rpearsonhpe@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/rxe: Implement support for nonlinear packets | expand

Commit Message

Bob Pearson July 27, 2023, 8:01 p.m. UTC
Make changes to enable sg code in rxe.

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

Comments

Jason Gunthorpe Aug. 15, 2023, 7:07 p.m. UTC | #1
On Thu, Jul 27, 2023 at 03:01:29PM -0500, Bob Pearson wrote:
> Make changes to enable sg code in rxe.
> 
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe.c     | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_req.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
> index 800e8c0d437d..b52dd1704e74 100644
> --- a/drivers/infiniband/sw/rxe/rxe.c
> +++ b/drivers/infiniband/sw/rxe/rxe.c
> @@ -14,9 +14,9 @@ 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;
>  module_param_named(use_sg, rxe_use_sg, bool, 0444);
> -MODULE_PARM_DESC(use_sg, "Support skb frags; default false");
> +MODULE_PARM_DESC(use_sg, "Support skb frags; default true");

I would like to avoid the module option - is it necessary? Shouldn't
frags always be better?

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 800e8c0d437d..b52dd1704e74 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -14,9 +14,9 @@  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;
 module_param_named(use_sg, rxe_use_sg, bool, 0444);
-MODULE_PARM_DESC(use_sg, "Support skb frags; default false");
+MODULE_PARM_DESC(use_sg, "Support skb frags; default 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 cf34d1a58f85..d00c24e1a569 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -402,7 +402,7 @@  static struct sk_buff *rxe_init_req_packet(struct rxe_qp *qp,
 	struct sk_buff *skb = NULL;
 	struct rxe_av *av;
 	struct rxe_ah *ah = NULL;
-	bool frag = false;
+	bool frag;
 	int err;
 
 	pkt->rxe = rxe;
@@ -426,7 +426,7 @@  static struct sk_buff *rxe_init_req_packet(struct rxe_qp *qp,
 			pkt->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)) {
 		err = -ENOMEM;
 		goto err_out;