Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-25 Thread Stanislav Fomichev
On 02/26, Martin Lau wrote: > On Mon, Feb 25, 2019 at 03:14:38PM -0800, Stanislav Fomichev wrote: > [ ... ] > > > > > > > To ensure it is only called from BPF_CGROUP_INET_EGRESS, the > > > attr->expected_attach_type must be specified as BPF_CGROUP_INET_EGRESS > > > during load time if the prog us

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-25 Thread Martin Lau
On Mon, Feb 25, 2019 at 03:14:38PM -0800, Stanislav Fomichev wrote: [ ... ] > > > > To ensure it is only called from BPF_CGROUP_INET_EGRESS, the > > attr->expected_attach_type must be specified as BPF_CGROUP_INET_EGRESS > > during load time if the prog uses this new helper. > > The newly added pr

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-25 Thread Stanislav Fomichev
On 02/22, brakmo wrote: > From: Martin KaFai Lau > > This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr > "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)". > It is added to BPF_PROG_TYPE_CGROUP_SKB which can be attached > to the egress path where the bpf prog is called by > ip_finish_output(

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-24 Thread Eric Dumazet
On 02/23/2019 07:08 PM, Martin Lau wrote: > On Sat, Feb 23, 2019 at 05:32:14PM -0800, Eric Dumazet wrote: >> >> >> On 02/22/2019 05:06 PM, brakmo wrote: >>> From: Martin KaFai Lau >>> >>> This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr >>> "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-23 Thread Alexei Starovoitov
On Sun, Feb 24, 2019 at 03:08:48AM +, Martin Lau wrote: > On Sat, Feb 23, 2019 at 05:32:14PM -0800, Eric Dumazet wrote: > > > > > > On 02/22/2019 05:06 PM, brakmo wrote: > > > From: Martin KaFai Lau > > > > > > This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr > > > "int bpf_tcp_enter

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-23 Thread Martin Lau
On Sat, Feb 23, 2019 at 05:32:14PM -0800, Eric Dumazet wrote: > > > On 02/22/2019 05:06 PM, brakmo wrote: > > From: Martin KaFai Lau > > > > This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr > > "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)". > > It is added to BPF_PROG_TYPE_CGROUP_SKB

Re: [PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-23 Thread Eric Dumazet
On 02/22/2019 05:06 PM, brakmo wrote: > From: Martin KaFai Lau > > This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr > "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)". > It is added to BPF_PROG_TYPE_CGROUP_SKB which can be attached > to the egress path where the bpf prog is called by >

[PATCH v2 bpf-next 2/9] bpf: Add bpf helper bpf_tcp_enter_cwr

2019-02-22 Thread brakmo
From: Martin KaFai Lau This patch adds a new bpf helper BPF_FUNC_tcp_enter_cwr "int bpf_tcp_enter_cwr(struct bpf_tcp_sock *tp)". It is added to BPF_PROG_TYPE_CGROUP_SKB which can be attached to the egress path where the bpf prog is called by ip_finish_output() or ip6_finish_output(). The verifie