git: 1dd03aa32189 - main - cxgbe: Don't query mbuf_nsegs for header-only requests

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 30 Sep 2026 19:25:07 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=1dd03aa32189136c75c6963a631ee91d2cdb3170

commit 1dd03aa32189136c75c6963a631ee91d2cdb3170
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-09-30 19:19:11 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-09-30 19:19:11 +0000

    cxgbe: Don't query mbuf_nsegs for header-only requests
    
    Sponsored by:   Chelsio Communications
---
 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 d3a4f6d3ab6f..a9f5a042b895 100644
--- a/sys/dev/cxgbe/crypto/t7_kern_tls.c
+++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c
@@ -854,6 +854,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
@@ -892,7 +893,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);
@@ -904,7 +905,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);