Searched refs:inner_map (Results 1 - 22 of 22) sorted by relevance

/linux-master/kernel/bpf/
H A Dmap_in_map.c12 struct bpf_map *inner_map, *inner_map_meta; local
18 inner_map = __bpf_map_get(f);
19 if (IS_ERR(inner_map))
20 return inner_map;
23 if (inner_map->inner_map_meta) {
28 if (!inner_map->ops->map_meta_equal) {
35 if (inner_map->ops == &array_map_ops)
44 inner_map_meta->map_type = inner_map->map_type;
45 inner_map_meta->key_size = inner_map->key_size;
46 inner_map_meta->value_size = inner_map
112 struct bpf_map *inner_map, *inner_map_meta; local
132 struct bpf_map *inner_map = ptr; local
[all...]
H A Darraymap.c1133 * Thus, prog_array_map cannot be used as an inner_map
1325 struct bpf_map **inner_map = array_map_lookup_elem(map, key); local
1327 if (!inner_map)
1330 return READ_ONCE(*inner_map);
H A Dhashtab.c1821 struct bpf_map **inner_map = value; local
1824 map_id = map->ops->map_fd_sys_lookup_elem(*inner_map);
2565 struct bpf_map **inner_map = htab_map_lookup_elem(map, key); local
2567 if (!inner_map)
2570 return READ_ONCE(*inner_map);
/linux-master/tools/testing/selftests/bpf/progs/
H A Daccess_map_in_map.c14 } inner_map SEC(".maps");
24 [0] = &inner_map,
36 [0] = &inner_map,
47 void *inner_map; local
54 inner_map = bpf_map_lookup_elem(outer_map, &key);
55 if (inner_map)
60 inner_map = bpf_map_lookup_elem(outer_map, &key);
61 if (!inner_map)
66 bpf_map_update_elem(inner_map, &key, &value, 0);
H A Dtest_btf_map_in_map.c6 struct inner_map { struct
30 * due to incompatibility with inner_map definition */
36 /* (void *) cast is necessary because we didn't use `struct inner_map`
85 /* Here everything works flawlessly due to reuse of struct inner_map
86 * and compiler will complain at the attempt to use non-inner_map
89 __array(values, struct inner_map);
126 struct inner_map *inner_map; local
129 inner_map = bpf_map_lookup_elem(&outer_arr, &key);
130 if (!inner_map)
[all...]
H A Dtimer_mim_reject.c15 struct inner_map { struct
31 __array(values, struct inner_map);
50 struct bpf_map *inner_map, *inner_map2; local
56 inner_map = bpf_map_lookup_elem(&outer_arr, &array_key);
57 if (!inner_map)
63 bpf_map_update_elem(inner_map, &hash_key, &init, 0);
64 val = bpf_map_lookup_elem(inner_map, &hash_key);
H A Djeq_infer_not_null_fail.c21 struct bpf_map *inner_map = map->inner_map_meta; local
31 * once it figures out val==inner_map.
34 "r9 = %[inner_map];\n"
38 : [inner_map] "r"(inner_map), [val] "r"(val)
H A Dtimer_mim.c15 struct inner_map { struct
30 __array(values, struct inner_map);
68 struct bpf_map *inner_map; local
73 inner_map = bpf_map_lookup_elem(&outer_arr, &array_key);
74 if (!inner_map)
77 bpf_map_update_elem(inner_map, &hash_key, &init, 0);
78 val = bpf_map_lookup_elem(inner_map, &hash_key);
82 bpf_timer_init(&val->timer, inner_map, CLOCK_MONOTONIC);
H A Dlsm.c56 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; local
142 inner_map = bpf_map_lookup_elem(&outer_arr, &key);
143 if (inner_map) {
[all...]
H A Dbloom_filter_map.c56 int inner_map(void *ctx) function
58 struct bpf_map *inner_map; local
62 inner_map = bpf_map_lookup_elem(&outer_map, &key);
63 if (!inner_map) {
68 data.map = inner_map;
H A Dinner_array_lookup.c6 struct inner_map { struct
17 __array(values, struct inner_map);
H A Dlocal_storage_bench.c53 void *map, *inner_map; local
61 inner_map = bpf_map_lookup_elem(map, &elem);
62 if (!inner_map)
67 bpf_map_lookup_elem(inner_map, &idx);
69 bpf_task_storage_get(inner_map, lctx->task, &idx,
H A Dlinked_list.h36 struct array_map inner_map SEC(".maps");
46 [0] = &inner_map,
H A Dmap_ptr_kern.c344 struct inner_map { struct
349 } inner_map SEC(".maps");
363 .values = { (void *)&inner_map, 0, 0, 0, 0, 0, 0, 0, 0 },
370 struct bpf_array *inner_map; local
374 inner_map = bpf_map_lookup_elem(array_of_maps, &key);
375 VERIFY(inner_map != NULL);
376 VERIFY(inner_map->map.max_entries == INNER_MAX_ENTRIES);
386 __array(values, struct inner_map);
389 [2] = &inner_map,
397 struct bpf_htab *inner_map; local
[all...]
H A Dsyscall.c48 } inner_map SEC(".maps");
58 [0] = &inner_map,
H A Dlinked_list_fail.c66 CHECK(inner_map, pop_front, &iv->head);
67 CHECK(inner_map, pop_back, &iv->head);
89 CHECK(inner_map, push_front, &iv->head, &f->node2);
90 CHECK(inner_map, push_back, &iv->head, &f->node2);
/linux-master/samples/bpf/
H A Dtest_map_in_map.bpf.c76 static __always_inline int do_reg_lookup(void *inner_map, u32 port) argument
80 result = bpf_map_lookup_elem(inner_map, &port);
84 static __always_inline int do_inline_array_lookup(void *inner_map, u32 port) argument
88 if (inner_map != &port_a)
95 static __always_inline int do_inline_hash_lookup(void *inner_map, u32 port) argument
99 if (inner_map != &port_h)
112 void *outer_map, *inner_map; local
150 inner_map = bpf_map_lookup_elem(outer_map, &port_key);
151 if (!inner_map) {
157 ret = do_reg_lookup(inner_map, port_ke
[all...]
/linux-master/tools/testing/selftests/bpf/benchs/
H A Dbench_local_storage.c117 struct bpf_map *inner_map; local
127 inner_map = bpf_map__inner_map(ctx.array_of_maps);
128 create_opts.btf_key_type_id = bpf_map__btf_key_type_id(inner_map);
129 create_opts.btf_value_type_id = bpf_map__btf_value_type_id(inner_map);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dlinked_list.c29 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)
178 clear_fields(skel->maps.inner_map);
200 clear_fields(skel->maps.inner_map);
222 clear_fields(skel->maps.inner_map);
H A Dsockmap_listen.c728 struct bpf_map *inner_map, int family,
734 int sock_map = bpf_map__fd(inner_map);
753 struct bpf_map *inner_map, int family,
758 int sock_map = bpf_map__fd(inner_map);
830 struct bpf_map *inner_map, int family,
836 int sock_map = bpf_map__fd(inner_map);
855 struct bpf_map *inner_map, int family,
860 int sock_map = bpf_map__fd(inner_map);
919 struct bpf_map *inner_map, int family,
925 int sock_map = bpf_map__fd(inner_map);
727 test_skb_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family, int sotype) argument
752 test_msg_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family, int sotype) argument
829 test_skb_redir_to_listening(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family, int sotype) argument
854 test_msg_redir_to_listening(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family, int sotype) argument
918 test_skb_redir_partial(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family, int sotype) argument
1406 unix_skb_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int sotype) argument
1556 vsock_unix_skb_redir_connectible(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int sotype) argument
1696 udp_skb_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family) argument
1754 inet_unix_skb_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family) argument
1808 unix_inet_skb_redir_to_connected(struct test_sockmap_listen *skel, struct bpf_map *inner_map, int family) argument
[all...]
H A Dbloom_filter_map.c129 link = bpf_program__attach(skel->progs.inner_map);
/linux-master/tools/lib/bpf/
H A Dlibbpf.c543 struct bpf_map *inner_map; member in struct:bpf_map
2836 map->inner_map = calloc(1, sizeof(*map->inner_map));
2837 if (!map->inner_map)
2839 map->inner_map->fd = create_placeholder_fd();
2840 if (map->inner_map->fd < 0)
2841 return map->inner_map->fd;
2842 map->inner_map->sec_idx = sec_idx;
2843 map->inner_map->name = malloc(strlen(map_name) + sizeof(".inner") + 1);
2844 if (!map->inner_map
[all...]

Completed in 4407 milliseconds