* The "packet" keg constructor. */
| 775 | * The "packet" keg constructor. |
| 776 | */ |
| 777 | static int |
| 778 | mb_ctor_pack(void *mem, int size, void *arg, int how) |
| 779 | { |
| 780 | struct mbuf *m; |
| 781 | struct mb_args *args; |
| 782 | int error, flags; |
| 783 | short type; |
| 784 | |
| 785 | m = (struct mbuf *)mem; |
| 786 | args = (struct mb_args *)arg; |
| 787 | flags = args->flags; |
| 788 | type = args->type; |
| 789 | MPASS((flags & M_NOFREE) == 0); |
| 790 | |
| 791 | #ifdef INVARIANTS |
| 792 | trash_ctor(m->m_ext.ext_buf, MCLBYTES, arg, how); |
| 793 | #endif |
| 794 | |
| 795 | error = m_init(m, how, type, flags); |
| 796 | |
| 797 | /* m_ext is already initialized. */ |
| 798 | m->m_data = m->m_ext.ext_buf; |
| 799 | m->m_flags = (flags | M_EXT); |
| 800 | |
| 801 | return (error); |
| 802 | } |
| 803 | |
| 804 | /* |
| 805 | * This is the protocol drain routine. Called by UMA whenever any of the |
nothing calls this directly
no test coverage detected