git: 570e5dff1898 - stable/15 - cxgbe: Don't query mbuf_nsegs for header-only requests

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 19 Nov 2026 15:42:34 UTC
The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=570e5dff18981c889a10e7a324247876e66ef90f

commit 570e5dff18981c889a10e7a324247876e66ef90f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-09-30 19:19:11 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-11-19 15:42:19 +0000

    cxgbe: Don't query mbuf_nsegs for header-only requests
    
    Sponsored by:   Chelsio Communications
    
    (cherry picked from commit 1dd03aa32189136c75c6963a631ee91d2cdb3170)
---
 sys/dev/cxgbe/crypto/t7_kern_tls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c
index 584161f37a07..b1f53c06f79c 100644
--- a/sys/dev/cxgbe/crypto/t7_kern_tls.c
+++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c
@@ -857,6 +857,7 @@ t7_ktls_parse_pkt(struct mbuf *m)
 	MPASS(m->m_next->m_flags & M_EXTPG);
 
 	tot_len = 0;
+	nsegs = -1;
 
 	/*
 	 * Each of the remaining mbufs in the chain should reference a
@@ -895,7 +896,7 @@ t7_ktls_parse_pkt(struct mbuf *m)
 				CTR(KTR_CXGBE,
 				    "%s: %p len16 %d nsegs %d TCP seq %u deferred",
 				    __func__, tlsp, mbuf_len16(m),
-				    mbuf_nsegs(m), ntohl(tcp->th_seq));
+				    nsegs, ntohl(tcp->th_seq));
 #endif
 			}
 			TXQ_UNLOCK(tlsp->txq);
@@ -907,7 +908,7 @@ t7_ktls_parse_pkt(struct mbuf *m)
 
 #ifdef VERBOSE_TRACES
 	CTR(KTR_CXGBE, "%s: %p len16 %d nsegs %d", __func__, tlsp,
-	    mbuf_len16(m), mbuf_nsegs(m));
+	    mbuf_len16(m), nsegs);
 #endif
 	items[0] = m;
 	error = mp_ring_enqueue(tlsp->txq->r, items, 1, 256);