Home
last modified time | relevance | path

Searched refs:map_flags (Results 1 – 25 of 128) sorted by relevance

123456

/linux-6.6.21/tools/testing/selftests/bpf/
Dtest_lru_map.c28 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
30 LIBBPF_OPTS(bpf_map_create_opts, opts, .map_flags = map_flags); in create_map()
148 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument
155 map_flags); in test_lru_sanity0()
159 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity0()
160 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0()
162 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0()
239 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument
247 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity1()
252 map_flags); in test_lru_sanity1()
[all …]
/linux-6.6.21/samples/bpf/
Dtest_lru_dist.c202 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
205 .map_flags = map_flags, in create_map()
307 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument
314 map_flags); in test_parallel_lru_dist()
316 if (map_flags & BPF_F_NO_COMMON_LRU) in test_parallel_lru_dist()
317 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
320 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
332 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument
341 map_flags); in test_lru_loss0()
345 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_loss0()
[all …]
Dmap_perf_test.bpf.c36 __uint(map_flags, BPF_F_NO_COMMON_LRU);
44 __uint(map_flags, BPF_F_NUMA_NODE);
70 __uint(map_flags, BPF_F_NO_PREALLOC);
78 __uint(map_flags, BPF_F_NO_PREALLOC);
86 __uint(map_flags, BPF_F_NO_PREALLOC);
Dtcp_dumpstats_kern.c17 __u32 map_flags; member
22 .map_flags = BPF_F_NO_PREALLOC,
/linux-6.6.21/kernel/bpf/
Dbpf_local_storage.c461 u64 map_flags) in check_flags() argument
463 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
467 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
553 void *value, u64 map_flags, gfp_t gfp_flags) in bpf_local_storage_update() argument
562 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_update()
564 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_update()
568 if (gfp_flags == GFP_KERNEL && (map_flags & ~BPF_F_LOCK) != BPF_NOEXIST) in bpf_local_storage_update()
575 err = check_flags(NULL, map_flags); in bpf_local_storage_update()
593 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) { in bpf_local_storage_update()
600 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
[all …]
Dreuseport_array.c192 u32 map_flags) in reuseport_array_update_check() argument
194 if (osk && map_flags == BPF_NOEXIST) in reuseport_array_update_check()
197 if (!osk && map_flags == BPF_EXIST) in reuseport_array_update_check()
233 void *value, u64 map_flags) in bpf_fd_reuseport_array_update_elem() argument
243 if (map_flags > BPF_EXIST) in bpf_fd_reuseport_array_update_elem()
273 map_flags); in bpf_fd_reuseport_array_update_elem()
289 err = reuseport_array_update_check(array, nsk, osk, reuse, map_flags); in bpf_fd_reuseport_array_update_elem()
Dhashtab.c133 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_is_prealloc()
349 htab->map.map_flags & BPF_F_NO_COMMON_LRU, in prealloc_init()
421 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc_check()
422 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc_check()
423 bool zero_seed = (attr->map_flags & BPF_F_ZERO_SEED); in htab_map_alloc_check()
433 if (attr->map_flags & ~HTAB_CREATE_FLAG_MASK || in htab_map_alloc_check()
434 !bpf_map_flags_access_ok(attr->map_flags)) in htab_map_alloc_check()
476 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc()
477 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc()
537 if (htab->map.map_flags & BPF_F_ZERO_SEED) in htab_map_alloc()
[all …]
Darraymap.c60 attr->map_flags & ~ARRAY_CREATE_FLAG_MASK || in array_map_alloc_check()
61 !bpf_map_flags_access_ok(attr->map_flags) || in array_map_alloc_check()
66 attr->map_flags & (BPF_F_MMAPABLE | BPF_F_INNER_MAP)) in array_map_alloc_check()
70 attr->map_flags & BPF_F_PRESERVE_ELEMS) in array_map_alloc_check()
119 if (attr->map_flags & BPF_F_MMAPABLE) { in array_map_alloc()
128 if (attr->map_flags & BPF_F_MMAPABLE) { in array_map_alloc()
214 if (map->map_flags & BPF_F_INNER_MAP) in array_map_gen_lookup()
311 u64 map_flags) in array_map_update_elem() argument
317 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in array_map_update_elem()
325 if (unlikely(map_flags & BPF_NOEXIST)) in array_map_update_elem()
[all …]
Dmap_in_map.c47 inner_map_meta->map_flags = inner_map->map_flags; in bpf_map_meta_alloc()
104 meta0->map_flags == meta1->map_flags && in bpf_map_meta_equal()
Dbloom_filter.c91 attr->map_flags & ~BLOOM_CREATE_FLAG_MASK || in bloom_map_alloc()
92 !bpf_map_flags_access_ok(attr->map_flags) || in bloom_map_alloc()
144 if (!(attr->map_flags & BPF_F_ZERO_SEED)) in bloom_map_alloc()
/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dlocal_storage.c28 __uint(map_flags, BPF_F_NO_PREALLOC);
35 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
42 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
49 __uint(map_flags, BPF_F_NO_PREALLOC);
56 __uint(map_flags, BPF_F_NO_PREALLOC);
Dsockopt_inherit.c20 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
27 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
34 __uint(map_flags, BPF_F_NO_PREALLOC);
Dtest_btf_map_in_map.c46 __uint(map_flags, BPF_F_INNER_MAP);
55 __uint(map_flags, BPF_F_INNER_MAP);
68 __uint(map_flags, BPF_F_INNER_MAP);
Dtest_map_in_map.c11 __uint(map_flags, 0);
19 __uint(map_flags, 0);
Dtest_mmap.c12 __uint(map_flags, BPF_F_MMAPABLE | BPF_F_RDONLY_PROG);
19 __uint(map_flags, BPF_F_MMAPABLE);
Dtest_queue_stack_map.h14 __uint(map_flags, 0);
22 __uint(map_flags, 0);
Dnetns_cookie_prog.c11 __uint(map_flags, BPF_F_NO_PREALLOC);
18 __uint(map_flags, BPF_F_NO_PREALLOC);
Dbench_local_storage_create.c20 __uint(map_flags, BPF_F_NO_PREALLOC);
27 __uint(map_flags, BPF_F_NO_PREALLOC);
Dcgrp_ls_recursion.c12 __uint(map_flags, BPF_F_NO_PREALLOC);
19 __uint(map_flags, BPF_F_NO_PREALLOC);
Dcgrp_ls_tp_btf.c12 __uint(map_flags, BPF_F_NO_PREALLOC);
19 __uint(map_flags, BPF_F_NO_PREALLOC);
Dtask_ls_recursion.c18 __uint(map_flags, BPF_F_NO_PREALLOC);
25 __uint(map_flags, BPF_F_NO_PREALLOC);
Dmap_kptr.c45 __uint(map_flags, BPF_F_NO_PREALLOC);
53 __uint(map_flags, BPF_F_NO_PREALLOC);
72 __uint(map_flags, BPF_F_NO_PREALLOC);
79 __uint(map_flags, BPF_F_NO_PREALLOC);
86 __uint(map_flags, BPF_F_NO_PREALLOC);
93 __uint(map_flags, BPF_F_NO_PREALLOC);
/linux-6.6.21/tools/testing/selftests/bpf/map_tests/
Dmap_percpu_stats.c262 n_iter, n_real, map_type_to_s(info->type), info->map_flags); in check_expected_number_elements()
331 .map_flags = BPF_F_NO_PREALLOC, in create_hash()
341 .map_flags = BPF_F_NO_PREALLOC, in create_percpu_hash()
357 static int create_lru_hash(__u32 type, __u32 map_flags) in create_lru_hash() argument
361 .map_flags = map_flags, in create_lru_hash()
371 .map_flags = BPF_F_NO_PREALLOC, in create_hash_of_maps()
/linux-6.6.21/net/xdp/
Dxskmap.c72 attr->map_flags & ~(BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY)) in xsk_map_alloc()
162 u64 map_flags) in xsk_map_update_elem() argument
172 if (unlikely(map_flags > BPF_EXIST)) in xsk_map_update_elem()
200 } else if (old_xs && map_flags == BPF_NOEXIST) { in xsk_map_update_elem()
203 } else if (!old_xs && map_flags == BPF_EXIST) { in xsk_map_update_elem()
/linux-6.6.21/tools/testing/selftests/bpf/benchs/
Dbench_bpf_hashmap_lookup.c22 __u32 map_flags; member
28 .map_flags = 0,
75 args.map_flags = ret; in parse_arg()
169 bpf_map__set_map_flags(ctx.skel->maps.hash_map_bench, args.map_flags); in setup()

123456