Sync both files.
Unified · Split
| @@ -103,6 +103,7 @@ enum bpf_cmd { · 102 unmodified lines | |||
| 103 | BPF_BTF_LOAD, | 103 | BPF_BTF_LOAD, |
| 104 | BPF_BTF_GET_FD_BY_ID, | 104 | BPF_BTF_GET_FD_BY_ID, |
| 105 | BPF_TASK_FD_QUERY, | 105 | BPF_TASK_FD_QUERY, |
| 106 | BPF_MAP_LOOKUP_AND_DELETE_ELEM, | ||
| 106 | }; | 107 | }; |
| 107 | 108 | ||
| 108 | enum bpf_map_type { | 109 | enum bpf_map_type { |
| @@ -128,6 +129,8 @@ enum bpf_map_type { · 19 unmodified lines | |||
| 128 | BPF_MAP_TYPE_CGROUP_STORAGE, | 129 | BPF_MAP_TYPE_CGROUP_STORAGE, |
| 129 | BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, | 130 | BPF_MAP_TYPE_REUSEPORT_SOCKARRAY, |
| 130 | BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, | 131 | BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, |
| 132 | BPF_MAP_TYPE_QUEUE, | ||
| 133 | BPF_MAP_TYPE_STACK, | ||
| 131 | }; | 134 | }; |
| 132 | 135 | ||
| 133 | enum bpf_prog_type { | 136 | enum bpf_prog_type { |
| @@ -462,6 +465,28 @@ union bpf_attr { · 328 unmodified lines | |||
| 462 | * Return | 465 | * Return |
| 463 | * 0 on success, or a negative error in case of failure. | 466 | * 0 on success, or a negative error in case of failure. |
| 464 | * | 467 | * |
| 468 | * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags) | ||
| 469 | * Description | ||
| 470 | * Push an element *value* in *map*. *flags* is one of: | ||
| 471 | * | ||
| 472 | * **BPF_EXIST** | ||
| 473 | * If the queue/stack is full, the oldest element is removed to | ||
| 474 | * make room for this. | ||
| 475 | * Return | ||
| 476 | * 0 on success, or a negative error in case of failure. | ||
| 477 | * | ||
| 478 | * int bpf_map_pop_elem(struct bpf_map *map, void *value) | ||
| 479 | * Description | ||
| 480 | * Pop an element from *map*. | ||
| 481 | * Return | ||
| 482 | * 0 on success, or a negative error in case of failure. | ||
| 483 | * | ||
| 484 | * int bpf_map_peek_elem(struct bpf_map *map, void *value) | ||
| 485 | * Description | ||
| 486 | * Get an element from *map* without removing it. | ||
| 487 | * Return | ||
| 488 | * 0 on success, or a negative error in case of failure. | ||
| 489 | * | ||
| 465 | * int bpf_probe_read(void *dst, u32 size, const void *src) | 490 | * int bpf_probe_read(void *dst, u32 size, const void *src) |
| 466 | * Description | 491 | * Description |
| 467 | * For tracing programs, safely attempt to read *size* bytes from | 492 | * For tracing programs, safely attempt to read *size* bytes from |
| @@ -2303,7 +2328,10 @@ union bpf_attr { · 1835 unmodified lines | |||
| 2303 | FN(skb_ancestor_cgroup_id), \ | 2328 | FN(skb_ancestor_cgroup_id), \ |
| 2304 | FN(sk_lookup_tcp), \ | 2329 | FN(sk_lookup_tcp), \ |
| 2305 | FN(sk_lookup_udp), \ | 2330 | FN(sk_lookup_udp), \ |
| 2306 | FN(sk_release), | 2331 | FN(sk_release), \ |
| 2332 | FN(map_push_elem), \ | ||
| 2333 | FN(map_pop_elem), \ | ||
| 2334 | FN(map_peek_elem), | ||
| 2307 | 2335 | ||
| 2308 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 2336 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 2309 | * function eBPF program intends to call | 2337 | * function eBPF program intends to call |