History

bpf/tools: sync bpf.h

Sync new bpf_tcp_sock fields and new BPF_PROG_TYPE_SOCK_OPS RTT callback.

Stanislav Fomichev committed 7 years ago

Commit 692cbaa1 parent c2cb5e81 file · +11 −1Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+11−1
@@ -1767,6 +1767,7 @@ union bpf_attr { · 1766 unmodified lines
17671767 * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out)
17681768 * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission)
17691769 * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change)
1770+ * * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT)
17701771 *
17711772 * Therefore, this function can be used to clear a callback flag by
17721773 * setting the appropriate bit to zero. e.g. to disable the RTO
@@ -3069,6 +3070,12 @@ struct bpf_tcp_sock { · 1296 unmodified lines
30693070 * sum(delta(snd_una)), or how many bytes
30703071 * were acked.
30713072 */
3073+ __u32 dsack_dups; /* RFC4898 tcpEStatsStackDSACKDups
3074+ * total number of DSACK blocks received
3075+ */
3076+ __u32 delivered; /* Total data packets delivered incl. rexmits */
3077+ __u32 delivered_ce; /* Like the above but only ECE marked packets */
3078+ __u32 icsk_retransmits; /* Number of unrecovered [RTO] timeouts */
30723079 };
30733080
30743081 struct bpf_sock_tuple {
@@ -3311,7 +3318,8 @@ struct bpf_sock_ops { · 236 unmodified lines
33113318 #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0)
33123319 #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1)
33133320 #define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2)
3314−#define BPF_SOCK_OPS_ALL_CB_FLAGS 0x7 /* Mask of all currently
3321+#define BPF_SOCK_OPS_RTT_CB_FLAG (1<<3)
3322+#define BPF_SOCK_OPS_ALL_CB_FLAGS 0xF /* Mask of all currently
33153323 * supported cb flags
33163324 */
33173325
@@ -3366,6 +3374,8 @@ enum { · 48 unmodified lines
33663374 BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after
33673375 * socket transition to LISTEN state.
33683376 */
3377+ BPF_SOCK_OPS_RTT_CB, /* Called on every RTT.
3378+ */
33693379 };
33703380
33713381 /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect