diff options
| author | Lorenz Bauer <lmb@cloudflare.com> | 2018-11-16 06:41:10 -0500 |
|---|---|---|
| committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-11-19 18:53:40 -0500 |
| commit | 608114e441ad3a4fa1fced4d6d00653a34765eee (patch) | |
| tree | 5eb89e59dbd87d38c8db6b1271bb44589997b58d /tools/include | |
| parent | 2f1833607aed6a9c1e1729bf0e2588c341ceb409 (diff) | |
tools: sync linux/bpf.h
Synchronize changes to linux/bpf.h from
* "bpf: allow zero-initializing hash map seed"
* "bpf: move BPF_F_QUERY_EFFECTIVE after map flags"
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/uapi/linux/bpf.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 852dc17ab47a..05d95290b848 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h | |||
| @@ -257,9 +257,6 @@ enum bpf_attach_type { | |||
| 257 | /* Specify numa node during map creation */ | 257 | /* Specify numa node during map creation */ |
| 258 | #define BPF_F_NUMA_NODE (1U << 2) | 258 | #define BPF_F_NUMA_NODE (1U << 2) |
| 259 | 259 | ||
| 260 | /* flags for BPF_PROG_QUERY */ | ||
| 261 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) | ||
| 262 | |||
| 263 | #define BPF_OBJ_NAME_LEN 16U | 260 | #define BPF_OBJ_NAME_LEN 16U |
| 264 | 261 | ||
| 265 | /* Flags for accessing BPF object */ | 262 | /* Flags for accessing BPF object */ |
| @@ -269,6 +266,12 @@ enum bpf_attach_type { | |||
| 269 | /* Flag for stack_map, store build_id+offset instead of pointer */ | 266 | /* Flag for stack_map, store build_id+offset instead of pointer */ |
| 270 | #define BPF_F_STACK_BUILD_ID (1U << 5) | 267 | #define BPF_F_STACK_BUILD_ID (1U << 5) |
| 271 | 268 | ||
| 269 | /* Zero-initialize hash function seed. This should only be used for testing. */ | ||
| 270 | #define BPF_F_ZERO_SEED (1U << 6) | ||
| 271 | |||
| 272 | /* flags for BPF_PROG_QUERY */ | ||
| 273 | #define BPF_F_QUERY_EFFECTIVE (1U << 0) | ||
| 274 | |||
| 272 | enum bpf_stack_build_id_status { | 275 | enum bpf_stack_build_id_status { |
| 273 | /* user space need an empty entry to identify end of a trace */ | 276 | /* user space need an empty entry to identify end of a trace */ |
| 274 | BPF_STACK_BUILD_ID_EMPTY = 0, | 277 | BPF_STACK_BUILD_ID_EMPTY = 0, |
| @@ -2201,6 +2204,8 @@ union bpf_attr { | |||
| 2201 | * **CONFIG_NET** configuration option. | 2204 | * **CONFIG_NET** configuration option. |
| 2202 | * Return | 2205 | * Return |
| 2203 | * Pointer to *struct bpf_sock*, or NULL in case of failure. | 2206 | * Pointer to *struct bpf_sock*, or NULL in case of failure. |
| 2207 | * For sockets with reuseport option, *struct bpf_sock* | ||
| 2208 | * return is from reuse->socks[] using hash of the packet. | ||
| 2204 | * | 2209 | * |
| 2205 | * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags) | 2210 | * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags) |
| 2206 | * Description | 2211 | * Description |
| @@ -2233,6 +2238,8 @@ union bpf_attr { | |||
| 2233 | * **CONFIG_NET** configuration option. | 2238 | * **CONFIG_NET** configuration option. |
| 2234 | * Return | 2239 | * Return |
| 2235 | * Pointer to *struct bpf_sock*, or NULL in case of failure. | 2240 | * Pointer to *struct bpf_sock*, or NULL in case of failure. |
| 2241 | * For sockets with reuseport option, *struct bpf_sock* | ||
| 2242 | * return is from reuse->socks[] using hash of the packet. | ||
| 2236 | * | 2243 | * |
| 2237 | * int bpf_sk_release(struct bpf_sock *sk) | 2244 | * int bpf_sk_release(struct bpf_sock *sk) |
| 2238 | * Description | 2245 | * Description |
