* 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. */
| 428 | * returned if the buffer can be discarded, (0) is returned if it cannot. |
| 429 | */ |
| 430 | static int |
| 431 | bpf_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 |
no test coverage detected