Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-25 Thread Eric Dumazet
On 02/25/2019 02:10 AM, Daniel Borkmann wrote: > My understanding is that before doing any writes into skb, we should make > sure the data area is private to us (and offset in linear data). In tc BPF > (ingress, egress) we use bpf_try_make_writable() helper for this, others > like act_{pedit,sk

Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-25 Thread Daniel Borkmann
On 02/23/2019 08:30 AM, Martin Lau wrote: > On Sat, Feb 23, 2019 at 02:14:26AM +0100, Daniel Borkmann wrote: >> On 02/23/2019 02:06 AM, brakmo wrote: >>> This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce >>> "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to >>> BPF_PROG_TYPE_CGRO

Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread Martin Lau
On Sat, Feb 23, 2019 at 02:14:26AM +0100, Daniel Borkmann wrote: > On 02/23/2019 02:06 AM, brakmo wrote: > > This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce > > "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to > > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > >

Re: [PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread Daniel Borkmann
On 02/23/2019 02:06 AM, brakmo wrote: > This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce > "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to > BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can > be attached to the ingress and egress path. The helper is needed > because

[PATCH v2 bpf-next 4/9] bpf: add bpf helper bpf_skb_ecn_set_ce

2019-02-22 Thread brakmo
This patch adds a new bpf helper BPF_FUNC_skb_ecn_set_ce "int bpf_skb_ecn_set_ce(struct sk_buff *skb)". It is added to BPF_PROG_TYPE_CGROUP_SKB typed bpf_prog which currently can be attached to the ingress and egress path. The helper is needed because his type of bpf_prog cannot modify the skb dire