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

Function bpf_zerocopy_free

freebsd/net/bpf_zerocopy.c:468–485  ·  view source on GitHub ↗

* Free zero copy buffers at request of descriptor. */

Source from the content-addressed store, hash-verified

466 * Free zero copy buffers at request of descriptor.
467 */
468void
469bpf_zerocopy_free(struct bpf_d *d)
470{
471 struct zbuf *zb;
472
473 KASSERT(d->bd_bufmode == BPF_BUFMODE_ZBUF,
474 ("bpf_zerocopy_free: not in zbuf mode"));
475
476 zb = (struct zbuf *)d->bd_sbuf;
477 if (zb != NULL)
478 zbuf_free(zb);
479 zb = (struct zbuf *)d->bd_hbuf;
480 if (zb != NULL)
481 zbuf_free(zb);
482 zb = (struct zbuf *)d->bd_fbuf;
483 if (zb != NULL)
484 zbuf_free(zb);
485}
486
487/*
488 * Ioctl to return the maximum buffer size.

Callers 1

bpf_freeFunction · 0.85

Calls 1

zbuf_freeFunction · 0.85

Tested by

no test coverage detected