Author: np Date: Thu Aug 31 20:33:22 2017 New Revision: 323069 URL: https://svnweb.freebsd.org/changeset/base/323069
Log: cxgbe/t4_tom: Add a knob to select the congestion control algorigthm used by the TOE hardware for fully offloaded connections. The knob affects new connections only. MFC after: 2 weeks Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_listen.c Modified: head/sys/dev/cxgbe/offload.h ============================================================================== --- head/sys/dev/cxgbe/offload.h Thu Aug 31 20:16:28 2017 (r323068) +++ head/sys/dev/cxgbe/offload.h Thu Aug 31 20:33:22 2017 (r323069) @@ -144,6 +144,7 @@ struct uld_info { }; struct tom_tunables { + int cong_algorithm; int sndbuf; int ddp; int rx_coalesce; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Aug 31 20:16:28 2017 (r323068) +++ head/sys/dev/cxgbe/t4_main.c Thu Aug 31 20:33:22 2017 (r323069) @@ -5416,6 +5416,12 @@ t4_sysctls(struct adapter *sc) NULL, "TOE parameters"); children = SYSCTL_CHILDREN(oid); + sc->tt.cong_algorithm = -1; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_algorithm", + CTLFLAG_RW, &sc->tt.cong_algorithm, 0, "congestion control " + "(-1 = default, 0 = reno, 1 = tahoe, 2 = newreno, " + "3 = highspeed)"); + sc->tt.sndbuf = 256 * 1024; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "sndbuf", CTLFLAG_RW, &sc->tt.sndbuf, 0, "max hardware send buffer size"); Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Thu Aug 31 20:16:28 2017 (r323068) +++ head/sys/dev/cxgbe/tom/t4_connect.c Thu Aug 31 20:33:22 2017 (r323069) @@ -259,6 +259,9 @@ calc_opt2a(struct socket *so, struct toepcb *toep) if (sc->tt.rx_coalesce) opt2 |= V_RX_COALESCE(M_RX_COALESCE); + if (sc->tt.cong_algorithm != -1) + opt2 |= V_CONG_CNTRL(sc->tt.cong_algorithm & M_CONG_CNTRL); + #ifdef USE_DDP_RX_FLOW_CONTROL if (toep->ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; Modified: head/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_listen.c Thu Aug 31 20:16:28 2017 (r323068) +++ head/sys/dev/cxgbe/tom/t4_listen.c Thu Aug 31 20:33:22 2017 (r323069) @@ -1047,6 +1047,9 @@ calc_opt2p(struct adapter *sc, struct port_info *pi, i if (sc->tt.rx_coalesce) opt2 |= V_RX_COALESCE(M_RX_COALESCE); + if (sc->tt.cong_algorithm != -1) + opt2 |= V_CONG_CNTRL(sc->tt.cong_algorithm & M_CONG_CNTRL); + #ifdef USE_DDP_RX_FLOW_CONTROL if (ulp_mode == ULP_MODE_TCPDDP) opt2 |= F_RX_FC_VALID | F_RX_FC_DDP; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"