* Ioctl to return the maximum buffer size. */
| 488 | * Ioctl to return the maximum buffer size. |
| 489 | */ |
| 490 | int |
| 491 | bpf_zerocopy_ioctl_getzmax(struct thread *td, struct bpf_d *d, size_t *i) |
| 492 | { |
| 493 | |
| 494 | KASSERT(d->bd_bufmode == BPF_BUFMODE_ZBUF, |
| 495 | ("bpf_zerocopy_ioctl_getzmax: not in zbuf mode")); |
| 496 | |
| 497 | *i = BPF_MAX_PAGES * PAGE_SIZE; |
| 498 | return (0); |
| 499 | } |
| 500 | |
| 501 | /* |
| 502 | * Ioctl to force rotation of the two buffers, if there's any data available. |