Re: [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops

2017-12-05 Thread Daniel Borkmann
On 12/05/2017 01:21 AM, Lawrence Brakmo wrote: [...] > Just a question for clarification: do you need to have this in > the uapi struct as well? Meaning, do you have a specific use case > where you do this check out of the BPF program given the below > two snd_cwnd/srtt_us check thi

Re: [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops

2017-12-04 Thread Lawrence Brakmo
On 12/4/17, 2:32 PM, "netdev-ow...@vger.kernel.org on behalf of Daniel Borkmann" wrote: Hi Lawrence, On 12/01/2017 07:15 PM, Lawrence Brakmo wrote: > Adds read access to snd_cwnd and srtt_us fields of tcp_sock. Since these > fields are only valid if the socket associated wi

Re: [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops

2017-12-04 Thread Daniel Borkmann
Hi Lawrence, On 12/01/2017 07:15 PM, Lawrence Brakmo wrote: > Adds read access to snd_cwnd and srtt_us fields of tcp_sock. Since these > fields are only valid if the socket associated with the sock_ops program > call is a full socket, the field is_fullsock is also added to the > bpf_sock_ops struc

Re: [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops

2017-12-03 Thread Alexei Starovoitov
On Fri, Dec 01, 2017 at 10:15:04AM -0800, Lawrence Brakmo wrote: > Adds read access to snd_cwnd and srtt_us fields of tcp_sock. Since these > fields are only valid if the socket associated with the sock_ops program > call is a full socket, the field is_fullsock is also added to the > bpf_sock_ops s

[PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops

2017-12-01 Thread Lawrence Brakmo
Adds read access to snd_cwnd and srtt_us fields of tcp_sock. Since these fields are only valid if the socket associated with the sock_ops program call is a full socket, the field is_fullsock is also added to the bpf_sock_ops struct. If the socket is not a full socket, reading these fields returns 0