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

Function dn_buf_import

freebsd/kern/kern_mbuf.c:419–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417} dn_saved_zones;
418
419static int
420dn_buf_import(void *arg, void **store, int count, int domain __unused,
421 int flags)
422{
423 struct mbufq *q;
424 struct mbuf *m;
425 int i;
426
427 q = arg;
428
429 for (i = 0; i < count; i++) {
430 m = mbufq_dequeue(q);
431 if (m == NULL)
432 break;
433 trash_init(m, q == &dn_mbufq ? MSIZE : dn_clsize, flags);
434 store[i] = m;
435 }
436 KASSERT((flags & M_WAITOK) == 0 || i == count,
437 ("%s: ran out of pre-allocated mbufs", __func__));
438 return (i);
439}
440
441static void
442dn_buf_release(void *arg, void **store, int count)

Callers

nothing calls this directly

Calls 2

trash_initFunction · 0.85
mbufq_dequeueFunction · 0.50

Tested by

no test coverage detected