| /Linux-v5.15/kernel/bpf/ |
| D | map_in_map.c | 12 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_meta_alloc() local 17 inner_map = __bpf_map_get(f); in bpf_map_meta_alloc() 18 if (IS_ERR(inner_map)) in bpf_map_meta_alloc() 19 return inner_map; in bpf_map_meta_alloc() 22 if (inner_map->inner_map_meta) { in bpf_map_meta_alloc() 27 if (!inner_map->ops->map_meta_equal) { in bpf_map_meta_alloc() 32 if (map_value_has_spin_lock(inner_map)) { in bpf_map_meta_alloc() 39 if (inner_map->ops == &array_map_ops) in bpf_map_meta_alloc() 48 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc() 49 inner_map_meta->key_size = inner_map->key_size; in bpf_map_meta_alloc() [all …]
|
| D | arraymap.c | 1299 struct bpf_map **inner_map = array_map_lookup_elem(map, key); in array_of_map_lookup_elem() local 1301 if (!inner_map) in array_of_map_lookup_elem() 1304 return READ_ONCE(*inner_map); in array_of_map_lookup_elem()
|
| D | hashtab.c | 2384 struct bpf_map **inner_map = htab_map_lookup_elem(map, key); in htab_of_map_lookup_elem() local 2386 if (!inner_map) in htab_of_map_lookup_elem() 2389 return READ_ONCE(*inner_map); in htab_of_map_lookup_elem()
|
| /Linux-v5.15/tools/testing/selftests/bpf/progs/ |
| 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() 141 inner_map = bpf_map_lookup_elem(&outer_arr_dyn, &key); in handle__sys_enter() [all …]
|
| D | lsm.c | 54 struct inner_map { struct 59 } inner_map SEC(".maps"); 66 __array(values, struct inner_map); 68 .values = { [0] = &inner_map }, 75 __array(values, struct inner_map); 77 .values = { [0] = &inner_map }, 111 struct inner_map *inner_map; in BPF_PROG() local 140 inner_map = bpf_map_lookup_elem(&outer_arr, &key); in BPF_PROG() 141 if (inner_map) { in BPF_PROG() 142 value = bpf_map_lookup_elem(inner_map, &key); in BPF_PROG() [all …]
|
| 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()
|
| 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()
|
| D | map_ptr_kern.c | 337 struct inner_map { struct 342 } inner_map SEC(".maps"); 356 .values = { (void *)&inner_map, 0, 0, 0, 0, 0, 0, 0, 0 }, 374 __array(values, struct inner_map); 377 [2] = &inner_map,
|
| /Linux-v5.15/samples/bpf/ |
| D | test_map_in_map_kern.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() 84 static __always_inline int do_inline_array_lookup(void *inner_map, u32 port) in do_inline_array_lookup() argument 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() [all …]
|
| /Linux-v5.15/tools/testing/selftests/bpf/prog_tests/ |
| D | sockmap_listen.c | 1023 struct bpf_map *inner_map, int family, in test_skb_redir_to_connected() argument 1029 int sock_map = bpf_map__fd(inner_map); in test_skb_redir_to_connected() 1048 struct bpf_map *inner_map, int family, in test_msg_redir_to_connected() argument 1053 int sock_map = bpf_map__fd(inner_map); in test_msg_redir_to_connected() 1125 struct bpf_map *inner_map, int family, in test_skb_redir_to_listening() argument 1131 int sock_map = bpf_map__fd(inner_map); in test_skb_redir_to_listening() 1150 struct bpf_map *inner_map, int family, in test_msg_redir_to_listening() argument 1155 int sock_map = bpf_map__fd(inner_map); in test_msg_redir_to_listening() 1616 struct bpf_map *inner_map, int sotype) in unix_skb_redir_to_connected() argument 1620 int sock_map = bpf_map__fd(inner_map); in unix_skb_redir_to_connected() [all …]
|
| /Linux-v5.15/tools/bpf/bpftool/Documentation/ |
| D | bpftool-map.rst | 27 | **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] \ 73 …SIZE* **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] [**dev*… 82 **inner_map** keyword must be used to pass an inner map. The
|
| /Linux-v5.15/tools/lib/bpf/ |
| D | libbpf.c | 374 struct bpf_map *inner_map; member 2386 map->inner_map = calloc(1, sizeof(*map->inner_map)); in bpf_object__init_user_btf_map() 2387 if (!map->inner_map) in bpf_object__init_user_btf_map() 2389 map->inner_map->fd = -1; in bpf_object__init_user_btf_map() 2390 map->inner_map->sec_idx = sec_idx; in bpf_object__init_user_btf_map() 2391 map->inner_map->name = malloc(strlen(map_name) + sizeof(".inner") + 1); in bpf_object__init_user_btf_map() 2392 if (!map->inner_map->name) in bpf_object__init_user_btf_map() 2394 sprintf(map->inner_map->name, "%s.inner", map_name); in bpf_object__init_user_btf_map() 2396 fill_map_from_def(map->inner_map, &inner_def); in bpf_object__init_user_btf_map() 4002 return map->inner_map; in bpf_map__inner_map() [all …]
|
| /Linux-v5.15/tools/bpf/bpftool/bash-completion/ |
| D | bpftool | 720 inner_map) 729 inner_map) 745 _bpftool_once_attr 'inner_map'
|