From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Lawrence Brakmo <brakmo@fb.com>
Cc: netdev <netdev@vger.kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Kernel Team <kernel-team@fb.com>,
Vlad Dumitrescu <vladum@google.com>
Subject: Re: [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops
Date: Sun, 3 Dec 2017 10:26:48 -0800 [thread overview]
Message-ID: <20171203182646.26z3pu6keynirx4v@ast-mbp> (raw)
In-Reply-To: <20171201181504.1040223-1-brakmo@fb.com>
On Fri, Dec 01, 2017 at 10:15:04AM -0800, Lawrence Brakmo wrote:
> Adds read access to snd_cwnd and srtt_us fields of tcp_sock. Since these
> fields are only valid if the socket associated with the sock_ops program
> call is a full socket, the field is_fullsock is also added to the
> bpf_sock_ops struct. If the socket is not a full socket, reading these
> fields returns 0.
>
> Note that in most cases it will not be necessary to check is_fullsock to
> know if there is a full socket. The context of the call, as specified by
> the 'op' field, can sometimes determine whether there is a full socket.
>
> The struct bpf_sock_ops has the following fields added:
>
> __u32 is_fullsock; /* Some TCP fields are only valid if
> * there is a full socket. If not, the
> * fields read as zero.
> */
> __u32 snd_cwnd;
> __u32 srtt_us; /* Averaged RTT << 3 in usecs */
>
> There is a new macro, SOCK_OPS_GET_TCP32(NAME), to make it easier to add
> read access to more 32 bit tcp_sock fields.
>
> Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
lgtm
Acked-by: Alexei Starovoitov <ast@kernel.org>
will wait for Daniel to either ack it or apply it.
next prev parent reply other threads:[~2017-12-03 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 18:15 [PATCH net-next] bpf: Add access to snd_cwnd and others in sock_ops Lawrence Brakmo
2017-12-03 18:26 ` Alexei Starovoitov [this message]
2017-12-04 22:32 ` Daniel Borkmann
2017-12-05 0:21 ` Lawrence Brakmo
2017-12-05 13:59 ` Daniel Borkmann
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=20171203182646.26z3pu6keynirx4v@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=brakmo@fb.com \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=vladum@google.com \
/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