* This function gets called when the free buffer is re-assigned. */
| 404 | * This function gets called when the free buffer is re-assigned. |
| 405 | */ |
| 406 | static void |
| 407 | bpf_buf_reclaimed(struct bpf_d *d) |
| 408 | { |
| 409 | |
| 410 | BPFD_LOCK_ASSERT(d); |
| 411 | |
| 412 | switch (d->bd_bufmode) { |
| 413 | case BPF_BUFMODE_BUFFER: |
| 414 | return; |
| 415 | |
| 416 | case BPF_BUFMODE_ZBUF: |
| 417 | bpf_zerocopy_buf_reclaimed(d); |
| 418 | return; |
| 419 | |
| 420 | default: |
| 421 | panic("bpf_buf_reclaimed"); |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | /* |
| 426 | * If the buffer mechanism has a way to decide that a held buffer can be made |
no test coverage detected