Add a comment explaining that we initialize the 'a' buffer for
zero-copy to the store buffer position on the BPF descriptor, and the 'b' buffer as the free buffer in order to fill them in the order documented in bpf(4). MFC after: 4 months Suggested by: csjp
This commit is contained in:
parent
5b9ac353f2
commit
61a4ef5ea0
@ -496,6 +496,11 @@ bpf_zerocopy_ioctl_setzbuf(struct thread *td, struct bpf_d *d,
|
||||
zbuf_free(zbb);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Point BPF descriptor at buffers; initialize sbuf as zba so that
|
||||
* it is always filled first in the sequence, per bpf(4).
|
||||
*/
|
||||
d->bd_fbuf = (caddr_t)zbb;
|
||||
d->bd_sbuf = (caddr_t)zba;
|
||||
d->bd_slen = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user