@@ -136,6 +136,7 @@ enum bpf_map_type {
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 {
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
179181enum bpf_attach_type {
@@ -397,6 +399,10 @@ union bpf_attr {
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 {
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 {
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 {
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 ;
0 commit comments