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

Function bpf_canfreebuf

freebsd/net/bpf.c:430–441  ·  view source on GitHub ↗

* If the buffer mechanism has a way to decide that a held buffer can be made * free, then it is exposed via the bpf_canfreebuf() interface. (1) is * returned if the buffer can be discarded, (0) is returned if it cannot. */

Source from the content-addressed store, hash-verified

428 * returned if the buffer can be discarded, (0) is returned if it cannot.
429 */
430static int
431bpf_canfreebuf(struct bpf_d *d)
432{
433
434 BPFD_LOCK_ASSERT(d);
435
436 switch (d->bd_bufmode) {
437 case BPF_BUFMODE_ZBUF:
438 return (bpf_zerocopy_canfreebuf(d));
439 }
440 return (0);
441}
442
443/*
444 * Allow the buffer model to indicate that the current store buffer is

Callers 3

bpf_readyFunction · 0.85
reset_dFunction · 0.85
catchpacketFunction · 0.85

Calls 1

bpf_zerocopy_canfreebufFunction · 0.85

Tested by

no test coverage detected