From nobody Thu Oct 08 20:44:14 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 4j12670PzJz4n2tJ for ; Thu, 08 Oct 2026 20:44:15 +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 4j12664hF9z4cMm for ; Thu, 08 Oct 2026 20:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791492254; 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=wHAFqpzNOybyJD3XpZH897FNlso5ukNJ3fiBJ6HhY4Q=; b=IQDNYoE3Ys9hY5HXbnGJMbDuemqKj899mY4sTbkyHmVlQxbEPkW9MSQsM6BZH+JzFJMA0w jWFqFwDEqujlUn7NoTG6GVQKQND2ba+NCavEx6kW2oBTYhtajGWianLvXtSptV6hldrzCF BTlWYwAAnCa6W/+bpXxtQgj3yct8MITuRt63Pnec43PdqvcogGrbQUmvRnmpmUinA3uNM9 bFF7s72PsXKPQBsF6+ohVUQNhuXbmPgh0qzOOzPZJxzXPhu75NgOAZy+kdwzswA2PvFfwv oNpzsQaoRQ0E7WCTaW5NcxgUsoUJT65PaXdLQ1VucFU4G+bWloqhmJDkXgeldw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791492254; b=x2iPnYASu2RHNyW5r4Dstc22mCIeGeBVwPIRQjjtQLXQPWhg63kFkxHXtFIeFtQQPdxIh6 SyQutVBd5bGk9tqXTexWYV0q9YM0WlIhhWSqgTUVUo3lutU/bs6ecIcD5DRdNIjXAlVJ/O z522hhoB2CMkC/f5XD+a2Y/lGVFbiwtIpN/DX+CWJgZMxELaSKfTE4ll79oMLq6S/pB9h1 DUz9snrmoUARIlq+CCYQs0tTCdtmweTqfvb6Vbd6IRRFylbr4mcKdPwMRAznWwQlpaDVZc UZ6ICCAXhcyyqIqKacPSKOi11RFflFJk7ftDmbOw7Vz6/+hj1zBIzYOu5Uo9Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791492254; 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=wHAFqpzNOybyJD3XpZH897FNlso5ukNJ3fiBJ6HhY4Q=; b=nOCGDVgjMBkyYc/+iAugJBvNbxOeODvX9+ayFNZtztEM9eQVb/qAiiScHR/B0poFzgNMlp Uhd+d0jOXUngAqQ8kCId+Ah/yekChlsIt8O+xJP6ggCfOYvH4EtKeMm+Hc6p2BngRyODHj VR8v1MNVEThRH0twNb2EA/JgAeqIH5YtNybqdF9gVAYwigYE4FUcZiOb1m3vUCpw3KhEfO s2M8HHM4ACZjXalBy+flxRYAw6jbBbnVIkbOHCnKWkhs/rk7pxZ41eQZo3od5wyOp1bwen VP9ysn6/4Z7mlhDZGmqy8CW2seIYGIH/JVsq8WGnZ/52DACCinQj+avCkOcMiw== 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 4j12662jCCzwF5 for ; Thu, 08 Oct 2026 20:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33902 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Oct 2026 20:44:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c9ea1e9994b5 - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: c9ea1e9994b511b7d820a5986442af9224322833 Auto-Submitted: auto-generated Date: Thu, 08 Oct 2026 20:44:14 +0000 Message-Id: <6ac8009e.33902.70d32bcb@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c9ea1e9994b511b7d820a5986442af9224322833 commit c9ea1e9994b511b7d820a5986442af9224322833 Author: John Baldwin AuthorDate: 2026-09-16 19:56:20 +0000 Commit: John Baldwin CommitDate: 2026-10-08 20:42:33 +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 (cherry picked from commit ed5fc8066f98e639f624de9997b33727ed883c32) --- 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 e287f7f714be..584161f37a07 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -1978,7 +1978,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,