git: 398254f9999e - main - mbuf: simplify m_free

From: Andrew Gallatin <gallatin_at_FreeBSD.org>
Date: Mon, 12 Oct 2026 23:09:27 UTC
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=398254f9999eb1af5f0842570111d584aaf8d01a

commit 398254f9999eb1af5f0842570111d584aaf8d01a
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2026-10-12 21:32:52 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2026-10-12 23:08:16 +0000

    mbuf: simplify m_free
    
    The check for  (M_PKTHDR|M_NOFREE) was added by np@ in
    "91d1b03d3617 Merge r254736 from user/np/cxl_tuning."
    in order to support a clever rx mode optimization used
    by cxgbe at the time.  That optimization was removed in
    46e1e307edb6 several years ago.  This check is otherwise
    unneeded and adds an extraneous test to every mbuf free,
    so let's remove it.
    
    Reviewed by: glebius, np
    Differential Revision: https://reviews.freebsd.org/D60686
    Sponsored by: Netflix
---
 sys/sys/mbuf.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index 076cfecb1f99..504d2902b4fb 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -1523,8 +1523,6 @@ m_free(struct mbuf *m)
 	struct mbuf *n = m->m_next;
 
 	MBUF_PROBE1(m__free, m);
-	if ((m->m_flags & (M_PKTHDR|M_NOFREE)) == (M_PKTHDR|M_NOFREE))
-		m_tag_delete_chain(m, NULL);
 	if (m->m_flags & M_PKTHDR && m->m_pkthdr.csum_flags & CSUM_SND_TAG)
 		m_snd_tag_rele(m->m_pkthdr.snd_tag);
 	if (m->m_flags & M_EXTPG)