From nobody Thu Jan 29 15:39:53 2026 X-Original-To: dev-commits-src-branches@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 4f23HG1Sc9z6QrhS for ; Thu, 29 Jan 2026 15:39:54 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f23HF3Mygz3xd2 for ; Thu, 29 Jan 2026 15:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769701193; 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=dBeRLTd4XjILAiQykSeC/97i4NrtsTOGu7yHvYw8YF4=; b=p72m8AG4enhCtX9/ShakC6yOCdQ14HGrCHiDPrbkuv3Uo0OgpFfGfVsZe0oQ4bUUNHrNMq iolI7rdnz53uYew+xvY9o6hYxHzje4nfRLsxg9lzidbVr2KQbXcqm/h5PTNhG6TlbVj1Ae 3bgq0gK/lcqT+gcASKwPz41eWPJu8SQEEo7WOTkbSiysvn2r+uRkOJxWZZEqYJb3kbzzXA bN8DGcGPL7yHY2uygX0xVJvKVit/0Oz6zEVFdatG7NDTV1X69UwnbykBO0b/1uEoBO1y2b IBUxcRkknbzKgC2L2jDCKdCaj9C3sWgiTQ5aavS/LB90bOC4jR3SsftHa1vRnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769701193; a=rsa-sha256; cv=none; b=cKClMGtnD5XboIgprUQmrhKQ2O4e6BUk8xDvFJjj+W+438doPZ2qVVkWQJ3SGiN7XrSdFO +oD8EOmvQcwrFdvKLDdt60VLgR9IlwhqeFj4I2jz8m7/OzEQkAsalzfiytRHuax4M7xws4 yCVJS/fncZAh2R9t83/Ufy04RtanvhgG2+PQh2qJSRXOXsJgTvMMJ2rDU6hTPo858YmMt3 H0aGWodga/+sa9T6G/QPCfhlPqK90qqhGdIOJWm6cuTGo64MGLz+ViLyJ/R2ZPew4qpiVZ RPLxJnx6X8l7llODZ/8B3IKCqlOe8sc3uqwg5/0VuOnzsqhkVo6bN3FLGki5nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769701193; 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=dBeRLTd4XjILAiQykSeC/97i4NrtsTOGu7yHvYw8YF4=; b=wp2GLWUjvLfALe8zg7ci0UZcd08jiBUEh5p4ovs6qITs0CaZT56vwREwnU5cmvGh+u9rG+ xbfKY42O5yTusqhG8RfGmqMd8WnxiJhyLrWSHWHOAoW+R9TWosck7hc0oSzORI/mPwnfpZ Or2Nt/yvYRaICcy7twS7vDWmuiGAWuHRbg3MSAEUHmZ7i1a19fVy9aRmFVFeov93uNvbaK xPCHrfn8uSLs5q7xmuXUhad5OPt5QF/RfHXpF+6Q2eA/YmVpHdAzFLRp2PUpwUsAOcBdjX s3JSBnngrlo65j4zqTb55H6z81ZSN6MqNEp1zbD793lA6vOBNmbK1YpGuHoBIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f23HF2dhSzkZn for ; Thu, 29 Jan 2026 15:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a402 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Jan 2026 15:39:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: aee8d42a37ac - stable/14 - cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: aee8d42a37ac34e20af6b4b4a890e7221d200330 Auto-Submitted: auto-generated Date: Thu, 29 Jan 2026 15:39:53 +0000 Message-Id: <697b7f49.3a402.40892592@gitrepo.freebsd.org> The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aee8d42a37ac34e20af6b4b4a890e7221d200330 commit aee8d42a37ac34e20af6b4b4a890e7221d200330 Author: John Baldwin AuthorDate: 2025-05-13 13:57:18 +0000 Commit: John Baldwin CommitDate: 2026-01-29 15:17:47 +0000 cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding Requests whose immediate data do not end on a 16-byte boundary are padded with zeroes before the next WR command. Since ULP commands are 8 byte aligned, if there are more than 8 bytes of padding, the immediate data is padded with zeroes up to an 8 byte boundary and the last 8 bytes contain a ULP NOOP command. In the case of exactly 8 bytes of padding, the result should be that no zeroes are inserted, only the ULP NOOP. However, the code was actually inserting 8 bytes of zero padding followed by the ULP NOOP causing the following real command to be misaligned. Fix this by skipping the zero padding if there exactly 8 padding bytes. Reported by: Sony Arpita Das @ Chelsio Sponsored by: Chelsio Communications (cherry picked from commit 2befd06588325c541d400fcc4915a1adfd1c7d17) --- sys/dev/cxgbe/crypto/t6_kern_tls.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c index 2173cb670874..0e7bd305869b 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -1794,9 +1794,11 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, void *dst, } if (imm_len % 16 != 0) { - /* Zero pad to an 8-byte boundary. */ - memset(out, 0, 8 - (imm_len % 8)); - out += 8 - (imm_len % 8); + if (imm_len % 8 != 0) { + /* Zero pad to an 8-byte boundary. */ + memset(out, 0, 8 - (imm_len % 8)); + out += 8 - (imm_len % 8); + } /* * Insert a ULP_TX_SC_NOOP if needed so the SGL is