From nobody Wed Sep 16 19:56:40 2026 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 4hlV5P0sDPz6sGCl for ; Wed, 16 Sep 2026 19:56:41 +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 4hlV5P0MVZz4bNf for ; Wed, 16 Sep 2026 19:56:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789588601; 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=VJ+575OU7+q4hup4kaSTtWLUQM1CXTGLhfUYt0XfcV8V2mk0NnPiuIctJONUwpiEa7KXVV s0Hjo73pzKR5/g8ZqFh4ZmlvKdm/SmK5C+Wsr1cN9U+tedidebS/SDoaGUWDNuZuG5d0Ll rc0Mn/J2zZ2FUt58GgPDdUFXE4Cnea4B1GmN03XijBDhpMFcGDDqb0tO14ayBXanx1M9UU aYpyOCY0scPkpfXq8wy+lUUG9RTQKXbDyvcCpX3cKJHLTudX5IZ3gjmzOb4zMTMeUrmed5 XbAW5ZvYyh74yD6Cprg/xtEPNskl4xBLpiqggPtXBX53k5ylvQcpXYTzQ0Xc6A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789588601; b=arO/N8pIqBYX7gIYXSvKQ5CGUfMcIBhT6zDZ0LxqLi7+iXIZyCSwGLcIm+/KGsIRPjKEhp /Q3CD46SY/Z0sMv+Nbf0ftHPVuMqWeoNlDf1eDxaQgio8Wa5ehiUPKkSQaDN3QTF/qn+i2 NfewPvbzdrCmR7rVJqiBRDQjw1x8j3ajDg9DF600vjtNbSy3VGOS7QK8FPjwOlYKKeMYED oRwKeglW/f+8cWruTyZJ/DtawOVAKQLPhP7cnfSjAHPyWXg42KFoVL2rREmJ17ZCL6Q/r6 IG8jqLVA9s7dE9hq/KSerWkvFflBm17958SqcsmRqgwX1PKyHSghoaAq8tSMgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789588601; 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=kj31q5TVKWGjK0yFY5BLOpfWwqFPvxfM+ib/L1w11zEWf+Ngg/jA3QcGk9cLa/gNFyXumN WnxwqXmMxNuiAsagYXktOW7wBW7acgwmqjgBA6KC7zinmxLRmUkQxpKO8gLL4ZNd2M2d6d +DBPvL4nSqLpM0AgxG30S8jsnxGagpt//jusa64WevV2vVKS7Nz3WH4MQQ3keZ1moVVKy1 O47nMmaaWoalQYWsZtzo3nzkc2/sxQnhWWMDTuA+k+xD1xi7SB+5SpWS36L20KV1YJHfiJ LpphJ3lgoTUtCj8RtQrpKSh6MwbxvS9XH/hfXd4ZQFnQ5lhH5Um/H+TkDxmQVg== 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 4hlV5N6XQ0z11cs for ; Wed, 16 Sep 2026 19:56:40 +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 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 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,