From nobody Wed Sep 16 19:56:40 2026 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 4hlV5V5d88z6sGCp for ; Wed, 16 Sep 2026 19:56:46 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlV5V2qHzz4bVC for ; Wed, 16 Sep 2026 19:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789588606; 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=tmZlSgUIqwEpEfkkzkcIUHDxDToiNJYEszTEY1kfgsY=; b=SHuI+p+x6baqf3VLN+FdosToB5sYP9Q2vMyiiE8I436h6eiFouvlKzgoBdiPd3xFYtMqUC yurk99CZmqJ9HcbBCR1pv2/TM+vb+as44qPMCr9y08QCUkDKZxxjC4NfkGx+w84r9nQ8jX /VLXTve3ThwKq2es6fo44dhe6dRvD5qy+9uCJbdU4BrCYxrEmtd3AXmB+unn9onuxdQJhC k/ufzOAcs/lLGCYCPwpNN6k/5E+gSE7jdpsa1Hjg7rU3N2ptLhndKJX0ULXsBqjmc2FZFx vQXG8LwzYunLp2GGg/w0eqjXNJwpl5z6x/ZbTNypCMyLdRpoKNrKtStBT+pQHg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789588606; b=LbYXpoW/Y751jjyIliyXn9GRhrdVNjcPOySfJPOSbUz5raiOCiyov/xwZn8reDv2K7X8NJ +NQDiCnAB1fvPsXDTDYpJpChAyrJHX23zsEBbUj3FCGKVpBj6VyM283szcmsDEudP9lKrY 40S6TIad06cSmyO5D65nynKu2g1gdZ/K8L47uIs0+WabTZBykiqOEY+cH/A6U4wcoQ9Wv9 5RsED6J37NAhYT0DSqw/OYLHI4dwGmmID0LfEA2QpqCh7AQoK8p2d9B0YgKZcfg0uEYgBG a1J51dIwOQEJx5WH6DC8SuzTiwTpBULDM2RfKp2rd0PXu8mDyF5lvty06zUFog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789588606; 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=tmZlSgUIqwEpEfkkzkcIUHDxDToiNJYEszTEY1kfgsY=; b=D09SfWZfxTi46jb9S8wINd/boWUixYE67ltU/JGFAJh9GbvPOHICKpQq9phY6yT8DUuwZ9 AigDLKM1KiabQhpCQ0zdQGUiIuVEs6HqwExV7Icfmf63bVz8AAdVrUZVj1s/A3h2YNLDbJ u7Dx9w/grK3HXo0rFZIK3c2+xWb+4pqTcW0/0FuSt9+cSu8OhmDAghsmiO/kBcvpd9Wn+0 6wetVslmk9nOPVrD7MTGPfMIhcV2wYEMlfA0CZp+Am56rGz36RjrDtxLIKHrACITZlwGuV FvQpD7KFvE04M8VMWPFZQRqMlSo2oAPFMKIVzV99K6kY67Oryy+HHUIRSu14Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hlV5V1dcpz11MH for ; Wed, 16 Sep 2026 19:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c2f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 16 Sep 2026 19:56:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ed5fc8066f98 - main - cxgbe: Use the correct GHASH offset for a GMAC from a full TLS record 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ed5fc8066f98e639f624de9997b33727ed883c32 Auto-Submitted: auto-generated Date: Wed, 16 Sep 2026 19:56:40 +0000 Message-Id: <6aaaf478.3c2f9.5b5e2ae5@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ed5fc8066f98e639f624de9997b33727ed883c32 commit ed5fc8066f98e639f624de9997b33727ed883c32 Author: John Baldwin AuthorDate: 2026-09-16 19:56:20 +0000 Commit: John Baldwin CommitDate: 2026-09-16 19:56:20 +0000 cxgbe: Use the correct GHASH offset for a GMAC from a full TLS record If a TLS request transmits all but a part of the GMAC at the end of a TLS record, the work request asks the crypto engine to return the calculated GMAC to the driver so it can be sent in a simple TCP packet when the rest of the TLS record is transmitted in the future. However, the offset of the returned GHASH offset was calculated incorrectly in this case causing the driver to not recognize the cached GMAC and instead use a more wasteful work request in the future that encrypted the entire TLS record discarding all but the needed bytes of the trailer. Note that this does not effect correctness, just efficiency. Reviewed by: np Fixes: 9e269eafebfc ("cxgbe: Use partial GCM mode for partial TLS records on T7") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D59711 --- sys/dev/cxgbe/crypto/t7_kern_tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c index f23e9de61c0e..d3a4f6d3ab6f 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -1975,7 +1975,7 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, tlsp->ghash_pending = true; tlsp->ghash_valid = false; tlsp->ghash_lcb = ghash_lcb; - if (last_ghash_frag) + if (ghash_lcb) tlsp->ghash_offset = offset + plen; else tlsp->ghash_offset = rounddown2(offset + plen,