MCPcopy Create free account
hub / github.com/F-Stack/f-stack / m_demote

Function m_demote

freebsd/kern/uipc_mbuf.c:266–279  ·  view source on GitHub ↗

* Clean up mbuf (chain) from any tags and packet headers. * If "all" is set then the first mbuf in the chain will be * cleaned too. */

Source from the content-addressed store, hash-verified

264 * cleaned too.
265 */
266void
267m_demote(struct mbuf *m0, int all, int flags)
268{
269 struct mbuf *m;
270
271 for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) {
272 KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p",
273 __func__, m, m0));
274 if (m->m_flags & M_PKTHDR)
275 m_demote_pkthdr(m);
276 m->m_flags = m->m_flags & (M_EXT | M_RDONLY | M_NOFREE |
277 M_EXTPG | flags);
278 }
279}
280
281/*
282 * Sanity checks on mbuf (chain) for use in KASSERT() and general

Callers 3

sbappend_ktls_rxFunction · 0.85
sbappendstream_lockedFunction · 0.85
m_catpktFunction · 0.85

Calls 1

m_demote_pkthdrFunction · 0.85

Tested by

no test coverage detected