* Non-inlined part of m_init(). */
| 362 | * Non-inlined part of m_init(). |
| 363 | */ |
| 364 | int |
| 365 | m_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". |
no test coverage detected