Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Lawrence Brakmo
On 5/28/19, 1:43 PM, "Eric Dumazet" wrote: On 5/28/19 11:54 AM, Lawrence Brakmo wrote: > On 5/28/19, 6:43 AM, "netdev-ow...@vger.kernel.org on behalf of Eric Dumazet" wrote: > > Why are you using preempt_enable_no_resched() here ? > > Because that is

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Eric Dumazet
On 5/28/19 11:54 AM, Lawrence Brakmo wrote: > On 5/28/19, 6:43 AM, "netdev-ow...@vger.kernel.org on behalf of Eric Dumazet" > wrote: > > Why are you using preempt_enable_no_resched() here ? > > Because that is what __BPF_PROG_RUN_ARRAY() calls and the macro > BPF_PROG_CGROUP_INET_EGRESS

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Lawrence Brakmo
On 5/28/19, 6:43 AM, "netdev-ow...@vger.kernel.org on behalf of Eric Dumazet" wrote: On 5/27/19 8:49 PM, brakmo wrote: > Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by > __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can > reque

Re: [PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-28 Thread Eric Dumazet
On 5/27/19 8:49 PM, brakmo wrote: > Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by > __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can > request cwr for TCP packets. > ... > +#define BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY(array, ctx, func)

[PATCH v3 bpf-next 1/6] bpf: Create BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY

2019-05-27 Thread brakmo
Create new macro BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() to be used by __cgroup_bpf_run_filter_skb for EGRESS BPF progs so BPF programs can request cwr for TCP packets. Current cgroup skb programs can only return 0 or 1 (0 to drop the packet. This macro changes the behavior so the low order bit in