Re: [bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-15 Thread John Fastabend
On 03/15/2018 01:32 PM, Daniel Borkmann wrote: > On 03/12/2018 08:23 PM, John Fastabend wrote: >> A single sendmsg or sendfile system call can contain multiple logical >> messages that a BPF program may want to read and apply a verdict. But, >> without an apply_bytes helper any verdict on the data

Re: [bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-15 Thread John Fastabend
On 03/15/2018 02:45 PM, Alexei Starovoitov wrote: > On Mon, Mar 12, 2018 at 12:23:34PM -0700, John Fastabend wrote: >> A single sendmsg or sendfile system call can contain multiple logical >> messages that a BPF program may want to read and apply a verdict. But, >> without an apply_bytes helper

Re: [bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-15 Thread Alexei Starovoitov
On Mon, Mar 12, 2018 at 12:23:34PM -0700, John Fastabend wrote: > A single sendmsg or sendfile system call can contain multiple logical > messages that a BPF program may want to read and apply a verdict. But, > without an apply_bytes helper any verdict on the data applies to all > bytes in the

Re: [bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-15 Thread Daniel Borkmann
On 03/12/2018 08:23 PM, John Fastabend wrote: > A single sendmsg or sendfile system call can contain multiple logical > messages that a BPF program may want to read and apply a verdict. But, > without an apply_bytes helper any verdict on the data applies to all > bytes in the sendmsg/sendfile.

Re: [bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-15 Thread David Miller
From: John Fastabend Date: Mon, 12 Mar 2018 12:23:34 -0700 > A single sendmsg or sendfile system call can contain multiple logical > messages that a BPF program may want to read and apply a verdict. But, > without an apply_bytes helper any verdict on the data applies to

[bpf-next PATCH v2 06/18] bpf: sockmap, add bpf_msg_apply_bytes() helper

2018-03-12 Thread John Fastabend
A single sendmsg or sendfile system call can contain multiple logical messages that a BPF program may want to read and apply a verdict. But, without an apply_bytes helper any verdict on the data applies to all bytes in the sendmsg/sendfile. Alternatively, a BPF program may only care to read the