On 2/19/19, 10:30 AM, "Eric Dumazet" <[email protected]> wrote:
On 02/18/2019 09:38 PM, brakmo wrote:
> 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 typed bpf_prog
> which currently can be attached to the ingress and egress
> path.
>
Do we have the guarantee socket is a tcp one, and that the caller
owns the socket lock ?
Yes. The BPF verifier insures that a pointer to bpf_tcp_sock points to a
non-NULL full tcp socket.
Please describe the exact context for this helper being used.
>From cgroup skb egress bpf program. When the BPF program determines that a
>flow needs to slow down, it will call bpf_tcp_enter_cwr(tp).