|
51 | 51 | #define BPF_XCHG (0xe0 | BPF_FETCH) /* atomic exchange */ |
52 | 52 | #define BPF_CMPXCHG (0xf0 | BPF_FETCH) /* atomic compare-and-write */ |
53 | 53 |
|
| 54 | +#define BPF_LOAD_ACQ 0x100 /* load-acquire */ |
| 55 | +#define BPF_STORE_REL 0x110 /* store-release */ |
| 56 | + |
54 | 57 | enum bpf_cond_pseudo_jmp { |
55 | 58 | BPF_MAY_GOTO = 0, |
56 | 59 | }; |
@@ -1207,6 +1210,7 @@ enum bpf_perf_event_type { |
1207 | 1210 | #define BPF_F_BEFORE (1U << 3) |
1208 | 1211 | #define BPF_F_AFTER (1U << 4) |
1209 | 1212 | #define BPF_F_ID (1U << 5) |
| 1213 | +#define BPF_F_PREORDER (1U << 6) |
1210 | 1214 | #define BPF_F_LINK BPF_F_LINK /* 1 << 13 */ |
1211 | 1215 |
|
1212 | 1216 | /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the |
@@ -1648,6 +1652,7 @@ union bpf_attr { |
1648 | 1652 | }; |
1649 | 1653 | __u32 next_id; |
1650 | 1654 | __u32 open_flags; |
| 1655 | + __s32 fd_by_id_token_fd; |
1651 | 1656 | }; |
1652 | 1657 |
|
1653 | 1658 | struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ |
@@ -6019,7 +6024,10 @@ union bpf_attr { |
6019 | 6024 | FN(user_ringbuf_drain, 209, ##ctx) \ |
6020 | 6025 | FN(cgrp_storage_get, 210, ##ctx) \ |
6021 | 6026 | FN(cgrp_storage_delete, 211, ##ctx) \ |
6022 | | - /* */ |
| 6027 | + /* This helper list is effectively frozen. If you are trying to \ |
| 6028 | + * add a new helper, you should add a kfunc instead which has \ |
| 6029 | + * less stability guarantees. See Documentation/bpf/kfuncs.rst \ |
| 6030 | + */ |
6023 | 6031 |
|
6024 | 6032 | /* backwards-compatibility macros for users of __BPF_FUNC_MAPPER that don't |
6025 | 6033 | * know or care about integer value that is now passed as second argument |
@@ -6913,6 +6921,12 @@ enum { |
6913 | 6921 | BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F, |
6914 | 6922 | }; |
6915 | 6923 |
|
| 6924 | +enum { |
| 6925 | + SK_BPF_CB_TX_TIMESTAMPING = 1<<0, |
| 6926 | + SK_BPF_CB_MASK = (SK_BPF_CB_TX_TIMESTAMPING - 1) | |
| 6927 | + SK_BPF_CB_TX_TIMESTAMPING |
| 6928 | +}; |
| 6929 | + |
6916 | 6930 | /* List of known BPF sock_ops operators. |
6917 | 6931 | * New entries can only be added at the end |
6918 | 6932 | */ |
@@ -7025,6 +7039,29 @@ enum { |
7025 | 7039 | * by the kernel or the |
7026 | 7040 | * earlier bpf-progs. |
7027 | 7041 | */ |
| 7042 | + BPF_SOCK_OPS_TSTAMP_SCHED_CB, /* Called when skb is passing |
| 7043 | + * through dev layer when |
| 7044 | + * SK_BPF_CB_TX_TIMESTAMPING |
| 7045 | + * feature is on. |
| 7046 | + */ |
| 7047 | + BPF_SOCK_OPS_TSTAMP_SND_SW_CB, /* Called when skb is about to send |
| 7048 | + * to the nic when SK_BPF_CB_TX_TIMESTAMPING |
| 7049 | + * feature is on. |
| 7050 | + */ |
| 7051 | + BPF_SOCK_OPS_TSTAMP_SND_HW_CB, /* Called in hardware phase when |
| 7052 | + * SK_BPF_CB_TX_TIMESTAMPING feature |
| 7053 | + * is on. |
| 7054 | + */ |
| 7055 | + BPF_SOCK_OPS_TSTAMP_ACK_CB, /* Called when all the skbs in the |
| 7056 | + * same sendmsg call are acked |
| 7057 | + * when SK_BPF_CB_TX_TIMESTAMPING |
| 7058 | + * feature is on. |
| 7059 | + */ |
| 7060 | + BPF_SOCK_OPS_TSTAMP_SENDMSG_CB, /* Called when every sendmsg syscall |
| 7061 | + * is triggered. It's used to correlate |
| 7062 | + * sendmsg timestamp with corresponding |
| 7063 | + * tskey. |
| 7064 | + */ |
7028 | 7065 | }; |
7029 | 7066 |
|
7030 | 7067 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect |
@@ -7091,6 +7128,7 @@ enum { |
7091 | 7128 | TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */ |
7092 | 7129 | TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ |
7093 | 7130 | TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ |
| 7131 | + SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */ |
7094 | 7132 | }; |
7095 | 7133 |
|
7096 | 7134 | enum { |
|
0 commit comments