History

bpf: Synch uapi bpf.h to tools/

This patch sync uapi bpf.h to tools/

Martin KaFai Lau committed 6 years ago

Commit 17328d61 parent 206057f1 file · +17 −2Browse files

Showing the changes to tools/include/uapi/linux (1 of 1 file). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+17−2
@@ -136,6 +136,7 @@ enum bpf_map_type { · 135 unmodified lines
136136 BPF_MAP_TYPE_STACK,
137137 BPF_MAP_TYPE_SK_STORAGE,
138138 BPF_MAP_TYPE_DEVMAP_HASH,
139+ BPF_MAP_TYPE_STRUCT_OPS,
139140 };
140141
141142 /* Note that tracing related programs such as
@@ -174,6 +175,7 @@ enum bpf_prog_type { · 32 unmodified lines
174175 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
175176 BPF_PROG_TYPE_CGROUP_SOCKOPT,
176177 BPF_PROG_TYPE_TRACING,
178+ BPF_PROG_TYPE_STRUCT_OPS,
177179 };
178180
179181 enum bpf_attach_type {
@@ -397,6 +399,10 @@ union bpf_attr { · 217 unmodified lines
397399 __u32 btf_fd; /* fd pointing to a BTF type data */
398400 __u32 btf_key_type_id; /* BTF type_id of the key */
399401 __u32 btf_value_type_id; /* BTF type_id of the value */
402+ __u32 btf_vmlinux_value_type_id;/* BTF type_id of a kernel-
403+ * struct stored as the
404+ * map value
405+ */
400406 };
401407
402408 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -2831,6 +2837,14 @@ union bpf_attr { · 2428 unmodified lines
28312837 * Return
28322838 * On success, the strictly positive length of the string, including
28332839 * the trailing NUL character. On error, a negative value.
2840+ *
2841+ * int bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
2842+ * Description
2843+ * Send out a tcp-ack. *tp* is the in-kernel struct tcp_sock.
2844+ * *rcv_nxt* is the ack_seq to be sent out.
2845+ * Return
2846+ * 0 on success, or a negative error in case of failure.
2847+ *
28342848 */
28352849 #define __BPF_FUNC_MAPPER(FN) \
28362850 FN(unspec), \
@@ -2948,7 +2962,8 @@ union bpf_attr { · 111 unmodified lines
29482962 FN(probe_read_user), \
29492963 FN(probe_read_kernel), \
29502964 FN(probe_read_user_str), \
2951− FN(probe_read_kernel_str),
2965+ FN(probe_read_kernel_str), \
2966+ FN(tcp_send_ack),
29522967
29532968 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
29542969 * function eBPF program intends to call
@@ -3349,7 +3364,7 @@ struct bpf_map_info { · 394 unmodified lines
33493364 __u32 map_flags;
33503365 char name[BPF_OBJ_NAME_LEN];
33513366 __u32 ifindex;
3352− __u32 :32;
3367+ __u32 btf_vmlinux_value_type_id;
33533368 __u64 netns_dev;
33543369 __u64 netns_ino;
33553370 __u32 btf_id;