|
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 |
@@ -1502,7 +1506,7 @@ union bpf_attr { |
1502 | 1506 | __s32 map_token_fd; |
1503 | 1507 | }; |
1504 | 1508 |
|
1505 | | - struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| 1509 | + struct { /* anonymous struct used by BPF_MAP_*_ELEM and BPF_MAP_FREEZE commands */ |
1506 | 1510 | __u32 map_fd; |
1507 | 1511 | __aligned_u64 key; |
1508 | 1512 | union { |
@@ -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 */ |
@@ -1990,11 +1995,15 @@ union bpf_attr { |
1990 | 1995 | * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags) |
1991 | 1996 | * Description |
1992 | 1997 | * Store *len* bytes from address *from* into the packet |
1993 | | - * associated to *skb*, at *offset*. *flags* are a combination of |
1994 | | - * **BPF_F_RECOMPUTE_CSUM** (automatically recompute the |
1995 | | - * checksum for the packet after storing the bytes) and |
1996 | | - * **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\ |
1997 | | - * **->swhash** and *skb*\ **->l4hash** to 0). |
| 1998 | + * associated to *skb*, at *offset*. The *flags* are a combination |
| 1999 | + * of the following values: |
| 2000 | + * |
| 2001 | + * **BPF_F_RECOMPUTE_CSUM** |
| 2002 | + * Automatically update *skb*\ **->csum** after storing the |
| 2003 | + * bytes. |
| 2004 | + * **BPF_F_INVALIDATE_HASH** |
| 2005 | + * Set *skb*\ **->hash**, *skb*\ **->swhash** and *skb*\ |
| 2006 | + * **->l4hash** to 0. |
1998 | 2007 | * |
1999 | 2008 | * A call to this helper is susceptible to change the underlying |
2000 | 2009 | * packet buffer. Therefore, at load time, all checks on pointers |
@@ -2046,7 +2055,7 @@ union bpf_attr { |
2046 | 2055 | * untouched (unless **BPF_F_MARK_ENFORCE** is added as well), and |
2047 | 2056 | * for updates resulting in a null checksum the value is set to |
2048 | 2057 | * **CSUM_MANGLED_0** instead. Flag **BPF_F_PSEUDO_HDR** indicates |
2049 | | - * the checksum is to be computed against a pseudo-header. |
| 2058 | + * that the modified header field is part of the pseudo-header. |
2050 | 2059 | * |
2051 | 2060 | * This helper works in combination with **bpf_csum_diff**\ (), |
2052 | 2061 | * which does not update the checksum in-place, but offers more |
@@ -6715,6 +6724,7 @@ struct bpf_link_info { |
6715 | 6724 | __u32 name_len; |
6716 | 6725 | __u32 offset; /* offset from file_name */ |
6717 | 6726 | __u64 cookie; |
| 6727 | + __u64 ref_ctr_offset; |
6718 | 6728 | } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ |
6719 | 6729 | struct { |
6720 | 6730 | __aligned_u64 func_name; /* in/out */ |
@@ -6916,6 +6926,12 @@ enum { |
6916 | 6926 | BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F, |
6917 | 6927 | }; |
6918 | 6928 |
|
| 6929 | +enum { |
| 6930 | + SK_BPF_CB_TX_TIMESTAMPING = 1<<0, |
| 6931 | + SK_BPF_CB_MASK = (SK_BPF_CB_TX_TIMESTAMPING - 1) | |
| 6932 | + SK_BPF_CB_TX_TIMESTAMPING |
| 6933 | +}; |
| 6934 | + |
6919 | 6935 | /* List of known BPF sock_ops operators. |
6920 | 6936 | * New entries can only be added at the end |
6921 | 6937 | */ |
@@ -7028,6 +7044,29 @@ enum { |
7028 | 7044 | * by the kernel or the |
7029 | 7045 | * earlier bpf-progs. |
7030 | 7046 | */ |
| 7047 | + BPF_SOCK_OPS_TSTAMP_SCHED_CB, /* Called when skb is passing |
| 7048 | + * through dev layer when |
| 7049 | + * SK_BPF_CB_TX_TIMESTAMPING |
| 7050 | + * feature is on. |
| 7051 | + */ |
| 7052 | + BPF_SOCK_OPS_TSTAMP_SND_SW_CB, /* Called when skb is about to send |
| 7053 | + * to the nic when SK_BPF_CB_TX_TIMESTAMPING |
| 7054 | + * feature is on. |
| 7055 | + */ |
| 7056 | + BPF_SOCK_OPS_TSTAMP_SND_HW_CB, /* Called in hardware phase when |
| 7057 | + * SK_BPF_CB_TX_TIMESTAMPING feature |
| 7058 | + * is on. |
| 7059 | + */ |
| 7060 | + BPF_SOCK_OPS_TSTAMP_ACK_CB, /* Called when all the skbs in the |
| 7061 | + * same sendmsg call are acked |
| 7062 | + * when SK_BPF_CB_TX_TIMESTAMPING |
| 7063 | + * feature is on. |
| 7064 | + */ |
| 7065 | + BPF_SOCK_OPS_TSTAMP_SENDMSG_CB, /* Called when every sendmsg syscall |
| 7066 | + * is triggered. It's used to correlate |
| 7067 | + * sendmsg timestamp with corresponding |
| 7068 | + * tskey. |
| 7069 | + */ |
7031 | 7070 | }; |
7032 | 7071 |
|
7033 | 7072 | /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect |
@@ -7094,6 +7133,7 @@ enum { |
7094 | 7133 | TCP_BPF_SYN_IP = 1006, /* Copy the IP[46] and TCP header */ |
7095 | 7134 | TCP_BPF_SYN_MAC = 1007, /* Copy the MAC, IP[46], and TCP header */ |
7096 | 7135 | TCP_BPF_SOCK_OPS_CB_FLAGS = 1008, /* Get or Set TCP sock ops flags */ |
| 7136 | + SK_BPF_CB_FLAGS = 1009, /* Get or set sock ops flags in socket */ |
7097 | 7137 | }; |
7098 | 7138 |
|
7099 | 7139 | enum { |
|
0 commit comments