| /Linux-v5.10/kernel/bpf/ |
| D | map_in_map.c | 11 struct bpf_map *inner_map, *inner_map_meta; in bpf_map_meta_alloc() local 16 inner_map = __bpf_map_get(f); in bpf_map_meta_alloc() 17 if (IS_ERR(inner_map)) in bpf_map_meta_alloc() 18 return inner_map; in bpf_map_meta_alloc() 21 if (inner_map->inner_map_meta) { in bpf_map_meta_alloc() 26 if (!inner_map->ops->map_meta_equal) { in bpf_map_meta_alloc() 31 if (map_value_has_spin_lock(inner_map)) { in bpf_map_meta_alloc() 38 if (inner_map->ops == &array_map_ops) in bpf_map_meta_alloc() 47 inner_map_meta->map_type = inner_map->map_type; in bpf_map_meta_alloc() 48 inner_map_meta->key_size = inner_map->key_size; in bpf_map_meta_alloc() [all …]
|
| D | arraymap.c | 1251 struct bpf_map **inner_map = array_map_lookup_elem(map, key); in array_of_map_lookup_elem() local 1253 if (!inner_map) in array_of_map_lookup_elem() 1256 return READ_ONCE(*inner_map); in array_of_map_lookup_elem()
|
| D | hashtab.c | 2091 struct bpf_map **inner_map = htab_map_lookup_elem(map, key); in htab_of_map_lookup_elem() local 2093 if (!inner_map) in htab_of_map_lookup_elem() 2096 return READ_ONCE(*inner_map); in htab_of_map_lookup_elem()
|
| /Linux-v5.10/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 | map_ptr_kern.c | 343 struct inner_map { struct 348 } inner_map SEC(".maps"); 362 .values = { (void *)&inner_map, 0, 0, 0, 0, 0, 0, 0, 0 }, 380 __array(values, struct inner_map); 383 [2] = &inner_map,
|
| /Linux-v5.10/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.10/tools/testing/selftests/bpf/prog_tests/ |
| D | sockmap_listen.c | 1014 struct bpf_map *inner_map, int family, in test_skb_redir_to_connected() argument 1020 int sock_map = bpf_map__fd(inner_map); in test_skb_redir_to_connected() 1039 struct bpf_map *inner_map, int family, in test_msg_redir_to_connected() argument 1044 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()
|
| /Linux-v5.10/tools/bpf/bpftool/Documentation/ |
| D | bpftool-map.rst | 26 | **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] \ 71 …SIZE* **entries** *MAX_ENTRIES* **name** *NAME* [**flags** *FLAGS*] [**inner_map** *MAP*] [**dev*… 80 **inner_map** keyword must be used to pass an inner map. The
|
| /Linux-v5.10/tools/bpf/bpftool/bash-completion/ |
| D | bpftool | 715 inner_map) 724 inner_map) 740 _bpftool_once_attr 'inner_map'
|
| /Linux-v5.10/tools/lib/bpf/ |
| D | libbpf.c | 352 struct bpf_map *inner_map; member 2153 map->inner_map = calloc(1, sizeof(*map->inner_map)); in parse_btf_map_def() 2154 if (!map->inner_map) in parse_btf_map_def() 2156 map->inner_map->sec_idx = obj->efile.btf_maps_shndx; in parse_btf_map_def() 2157 map->inner_map->name = malloc(strlen(map->name) + in parse_btf_map_def() 2159 if (!map->inner_map->name) in parse_btf_map_def() 2161 sprintf(map->inner_map->name, "%s.inner", map->name); in parse_btf_map_def() 2163 err = parse_btf_map_def(obj, map->inner_map, t, strict, in parse_btf_map_def() 4166 if (map->inner_map) { in bpf_object__create_map() 4169 err = bpf_object__create_map(obj, map->inner_map); in bpf_object__create_map() [all …]
|