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

Function m_pkthdr_init

freebsd/kern/uipc_mbuf.c:364–383  ·  view source on GitHub ↗

* Non-inlined part of m_init(). */

Source from the content-addressed store, hash-verified

362 * Non-inlined part of m_init().
363 */
364int
365m_pkthdr_init(struct mbuf *m, int how)
366{
367#ifdef MAC
368 int error;
369#endif
370 m->m_data = m->m_pktdat;
371 bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
372#ifdef NUMA
373 m->m_pkthdr.numa_domain = M_NODOM;
374#endif
375#ifdef MAC
376 /* If the label init fails, fail the alloc */
377 error = mac_mbuf_init(m, how);
378 if (error)
379 return (error);
380#endif
381
382 return (0);
383}
384
385/*
386 * "Move" mbuf pkthdr from "from" to "to".

Callers 2

m_initFunction · 0.85
m_initFunction · 0.85

Calls 2

bzeroFunction · 0.85
mac_mbuf_initFunction · 0.85

Tested by

no test coverage detected