From nobody Tue Dec 10 20:34:52 2024 X-Original-To: dev-commits-src-main@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 4Y79T90fwvz5gZjX; Tue, 10 Dec 2024 20:34:53 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y79T9086rz4RkB; Tue, 10 Dec 2024 20:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733862893; 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=V3ZjtYZX6pk8Y2eAtiWgXTv2DWvCl5WXNSgoMj+dD2o=; b=hS+UfNeGGZK/Qyf4hZhjl3AcuX6nMJDgNYl9DVrvrw+96pSWZe10PqNA4eYY9JOFmfR4Cw DNy/PLEFJzkYhmpobYYqrCtbfTDH62ixB7fFqkZzdAEbwCw8c3MgzrXYklzQorolxXOUb+ oE8+MCRnBy7F4JY24s2jkRLN6+nerKWNJ2YV4yPvSAtex7vCLf5TA5AYjAieMcA0KajDGb V6QmiY2EreC0Zi64THt9gTet07u2NsxPPHy5XdzIzmVB96GERwr3rSbv/5q3q0YUTkEvvY FC59DygsuBc8o5MXmK36BIuTEK/kG4kZmPUw6wXv0VbBFNKarIETTPVO2IzgUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733862893; 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=V3ZjtYZX6pk8Y2eAtiWgXTv2DWvCl5WXNSgoMj+dD2o=; b=KtLKbBO/ACGe0bNY6c513Cek3En6BA/eJ5VQARnfVcv7Ux6mbuIB6rQbUv90xoCT7bpoEn D7Ll1sNwSwyEdn8K3kO39RmRMxDBoB90bnblVlr4gp6Ju6pTeN1jz3U08atPF8bcGnfJXS 4gheCybETFTRLJzLynK1jMeu7x74xLaA9SL5HJ5yfCtTlRRWV51IhULucEJ4QFJlqBGnNQ COpYrSdG+JkZVQ0jFCLLYDbmW4MxwxlN66CHraeIytzMSHR6eA1oRRN6PBPy+pLTe/x0D2 9/8icmXmMD7sC7AYBO0wuih7iUUDtMP8vLmG0Szgu4Sq2whuTfCByQhglkQz8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733862893; a=rsa-sha256; cv=none; b=SasRkHxnvuUtPF4+uYrpi0z44Q/GbZnsEYg0tjK5ze2ACdcKPTkL8u4Q0MsH1RBzWjcnNf mJetps+/lejZ1+93WyoRYnOkuK0jnKLtKdRx92NUK4qYHMlI1uQj5ob0cWJj2cbLYOBMqD WRfqRTZB9gPm+APg5/lbHhVTF4BQVAisxqnWHiHvvdMKHvYvl1xTRXgn+FeE62CpRMYEJ8 EeYN+0DVLOL4Sv/sRsS+T5TcY6eyWSGmVsG25k/OrHM4UvMPermlzdB9FMkg+fVj7YPBW4 lv4x1Qns9ocjqYPw0EDhZoUAVGKaZ0RR5Z86twCSHzzZWsg2ZsdX/VPlGSZ69g== 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 4Y79T85zDJzd3V; Tue, 10 Dec 2024 20:34:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BAKYqDe084054; Tue, 10 Dec 2024 20:34:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BAKYquO084050; Tue, 10 Dec 2024 20:34:52 GMT (envelope-from git) Date: Tue, 10 Dec 2024 20:34:52 GMT Message-Id: <202412102034.4BAKYquO084050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 906521882324 - main - cxgbe: Tidy TOE tunables under hw.cxgbe List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90652188232458891a2922fb5a542971aa58055d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=90652188232458891a2922fb5a542971aa58055d commit 90652188232458891a2922fb5a542971aa58055d Author: John Baldwin AuthorDate: 2024-12-10 20:30:30 +0000 Commit: John Baldwin CommitDate: 2024-12-10 20:32:07 +0000 cxgbe: Tidy TOE tunables under hw.cxgbe - Only two of these tunables are used for RATELIMIT without TCP_OFFLOAD. - Mark t4_tmr_idx_ofld and t4_pktc_idx_ofld static. - Move hw.cxgbe.cop_managed_offloading under hw.cxgbe.toe since it is specific to TOE. Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D47765 --- sys/dev/cxgbe/t4_main.c | 19 +++++++++++-------- usr.sbin/cxgbetool/cxgbetool.8 | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 8c7d1ad4487a..25d5dee8b781 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -318,15 +318,17 @@ static int t4_nofldtxq = -NOFLDTXQ; SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldtxq, CTLFLAG_RDTUN, &t4_nofldtxq, 0, "Number of offload TX queues per port"); -#define NOFLDRXQ 2 -static int t4_nofldrxq = -NOFLDRXQ; -SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldrxq, CTLFLAG_RDTUN, &t4_nofldrxq, 0, - "Number of offload RX queues per port"); - #define NOFLDTXQ_VI 1 static int t4_nofldtxq_vi = -NOFLDTXQ_VI; SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldtxq_vi, CTLFLAG_RDTUN, &t4_nofldtxq_vi, 0, "Number of offload TX queues per VI"); +#endif + +#if defined(TCP_OFFLOAD) +#define NOFLDRXQ 2 +static int t4_nofldrxq = -NOFLDRXQ; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldrxq, CTLFLAG_RDTUN, &t4_nofldrxq, 0, + "Number of offload RX queues per port"); #define NOFLDRXQ_VI 1 static int t4_nofldrxq_vi = -NOFLDRXQ_VI; @@ -334,12 +336,12 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, nofldrxq_vi, CTLFLAG_RDTUN, &t4_nofldrxq_vi, 0, "Number of offload RX queues per VI"); #define TMR_IDX_OFLD 1 -int t4_tmr_idx_ofld = TMR_IDX_OFLD; +static int t4_tmr_idx_ofld = TMR_IDX_OFLD; SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_timer_idx_ofld, CTLFLAG_RDTUN, &t4_tmr_idx_ofld, 0, "Holdoff timer index for offload queues"); #define PKTC_IDX_OFLD (-1) -int t4_pktc_idx_ofld = PKTC_IDX_OFLD; +static int t4_pktc_idx_ofld = PKTC_IDX_OFLD; SYSCTL_INT(_hw_cxgbe, OID_AUTO, holdoff_pktc_idx_ofld, CTLFLAG_RDTUN, &t4_pktc_idx_ofld, 0, "holdoff packet counter index for offload queues"); @@ -686,9 +688,10 @@ SYSCTL_INT(_hw_cxgbe, OID_AUTO, drop_pkts_with_l4_errors, CTLFLAG_RDTUN, * TOE tunables. */ static int t4_cop_managed_offloading = 0; -SYSCTL_INT(_hw_cxgbe, OID_AUTO, cop_managed_offloading, CTLFLAG_RDTUN, +SYSCTL_INT(_hw_cxgbe_toe, OID_AUTO, cop_managed_offloading, CTLFLAG_RDTUN, &t4_cop_managed_offloading, 0, "COP (Connection Offload Policy) controls all TOE offload"); +TUNABLE_INT("hw.cxgbe.cop_managed_offloading", &t4_cop_managed_offloading); #endif #ifdef KERN_TLS diff --git a/usr.sbin/cxgbetool/cxgbetool.8 b/usr.sbin/cxgbetool/cxgbetool.8 index a25a227669ed..995a4146deb3 100644 --- a/usr.sbin/cxgbetool/cxgbetool.8 +++ b/usr.sbin/cxgbetool/cxgbetool.8 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd April 14, 2022 +.Dd December 10, 2024 .Dt CXGBETOOL 8 .Os .Sh NAME @@ -553,7 +553,7 @@ Install the Connection Offload Policy (COP) in A COP offers fine-grained control over which connections get offloaded and with what parameters. Set -.Cm hw.cxgbe.cop_managed_offloading="1" +.Cm hw.cxgbe.toe.cop_managed_offloading="1" in loader.conf to ensure that t4_tom will not offload any connection before a COP is installed. Note that t4_tom must be loaded and operational (IFCAP_TOE enabled) as always