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
46e1e307ed 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
This commit is contained in:
Andrew Gallatin committed 2026-10-12 19:08:16 -04:00
1 parent cdd95034d6
commit 398254f999
1 file changed
-2
-2
View File
@@ -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)