Home
last modified time | relevance | path

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

123456

/linux/tools/testing/selftests/bpf/
H A Dtest_lru_map.c30 LIBBPF_OPTS(bpf_map_create_opts, opts, .map_flags = map_flags); in create_map()
155 map_flags); in test_lru_sanity0()
159 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity0()
252 map_flags); in test_lru_sanity1()
329 map_flags); in test_lru_sanity2()
435 map_flags); in test_lru_sanity3()
494 map_flags); in test_lru_sanity4()
572 map_flags); in test_lru_sanity5()
620 map_flags); in test_lru_sanity6()
683 map_flags); in test_lru_sanity7()
[all …]
/linux/samples/bpf/
H A Dtest_lru_dist.c205 .map_flags = map_flags, in create_map()
314 map_flags); in test_parallel_lru_dist()
316 if (map_flags & BPF_F_NO_COMMON_LRU) in test_parallel_lru_dist()
341 map_flags); in test_lru_loss0()
345 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_loss0()
393 map_flags); in test_lru_loss1()
397 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_loss1()
470 map_flags); in test_parallel_lru_loss()
473 if (map_flags & BPF_F_NO_COMMON_LRU) in test_parallel_lru_loss()
474 map_fd = create_map(map_type, map_flags, in test_parallel_lru_loss()
[all …]
H A 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);
H A Dtcp_dumpstats_kern.c17 __u32 map_flags; member
22 .map_flags = BPF_F_NO_PREALLOC,
/linux/kernel/bpf/
H A Dbpf_local_storage.c435 u64 map_flags) in check_flags() argument
441 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
527 void *value, u64 map_flags, gfp_t gfp_flags) in bpf_local_storage_update() argument
536 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_update()
538 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_update()
549 err = check_flags(NULL, map_flags); in bpf_local_storage_update()
567 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) { in bpf_local_storage_update()
574 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
605 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
609 if (old_sdata && (map_flags & BPF_F_LOCK)) { in bpf_local_storage_update()
[all …]
H A 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()
H A Darraymap.c119 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()
258 if (map->map_flags & BPF_F_INNER_MAP) in percpu_array_map_gen_lookup()
343 u64 map_flags) in array_map_update_elem() argument
357 if (unlikely(map_flags & BPF_NOEXIST)) in array_map_update_elem()
372 if (map_flags & BPF_F_LOCK) in array_map_update_elem()
382 u64 map_flags) in bpf_percpu_array_update() argument
390 if (unlikely(map_flags > BPF_EXIST)) in bpf_percpu_array_update()
398 if (unlikely(map_flags == BPF_NOEXIST)) in bpf_percpu_array_update()
[all …]
H A Dhashtab.c1083 u64 map_flags) in check_flags() argument
1098 u64 map_flags) in htab_map_update_elem() argument
1201 u64 map_flags) in htab_lru_map_update_elem() argument
1269 void *value, u64 map_flags, in __htab_percpu_map_update_elem() argument
1354 if (map_flags != BPF_EXIST) { in __htab_lru_percpu_map_update_elem()
1394 void *value, u64 map_flags) in htab_percpu_map_update_elem() argument
1703 u64 elem_map_flags, map_flags; in __htab_map_lookup_and_delete_batch() local
1717 map_flags = attr->batch.flags; in __htab_map_lookup_and_delete_batch()
1718 if (map_flags) in __htab_map_lookup_and_delete_batch()
2414 u64 map_flags) in bpf_percpu_hash_update() argument
[all …]
H A 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()
H A Ddevmap.c120 attr->map_flags & ~DEV_CREATE_FLAG_MASK) in dev_map_alloc_check()
139 attr->map_flags |= BPF_F_RDONLY_PROG; in dev_map_init_map()
905 void *key, void *value, u64 map_flags) in __dev_map_update_elem() argument
912 if (unlikely(map_flags > BPF_EXIST)) in __dev_map_update_elem()
916 if (unlikely(map_flags == BPF_NOEXIST)) in __dev_map_update_elem()
947 u64 map_flags) in dev_map_update_elem() argument
950 map, key, value, map_flags); in dev_map_update_elem()
954 void *key, void *value, u64 map_flags) in __dev_map_hash_update_elem() argument
972 if (old_dev && (map_flags & BPF_NOEXIST)) in __dev_map_hash_update_elem()
1007 u64 map_flags) in dev_map_hash_update_elem() argument
[all …]
H A Dbloom_filter.c103 attr->map_flags & ~BLOOM_CREATE_FLAG_MASK || in bloom_map_alloc()
104 !bpf_map_flags_access_ok(attr->map_flags) || in bloom_map_alloc()
156 if (!(attr->map_flags & BPF_F_ZERO_SEED)) in bloom_map_alloc()
/linux/tools/testing/selftests/bpf/progs/
H A 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);
H A 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);
H A 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);
H A Dtest_mmap.c12 __uint(map_flags, BPF_F_MMAPABLE | BPF_F_RDONLY_PROG);
19 __uint(map_flags, BPF_F_MMAPABLE);
H A Dtest_queue_stack_map.h14 __uint(map_flags, 0);
22 __uint(map_flags, 0);
H A Dnetns_cookie_prog.c11 __uint(map_flags, BPF_F_NO_PREALLOC);
18 __uint(map_flags, BPF_F_NO_PREALLOC);
H A Dtask_ls_recursion.c18 __uint(map_flags, BPF_F_NO_PREALLOC);
25 __uint(map_flags, BPF_F_NO_PREALLOC);
H A Dtest_map_in_map.c11 __uint(map_flags, 0);
19 __uint(map_flags, 0);
H A Dbench_local_storage_create.c20 __uint(map_flags, BPF_F_NO_PREALLOC);
27 __uint(map_flags, BPF_F_NO_PREALLOC);
H A 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);
H A Dcgrp_ls_recursion.c12 __uint(map_flags, BPF_F_NO_PREALLOC);
19 __uint(map_flags, BPF_F_NO_PREALLOC);
/linux/tools/testing/selftests/bpf/map_tests/
H A Dmap_percpu_stats.c288 n_iter, n_real, map_type_to_s(info->type), info->map_flags); in check_expected_number_elements()
315 opts.retry_for_nomem = is_percpu(opts.map_type) && (info.map_flags & BPF_F_NO_PREALLOC); in __test()
362 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = BPF_F_NO_PREALLOC); in create_hash()
369 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = BPF_F_NO_PREALLOC); in create_percpu_hash()
384 static int create_lru_hash(__u32 type, __u32 map_flags) in create_lru_hash() argument
386 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = map_flags); in create_lru_hash()
394 .map_flags = BPF_F_NO_PREALLOC, in create_hash_of_maps()
/linux/net/xdp/
H A 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/tools/testing/selftests/bpf/benchs/
H A 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