Lines Matching defs:buf
801 #define MEXT_INIT(m, buf, size, free, arg, rfa, ref, flag) { \
802 (m)->m_data = (m)->m_ext.ext_buf = (buf); \
814 #define MBUF_CL_INIT(m, buf, rfa, ref, flag) \
815 MEXT_INIT(m, buf, m_maxsize(MC_CL), NULL, NULL, rfa, ref, flag)
817 #define MBUF_BIGCL_INIT(m, buf, rfa, ref, flag) \
818 MEXT_INIT(m, buf, m_maxsize(MC_BIGCL), m_bigfree, NULL, rfa, ref, flag)
820 #define MBUF_16KCL_INIT(m, buf, rfa, ref, flag) \
821 MEXT_INIT(m, buf, m_maxsize(MC_16KCL), m_16kfree, NULL, rfa, ref, flag)
1314 void *buf;
1541 MALLOC(buf, void *, MBUF_MTYPES_SIZE(ncpu) + CPU_CACHE_SIZE,
1543 VERIFY(buf != NULL);
1545 mbuf_mtypes = (mbuf_mtypes_t *)P2ROUNDUP((intptr_t)buf, CPU_CACHE_SIZE);
1561 * max sock buf at 1M
1586 mcache_obj_t *buf;
1617 buf = sp->sl_head;
1618 VERIFY(slab_inrange(sp, buf) && sp == slab_get(buf));
1621 sp->sl_head = buf->obj_next;
1624 sp->sl_head = buf->obj_next;
1640 mcache_audit_t *mca = mcl_audit_buf2mca(class, buf);
1696 _MCHECK((struct mbuf *)buf);
1716 return (buf);
1723 slab_free(mbuf_class_t class, mcache_obj_t *buf)
1730 VERIFY(buf->obj_next == NULL);
1731 sp = slab_get(buf);
1732 VERIFY(sp->sl_class == class && slab_inrange(sp, buf) &&
1739 VERIFY(IS_P2ALIGNED(buf, MCLBYTES));
1750 VERIFY(IS_P2ALIGNED(buf, MCLBYTES));
1765 VERIFY(IS_P2ALIGNED(buf, MBIGCLBYTES));
1801 mcache_audit_t *mca = mcl_audit_buf2mca(class, buf);
1803 mcache_audit_free_verify(mca, buf, 0, m_maxsize(class));
1810 buf->obj_next = sp->sl_head;
1818 buf->obj_next = sp->sl_head;
1820 sp->sl_head = buf;
4924 m_devget(char *buf, int totlen, int off0, struct ifnet *ifp,
4933 cp = buf;
4993 cp = buf;
6069 slab_get(void *buf)
6076 VERIFY(MBUF_IN_MAP(buf));
6077 ix = ((char *)buf - (char *)mbutl) >> MBSHIFT;
6127 ix = MTOBG(buf) % NSLABSPMB;
6187 slab_inrange(mcl_slab_t *sp, void *buf)
6189 return ((uintptr_t)buf >= (uintptr_t)sp->sl_base &&
6190 (uintptr_t)buf < ((uintptr_t)sp->sl_base + sp->sl_len));
6200 uintptr_t buf = (uintptr_t)sp->sl_base;
6202 for (i = 0; i < sp->sl_chunks; i++, buf += chunk_len) {
6203 void *next = ((mcache_obj_t *)buf)->obj_next;
6212 (void *)buf, sp, next, mbutl, embutl);
6217 (mcache_obj_t *)buf);
6240 mcl_audit_init(void *buf, mcache_audit_t **mca_list,
6251 ix = MTOBG(buf);