Netdev List
 help / color / mirror / Atom feed
From: Lawrence Brakmo <brakmo@fb.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, netdev <netdev@vger.kernel.org>
Cc: Martin Lau <kafai@fb.com>, Alexei Starovoitov <ast@fb.com>,
	"Daniel Borkmann" <daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next 1/9] bpf: Add bpf helper bpf_tcp_enter_cwr
Date: Thu, 21 Feb 2019 03:18:35 +0000	[thread overview]
Message-ID: <107E47EF-72F7-46EC-BD5E-94EAF511C3B1@fb.com> (raw)
In-Reply-To: <67c8aaa3-81a5-b1c2-5be4-938a139f3013@gmail.com>

On 2/19/19, 10:30 AM, "Eric Dumazet" <eric.dumazet@gmail.com> 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).
    


      reply	other threads:[~2019-02-21  3:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  5:38 [PATCH bpf-next 1/9] bpf: Add bpf helper bpf_tcp_enter_cwr brakmo
2019-02-19 10:24 ` Daniel Borkmann
2019-02-19 22:59   ` Lawrence Brakmo
2019-02-19 18:30 ` Eric Dumazet
2019-02-21  3:18   ` Lawrence Brakmo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=107E47EF-72F7-46EC-BD5E-94EAF511C3B1@fb.com \
    --to=brakmo@fb.com \
    --cc=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox