The new SK_BPF_CB_FLAGS and new SK_BPF_CB_TX_TIMESTAMPING are added to bpf_get/setsockopt. The later patches will implement the BPF networking timestamping. The BPF program will use bpf_setsockopt(SK_BPF_CB_FLAGS, SK_BPF_CB_TX_TIMESTAMPING) to enable the BPF networking timestamping on a socket.
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -6913,6 +6913,12 @@ enum { · 6912 unmodified lines | ||
| 6913 | 6913 | BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F, |
| 6914 | 6914 | }; |
| 6915 | 6915 | |
| 6916 | +enum { | |
| 6917 | + SK_BPF_CB_TX_TIMESTAMPING = 1<<0, | |
| 6918 | + SK_BPF_CB_MASK = (SK_BPF_CB_TX_TIMESTAMPING - 1) | | |
| 6919 | + SK_BPF_CB_TX_TIMESTAMPING | |
| 6920 | +}; | |
| 6921 | + | |
| 6916 | 6922 | /* List of known BPF sock_ops operators. |
| 6917 | 6923 | * New entries can only be added at the end |
| 6918 | 6924 | */ |
| @@ -7091,6 +7097,7 @@ enum { · 172 unmodified lines | ||
| 7091 | 7097 | TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */ |
| 7092 | 7098 | TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ |
| 7093 | 7099 | TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ |
| 7100 | + SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */ | |
| 7094 | 7101 | }; |
| 7095 | 7102 | |
| 7096 | 7103 | enum { |