@@ -1767,6 +1767,7 @@ union bpf_attr {
1767
1767
* * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out)
1768
1768
* * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission)
1769
1769
* * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change)
1770
+ * * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT)
1770
1771
*
1771
1772
* Therefore, this function can be used to clear a callback flag by
1772
1773
* setting the appropriate bit to zero. e.g. to disable the RTO
@@ -3069,6 +3070,12 @@ struct bpf_tcp_sock {
3069
3070
* sum(delta(snd_una)), or how many bytes
3070
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
3081
struct bpf_sock_tuple {
@@ -3311,7 +3318,8 @@ struct bpf_sock_ops {
3311
3318
#define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0)
3312
3319
#define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1)
3313
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
3323
* supported cb flags
3316
3324
*/
3317
3325
@@ -3366,6 +3374,8 @@ enum {
3366
3374
BPF_SOCK_OPS_TCP_LISTEN_CB , /* Called on listen(2), right after
3367
3375
* socket transition to LISTEN state.
3368
3376
*/
3377
+ BPF_SOCK_OPS_RTT_CB , /* Called on every RTT.
3378
+ */
3369
3379
};
3370
3380
3371
3381
/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
0 commit comments