From b7f5fd3698cdb82fbf840aa33aaa02f274f116f1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 11 Dec 2017 16:01:17 -0800 Subject: [PATCH] uapi: add access to snd_cwnd and other sock_ops From upstream kernel commit f19397a5c65665d66e3866b42056f1f58b7a366b bpf: Add access to snd_cwnd and others in sock_ops Signed-off-by: Stephen Hemminger --- include/uapi/linux/bpf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 81f9145f..0defef03 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h @@ -941,6 +941,12 @@ struct bpf_sock_ops { __u32 local_ip6[4]; /* Stored in network byte order */ __u32 remote_port; /* Stored in network byte order */ __u32 local_port; /* stored in host byte order */ + __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 */ }; /* List of known BPF sock_ops operators.