git: 4aa41b1e7685 - stable/13 - cxgbei: Add tunable sysctls for the FirstBurstLength and MaxBurstLength.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 29 Oct 2021 23:58:15 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=4aa41b1e768545fd7fde1cb9509f412a76483f62

commit 4aa41b1e768545fd7fde1cb9509f412a76483f62
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-05-19 22:56:54 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-10-29 23:03:04 +0000

    cxgbei: Add tunable sysctls for the FirstBurstLength and MaxBurstLength.
    
    Reviewed by:    np
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D30269
    
    (cherry picked from commit 3bede2908acc6cbc8e809d63d7c9b5fd95932dfb)
---
 sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index d54464b63542..fce593b54032 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -104,6 +104,12 @@ static MALLOC_DEFINE(M_CXGBEI, "cxgbei", "cxgbei(4)");
 
 SYSCTL_NODE(_kern_icl, OID_AUTO, cxgbei, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
     "Chelsio iSCSI offload");
+static int first_burst_length = 8192;
+SYSCTL_INT(_kern_icl_cxgbei, OID_AUTO, first_burst_length, CTLFLAG_RWTUN,
+    &first_burst_length, 0, "First burst length");
+static int max_burst_length = 2 * 1024 * 1024;
+SYSCTL_INT(_kern_icl_cxgbei, OID_AUTO, max_burst_length, CTLFLAG_RWTUN,
+    &max_burst_length, 0, "Maximum burst length");
 static int sendspace = 1048576;
 SYSCTL_INT(_kern_icl_cxgbei, OID_AUTO, sendspace, CTLFLAG_RWTUN,
     &sendspace, 0, "Default send socket buffer size");
@@ -1206,8 +1212,8 @@ icl_cxgbei_limits(struct icl_drv_limits *idl)
 	idl->idl_max_send_data_segment_length = (1 << 24) - 1;
 
 	/* These are somewhat arbitrary. */
-	idl->idl_max_burst_length = 2 * 1024 * 1024;
-	idl->idl_first_burst_length = 8192;
+	idl->idl_max_burst_length = max_burst_length;
+	idl->idl_first_burst_length = first_burst_length;
 
 	t4_iterate(cxgbei_limits, idl);