Performance impact should be minimal because it's under a new BPF_SOCK_OPS_RTT_CB_FLAG flag that has to be explicitly enabled.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -1770,6 +1770,7 @@ union bpf_attr { · 1769 unmodified lines | |||
| 1770 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) | 1770 | * * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out) |
| 1771 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) | 1771 | * * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission) |
| 1772 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) | 1772 | * * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change) |
| 1773 | * * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT) | ||
| 1773 | * | 1774 | * |
| 1774 | * Therefore, this function can be used to clear a callback flag by | 1775 | * Therefore, this function can be used to clear a callback flag by |
| 1775 | * setting the appropriate bit to zero. e.g. to disable the RTO | 1776 | * setting the appropriate bit to zero. e.g. to disable the RTO |
| @@ -3314,7 +3315,8 @@ struct bpf_sock_ops { · 1538 unmodified lines | |||
| 3314 | #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) | 3315 | #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) |
| 3315 | #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) | 3316 | #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) |
| 3316 | #define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2) | 3317 | #define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2) |
| 3317 | #define BPF_SOCK_OPS_ALL_CB_FLAGS 0x7 /* Mask of all currently | 3318 | #define BPF_SOCK_OPS_RTT_CB_FLAG (1<<3) |
| 3319 | #define BPF_SOCK_OPS_ALL_CB_FLAGS 0xF /* Mask of all currently | ||
| 3318 | * supported cb flags | 3320 | * supported cb flags |
| 3319 | */ | 3321 | */ |
| 3320 | 3322 | ||
| @@ -3369,6 +3371,8 @@ enum { · 48 unmodified lines | |||
| 3369 | BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after | 3371 | BPF_SOCK_OPS_TCP_LISTEN_CB, /* Called on listen(2), right after |
| 3370 | * socket transition to LISTEN state. | 3372 | * socket transition to LISTEN state. |
| 3371 | */ | 3373 | */ |
| 3374 | BPF_SOCK_OPS_RTT_CB, /* Called on every RTT. | ||
| 3375 | */ | ||
| 3372 | }; | 3376 | }; |
| 3373 | 3377 | ||
| 3374 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect | 3378 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect |