Sync new bpf_tcp_sock fields and new BPF_PROG_TYPE_SOCK_OPS RTT callback.
Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -1767,6 +1767,7 @@ union bpf_attr { · 1766 unmodified lines | |||
| 1767 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) | 1767 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) |
| 1768 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) | 1768 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) |
| 1769 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) | 1769 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) |
| 1770 | * * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT) | ||
| 1770 | * | 1771 | * |
| 1771 | * Therefore, this function can be used to clear a callback flag by | 1772 | * Therefore, this function can be used to clear a callback flag by |
| 1772 | * setting the appropriate bit to zero. e.g. to disable the RTO | 1773 | * setting the appropriate bit to zero. e.g. to disable the RTO |
| @@ -3069,6 +3070,12 @@ struct bpf_tcp_sock { · 1296 unmodified lines | |||
| 3069 | * sum(delta(snd_una)), or how many bytes | 3070 | * sum(delta(snd_una)), or how many bytes |
| 3070 | * were acked. | 3071 | * were acked. |
| 3071 | */ | 3072 | */ |
| 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 */ | ||
| 3072 | }; | 3079 | }; |
| 3073 | 3080 | ||
| 3074 | struct bpf_sock_tuple { | 3081 | struct bpf_sock_tuple { |
| @@ -3311,7 +3318,8 @@ struct bpf_sock_ops { · 236 unmodified lines | |||
| 3311 | #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) | 3318 | #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) |
| 3312 | #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) | 3319 | #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) |
| 3313 | #define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2) | 3320 | #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 | ||
| 3315 | * supported cb flags | 3323 | * supported cb flags |
| 3316 | */ | 3324 | */ |
| 3317 | 3325 | ||
| @@ -3366,6 +3374,8 @@ enum { · 48 unmodified lines | |||
| 3366 | BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after | 3374 | BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after |
| 3367 | * socket transition to LISTEN state. | 3375 | * socket transition to LISTEN state. |
| 3368 | */ | 3376 | */ |
| 3377 | BPF_SOCK_OPS_RTT_CB, /* Called on every RTT. | ||
| 3378 | */ | ||
| 3369 | }; | 3379 | }; |
| 3370 | 3380 | ||
| 3371 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect | 3381 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect |