/linux-6.3-rc2/kernel/bpf/ |
A D | map_in_map.c | 18 inner_map = __bpf_map_get(f); in bpf_map_meta_alloc() 19 if (IS_ERR(inner_map)) in bpf_map_meta_alloc() 20 return inner_map; in bpf_map_meta_alloc() 23 if (inner_map->inner_map_meta) { in bpf_map_meta_alloc() 76 if (inner_map->btf) { in bpf_map_meta_alloc() 77 btf_get(inner_map->btf); in bpf_map_meta_alloc() 127 inner_map = __bpf_map_get(f); in bpf_map_fd_get_ptr() 128 if (IS_ERR(inner_map)) in bpf_map_fd_get_ptr() 129 return inner_map; in bpf_map_fd_get_ptr() 133 bpf_map_inc(inner_map); in bpf_map_fd_get_ptr() [all …]
|
A D | arraymap.c | 1329 struct bpf_map **inner_map = array_map_lookup_elem(map, key); in array_of_map_lookup_elem() local 1331 if (!inner_map) in array_of_map_lookup_elem() 1334 return READ_ONCE(*inner_map); in array_of_map_lookup_elem()
|
A D | hashtab.c | 1782 struct bpf_map **inner_map = value; in __htab_map_lookup_and_delete_batch() local 1785 map_id = map->ops->map_fd_sys_lookup_elem(*inner_map); in __htab_map_lookup_and_delete_batch() 2478 struct bpf_map **inner_map = htab_map_lookup_elem(map, key); in htab_of_map_lookup_elem() local 2480 if (!inner_map) in htab_of_map_lookup_elem() 2483 return READ_ONCE(*inner_map); in htab_of_map_lookup_elem()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | test_btf_map_in_map.c | 6 struct inner_map { struct 89 __array(values, struct inner_map); 126 struct inner_map *inner_map; in handle__sys_enter() local 129 inner_map = bpf_map_lookup_elem(&outer_arr, &key); in handle__sys_enter() 130 if (!inner_map) in handle__sys_enter() 133 bpf_map_update_elem(inner_map, &key, &val, 0); in handle__sys_enter() 135 inner_map = bpf_map_lookup_elem(&outer_hash, &key); in handle__sys_enter() 136 if (!inner_map) in handle__sys_enter() 139 bpf_map_update_elem(inner_map, &key, &val, 0); in handle__sys_enter() 142 if (!inner_map) in handle__sys_enter() [all …]
|
A D | lsm.c | 56 struct inner_map { struct 61 } inner_map SEC(".maps"); 68 __array(values, struct inner_map); 70 .values = { [0] = &inner_map }, 77 __array(values, struct inner_map); 79 .values = { [0] = &inner_map }, 113 struct inner_map *inner_map; in BPF_PROG() local 143 if (inner_map) { in BPF_PROG() 144 value = bpf_map_lookup_elem(inner_map, &key); in BPF_PROG() 149 if (inner_map) { in BPF_PROG() [all …]
|
A D | timer_mim.c | 15 struct inner_map { struct 30 __array(values, struct inner_map); 68 struct bpf_map *inner_map; in BPF_PROG() local 73 inner_map = bpf_map_lookup_elem(&outer_arr, &array_key); in BPF_PROG() 74 if (!inner_map) in BPF_PROG() 77 bpf_map_update_elem(inner_map, &hash_key, &init, 0); in BPF_PROG() 78 val = bpf_map_lookup_elem(inner_map, &hash_key); in BPF_PROG() 82 bpf_timer_init(&val->timer, inner_map, CLOCK_MONOTONIC); in BPF_PROG()
|
A D | timer_mim_reject.c | 15 struct inner_map { struct 31 __array(values, struct inner_map); 50 struct bpf_map *inner_map, *inner_map2; in BPF_PROG() local 56 inner_map = bpf_map_lookup_elem(&outer_arr, &array_key); in BPF_PROG() 57 if (!inner_map) in BPF_PROG() 63 bpf_map_update_elem(inner_map, &hash_key, &init, 0); in BPF_PROG() 64 val = bpf_map_lookup_elem(inner_map, &hash_key); in BPF_PROG()
|
A D | bloom_filter_map.c | 56 int inner_map(void *ctx) in inner_map() function 58 struct bpf_map *inner_map; in inner_map() local 62 inner_map = bpf_map_lookup_elem(&outer_map, &key); in inner_map() 63 if (!inner_map) { in inner_map() 68 data.map = inner_map; in inner_map()
|
A D | local_storage_bench.c | 53 void *map, *inner_map; in do_lookup() local 61 inner_map = bpf_map_lookup_elem(map, &elem); in do_lookup() 62 if (!inner_map) in do_lookup() 67 bpf_map_lookup_elem(inner_map, &idx); in do_lookup() 69 bpf_task_storage_get(inner_map, lctx->task, &idx, in do_lookup()
|
A D | jeq_infer_not_null_fail.c | 21 struct bpf_map *inner_map = map->inner_map_meta; in jeq_infer_not_null_ptr_to_btfid() local 38 : [inner_map] "r"(inner_map), [val] "r"(val) in jeq_infer_not_null_ptr_to_btfid()
|
A D | map_ptr_kern.c | 339 struct inner_map { struct 344 } inner_map SEC(".maps"); 365 struct bpf_array *inner_map; in check_array_of_maps() local 369 inner_map = bpf_map_lookup_elem(array_of_maps, &key); in check_array_of_maps() 370 VERIFY(inner_map != NULL); in check_array_of_maps() 371 VERIFY(inner_map->map.max_entries == INNER_MAX_ENTRIES); in check_array_of_maps() 381 __array(values, struct inner_map); 384 [2] = &inner_map, 392 struct bpf_htab *inner_map; in check_hash_of_maps() local 396 inner_map = bpf_map_lookup_elem(hash_of_maps, &key); in check_hash_of_maps() [all …]
|
A D | linked_list.h | 36 struct array_map inner_map SEC(".maps"); 46 [0] = &inner_map,
|
A D | linked_list_fail.c | 66 CHECK(inner_map, pop_front, &iv->head); 67 CHECK(inner_map, pop_back, &iv->head); 90 CHECK(inner_map, push_front, &iv->head, f); 91 CHECK(inner_map, push_back, &iv->head, f);
|
/linux-6.3-rc2/samples/bpf/ |
A D | test_map_in_map.bpf.c | 76 static __always_inline int do_reg_lookup(void *inner_map, u32 port) in do_reg_lookup() argument 80 result = bpf_map_lookup_elem(inner_map, &port); in do_reg_lookup() 88 if (inner_map != &port_a) in do_inline_array_lookup() 95 static __always_inline int do_inline_hash_lookup(void *inner_map, u32 port) in do_inline_hash_lookup() argument 99 if (inner_map != &port_h) in do_inline_hash_lookup() 113 void *outer_map, *inner_map; in trace_sys_connect() local 154 inner_map = bpf_map_lookup_elem(outer_map, &port_key); in trace_sys_connect() 155 if (!inner_map) { in trace_sys_connect() 161 ret = do_reg_lookup(inner_map, port_key); in trace_sys_connect() 164 inline_ret = do_inline_array_lookup(inner_map, port_key); in trace_sys_connect() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/bpf/benchs/ |
A D | bench_local_storage.c | 117 struct bpf_map *inner_map; in __setup() local 127 inner_map = bpf_map__inner_map(ctx.array_of_maps); in __setup() 128 create_opts.btf_key_type_id = bpf_map__btf_key_type_id(inner_map); in __setup() 129 create_opts.btf_value_type_id = bpf_map__btf_value_type_id(inner_map); in __setup()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/prog_tests/ |
A D | linked_list.c | 29 TEST(inner_map, 0) 56 TEST(inner_map, push_front) 57 TEST(inner_map, push_back) 58 TEST(inner_map, pop_front) 59 TEST(inner_map, pop_back) 184 clear_fields(skel->maps.inner_map); in test_linked_list_success() 206 clear_fields(skel->maps.inner_map); in test_linked_list_success() 228 clear_fields(skel->maps.inner_map); in test_linked_list_success()
|
A D | sockmap_listen.c | 1067 struct bpf_map *inner_map, int family, in test_skb_redir_to_connected() argument 1073 int sock_map = bpf_map__fd(inner_map); in test_skb_redir_to_connected() 1092 struct bpf_map *inner_map, int family, in test_msg_redir_to_connected() argument 1097 int sock_map = bpf_map__fd(inner_map); in test_msg_redir_to_connected() 1169 struct bpf_map *inner_map, int family, in test_skb_redir_to_listening() argument 1175 int sock_map = bpf_map__fd(inner_map); in test_skb_redir_to_listening() 1199 int sock_map = bpf_map__fd(inner_map); in test_msg_redir_to_listening() 1663 int sock_map = bpf_map__fd(inner_map); in unix_skb_redir_to_connected() 1831 int sock_map = bpf_map__fd(inner_map); in udp_skb_redir_to_connected() 1919 int sock_map = bpf_map__fd(inner_map); in inet_unix_skb_redir_to_connected() [all …]
|
A D | bloom_filter_map.c | 123 link = bpf_program__attach(skel->progs.inner_map); in test_inner_map()
|
/linux-6.3-rc2/Documentation/bpf/ |
A D | map_of_maps.rst | 70 struct inner_map { 81 __array(values, struct inner_map);
|
/linux-6.3-rc2/tools/bpf/bpftool/Documentation/ |
A D | bpftool-map.rst | 30 | **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] \ 76 …SIZE* **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] [**dev*… 85 **inner_map** keyword must be used to pass an inner map. The
|
/linux-6.3-rc2/tools/lib/bpf/ |
A D | libbpf.c | 509 struct bpf_map *inner_map; member 2536 map->inner_map = calloc(1, sizeof(*map->inner_map)); in bpf_object__init_user_btf_map() 2537 if (!map->inner_map) in bpf_object__init_user_btf_map() 2539 map->inner_map->fd = -1; in bpf_object__init_user_btf_map() 4413 return map->inner_map; in bpf_map__inner_map() 5014 if (map->inner_map) { in bpf_object__create_map() 5087 zfree(&map->inner_map); in bpf_object__create_map() 8147 if (map->inner_map) { in bpf_map__destroy() 8149 zfree(&map->inner_map); in bpf_map__destroy() 9334 if (map->inner_map) { in bpf_map__set_inner_map_fd() [all …]
|
/linux-6.3-rc2/tools/bpf/bpftool/bash-completion/ |
A D | bpftool | 715 inner_map) 724 inner_map) 740 _bpftool_once_attr 'inner_map'
|