From nobody Thu Feb 02 07:39:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P6rK8385bz3c9C5; Thu, 2 Feb 2023 07:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6rK82Y52z3Ccy; Thu, 2 Feb 2023 07:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675323580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRrW0bg/dLh00rbwlltY9sVuofY2xzsDXTfHcl9/VTc=; b=qrdPhgSBbzQvgpxuqbQOLPXFNE/VKdsFh87WBdsdjnSVJGLVxHCIwnnpgW2dZUXn65Ps1P l0EICjPx6e2gD20+Y/fogYMr17PycUTeaXE59vJQjoKWloJ0wAs4KdJ1CCOpGl+oEmfLyQ z16L22obrbSjZnRLy9VrfxFIHKRIPJWlSqh9e9vZbpVifR+3IFU6arU708du2hOpyUlNN0 kqNRr0Pqw0bLDXaZ9gv801njKvf6ZZ1tsrpInG9SNfeUQipiYB/ywHYjE2Xlt2iFyR0Jp5 UZ9DWhwBBijKBFr608bFDkI+JRaBsuamRrW2SgxJ3dSU5++5VKtYGGCGtJXonQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675323580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KRrW0bg/dLh00rbwlltY9sVuofY2xzsDXTfHcl9/VTc=; b=C7VSAlABM+PmLuRVhsUvsUvI7tBamkMqe24AsjOD7jaUnt2kGmVJPBkm/aWUtddafti5Cy D7PkvHnU/a304AiT1BEJrWIgs3ToXR1979/kJMBo6NctW126eAsgm9RfXx4ofPHPRh5cba 7Svn2EUcS8+2fLuFh27VteqquIlgrErZJAuaxZLyk9GJhB9a+A9tiGCZZ6nR9ezt5DIC6/ 93bglyAowajEYa5OfeCCN+6L4JYI3tT9gaz/vp0+umUmkP7yRM1g/hwxdFAi533bRYEqWA Hb0MovEsQDGSclWU2TTLwOcn6+KRXtgNkthSW+Rxv2imMR1BEIDjLwslJwswWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675323580; a=rsa-sha256; cv=none; b=iYQ36LVBsM0ajxVpGsopprqQ1XOZcbIbPgiEs35Q9EF3HZmagU5aaqErzXYHH/4DuW/sAM 6VCeHh1qhHT804ZPGCt/SwGRVBboY3XJ8pJjn2fKPDk1z6pPydHpdNop0RU0fHxJ0AqMAm Nsl2mKfi3hS88Z5MFsQGCimN2i6TDh6AxicO9xwG6XZaRlEAwzkVPQEgbU0MiL6BAO4X49 amR3Rg6xGLBAJmT08aKgkuG1gc9zbxvRES7Z6/DcCkhWqpbKZXdV7IMeFj3diYlghstmQT gX4RNcu7Ok3A84vbwMmiC9qz4RtIcGmHt+aOAvCqbEn/HFTyurQSUYVVogGNIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P6rK81XKlzlws; Thu, 2 Feb 2023 07:39:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3127deZg062213; Thu, 2 Feb 2023 07:39:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3127delC062212; Thu, 2 Feb 2023 07:39:40 GMT (envelope-from git) Date: Thu, 2 Feb 2023 07:39:40 GMT Message-Id: <202302020739.3127delC062212@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 1b3027b10541 - stable/13 - cxgbe(4): Add knob to control congestion behavior for TOE queues. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1b3027b1054106c863a34f7f78f4de3063a3b728 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=1b3027b1054106c863a34f7f78f4de3063a3b728 commit 1b3027b1054106c863a34f7f78f4de3063a3b728 Author: Navdeep Parhar AuthorDate: 2022-09-09 22:21:18 +0000 Commit: Navdeep Parhar CommitDate: 2023-02-02 07:20:10 +0000 cxgbe(4): Add knob to control congestion behavior for TOE queues. hw.cxgbe.ofld_cong_drop works just like hw.cxgbe.cong_drop but for TOE rx queues. Sponsored by: Chelsio Communications (cherry picked from commit 998eb37aca6670b1ecbb7b5cad2b5b2d85d744b8) --- sys/dev/cxgbe/t4_sge.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 8d83567c2725..4a11c6c89573 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -128,6 +128,11 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, spg_len, CTLFLAG_RDTUN, &spg_len, 0, static int cong_drop = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, cong_drop, CTLFLAG_RDTUN, &cong_drop, 0, "Congestion control for NIC RX queues (0 = backpressure, 1 = drop, 2 = both"); +#ifdef TCP_OFFLOAD +static int ofld_cong_drop = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, ofld_cong_drop, CTLFLAG_RDTUN, &ofld_cong_drop, 0, + "Congestion control for TOE RX queues (0 = backpressure, 1 = drop, 2 = both"); +#endif /* * Deliver multiple frames in the same free list buffer if they fit. @@ -559,6 +564,13 @@ t4_sge_modload(void) " using 0 instead.\n", cong_drop); cong_drop = 0; } +#ifdef TCP_OFFLOAD + if (ofld_cong_drop < -1 || ofld_cong_drop > 2) { + printf("Invalid hw.cxgbe.ofld_cong_drop value (%d)," + " using 0 instead.\n", ofld_cong_drop); + ofld_cong_drop = 0; + } +#endif if (tscale != 1 && (tscale < 3 || tscale > 17)) { printf("Invalid hw.cxgbe.tscale value (%d)," @@ -1011,6 +1023,10 @@ t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, NULL, cong_drop, "congestion drop setting"); +#ifdef TCP_OFFLOAD + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "ofld_cong_drop", CTLFLAG_RD, + NULL, ofld_cong_drop, "congestion drop setting"); +#endif SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, NULL, sp->pack_boundary, "payload pack boundary (bytes)"); @@ -4143,7 +4159,7 @@ alloc_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq, int idx, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "offload rx queue"); init_iq(&ofld_rxq->iq, sc, vi->ofld_tmr_idx, vi->ofld_pktc_idx, - vi->qsize_rxq, intr_idx, 0, IQ_OFLD); + vi->qsize_rxq, intr_idx, ofld_cong_drop, IQ_OFLD); snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(vi->dev), idx); init_fl(sc, &ofld_rxq->fl, vi->qsize_rxq / 8, maxp, name);