• brakmo's avatar
    bpf: Update __cgroup_bpf_run_filter_skb with cn · e7a3160d
    brakmo authored
    For egress packets, __cgroup_bpf_fun_filter_skb() will now call
    BPF_PROG_CGROUP_INET_EGRESS_RUN_ARRAY() instead of PROG_CGROUP_RUN_ARRAY()
    in order to propagate congestion notifications (cn) requests to TCP
    callers.
    
    For egress packets, this function can return:
       NET_XMIT_SUCCESS    (0)    - continue with packet output
       NET_XMIT_DROP       (1)    - drop packet and notify TCP to call cwr
       NET_XMIT_CN         (2)    - continue with packet output and notify TCP
                                    to call cwr
       -EPERM                     - drop packet
    
    For ingress packets, this function will return -EPERM if any attached
    program was found and if it returned != 1 during execution. Otherwise 0
    is returned.
    Signed-off-by: default avatarLawrence Brakmo <brakmo@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    e7a3160d
cgroup.c 31 KB