Skip to content

Commit 692cbaa

Browse files
fomichevborkmann
authored andcommitted
bpf/tools: sync bpf.h
Sync new bpf_tcp_sock fields and new BPF_PROG_TYPE_SOCK_OPS RTT callback. Cc: Eric Dumazet <[email protected]> Cc: Priyaranjan Jha <[email protected]> Cc: Yuchung Cheng <[email protected]> Cc: Soheil Hassas Yeganeh <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Acked-by: Yuchung Cheng <[email protected]> Signed-off-by: Stanislav Fomichev <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent c2cb5e8 commit 692cbaa

File tree

1 file changed

+11
-1
lines changed
  • tools/include/uapi/linux

1 file changed

+11
-1
lines changed

tools/include/uapi/linux/bpf.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,7 @@ union bpf_attr {
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 {
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 {
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 {
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

0 commit comments

Comments
 (0)