Home
last modified time | relevance | path

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

12345

/linux-6.1.9/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 …]
Dtest_maps.c277 "err: %s, flags: 0x%x\n", strerror(errno), map_opts.map_flags); in helper_fill_hashmap()
333 old_flags = map_opts.map_flags; in test_hashmap_zero_seed()
334 map_opts.map_flags |= BPF_F_ZERO_SEED; in test_hashmap_zero_seed()
356 map_opts.map_flags = old_flags; in test_hashmap_zero_seed()
555 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_queuemap()
611 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_stackmap()
1528 old_flags = map_opts.map_flags; in test_map_rdonly()
1529 map_opts.map_flags |= BPF_F_RDONLY; in test_map_rdonly()
1532 map_opts.map_flags = old_flags; in test_map_rdonly()
1557 old_flags = map_opts.map_flags; in test_map_wronly_hash()
[all …]
/linux-6.1.9/samples/bpf/
Dtest_lru_dist.c207 static int create_map(int map_type, int map_flags, unsigned int size) in create_map() argument
210 .map_flags = map_flags, in create_map()
312 static void test_parallel_lru_dist(int map_type, int map_flags, in test_parallel_lru_dist() argument
319 map_flags); in test_parallel_lru_dist()
321 if (map_flags & BPF_F_NO_COMMON_LRU) in test_parallel_lru_dist()
322 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
325 lru_map_fd = create_map(map_type, map_flags, in test_parallel_lru_dist()
337 static void test_lru_loss0(int map_type, int map_flags) in test_lru_loss0() argument
346 map_flags); in test_lru_loss0()
350 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_loss0()
[all …]
Dmap_perf_test_kern.c38 __uint(map_flags, BPF_F_NO_COMMON_LRU);
46 __uint(map_flags, BPF_F_NUMA_NODE);
72 __uint(map_flags, BPF_F_NO_PREALLOC);
80 __uint(map_flags, BPF_F_NO_PREALLOC);
88 __uint(map_flags, BPF_F_NO_PREALLOC);
Dtcp_dumpstats_kern.c17 __u32 map_flags; member
22 .map_flags = BPF_F_NO_PREALLOC,
/linux-6.1.9/kernel/bpf/
Dbpf_local_storage.c279 u64 map_flags) in check_flags() argument
281 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags()
285 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
363 void *value, u64 map_flags, gfp_t gfp_flags) in bpf_local_storage_update() argument
372 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_update()
374 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_update()
378 if (gfp_flags == GFP_KERNEL && (map_flags & ~BPF_F_LOCK) != BPF_NOEXIST) in bpf_local_storage_update()
385 err = check_flags(NULL, map_flags); in bpf_local_storage_update()
403 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) { in bpf_local_storage_update()
410 err = check_flags(old_sdata, map_flags); in bpf_local_storage_update()
[all …]
Dreuseport_array.c195 u32 map_flags) in reuseport_array_update_check() argument
197 if (osk && map_flags == BPF_NOEXIST) in reuseport_array_update_check()
200 if (!osk && map_flags == BPF_EXIST) in reuseport_array_update_check()
236 void *value, u64 map_flags) in bpf_fd_reuseport_array_update_elem() argument
246 if (map_flags > BPF_EXIST) in bpf_fd_reuseport_array_update_elem()
276 map_flags); in bpf_fd_reuseport_array_update_elem()
292 err = reuseport_array_update_check(array, nsk, osk, reuse, map_flags); in bpf_fd_reuseport_array_update_elem()
Dmap_in_map.c51 inner_map_meta->map_flags = inner_map->map_flags; in bpf_map_meta_alloc()
88 meta0->map_flags == meta1->map_flags && in bpf_map_meta_equal()
Dhashtab.c133 return !(htab->map.map_flags & BPF_F_NO_PREALLOC); in htab_is_prealloc()
337 htab->map.map_flags & BPF_F_NO_COMMON_LRU, in prealloc_init()
409 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc_check()
410 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc_check()
411 bool zero_seed = (attr->map_flags & BPF_F_ZERO_SEED); in htab_map_alloc_check()
427 if (attr->map_flags & ~HTAB_CREATE_FLAG_MASK || in htab_map_alloc_check()
428 !bpf_map_flags_access_ok(attr->map_flags)) in htab_map_alloc_check()
470 bool percpu_lru = (attr->map_flags & BPF_F_NO_COMMON_LRU); in htab_map_alloc()
471 bool prealloc = !(attr->map_flags & BPF_F_NO_PREALLOC); in htab_map_alloc()
527 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()
319 u64 map_flags) in array_map_update_elem() argument
325 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in array_map_update_elem()
333 if (unlikely(map_flags & BPF_NOEXIST)) in array_map_update_elem()
[all …]
Ddevmap.c122 attr->map_flags & ~DEV_CREATE_FLAG_MASK) in dev_map_init_map()
128 attr->map_flags |= BPF_F_RDONLY_PROG; in dev_map_init_map()
889 void *key, void *value, u64 map_flags) in __dev_map_update_elem() argument
896 if (unlikely(map_flags > BPF_EXIST)) in __dev_map_update_elem()
900 if (unlikely(map_flags == BPF_NOEXIST)) in __dev_map_update_elem()
929 u64 map_flags) in dev_map_update_elem() argument
932 map, key, value, map_flags); in dev_map_update_elem()
936 void *key, void *value, u64 map_flags) in __dev_map_hash_update_elem() argument
948 if (unlikely(map_flags > BPF_EXIST || !val.ifindex)) in __dev_map_hash_update_elem()
954 if (old_dev && (map_flags & BPF_NOEXIST)) in __dev_map_hash_update_elem()
[all …]
Dbloom_filter.c102 attr->map_flags & ~BLOOM_CREATE_FLAG_MASK || in bloom_map_alloc()
103 !bpf_map_flags_access_ok(attr->map_flags) || in bloom_map_alloc()
160 if (!(attr->map_flags & BPF_F_ZERO_SEED)) in bloom_map_alloc()
Dlocal_storage.c212 void *value, u64 map_flags) in bpf_percpu_cgroup_storage_update() argument
219 if (map_flags != BPF_ANY && map_flags != BPF_EXIST) in bpf_percpu_cgroup_storage_update()
308 if (attr->map_flags & ~LOCAL_STORAGE_CREATE_FLAG_MASK || in cgroup_storage_map_alloc()
309 !bpf_map_flags_access_ok(attr->map_flags)) in cgroup_storage_map_alloc()
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dlocal_storage.c27 __uint(map_flags, BPF_F_NO_PREALLOC);
34 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
41 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
48 __uint(map_flags, BPF_F_NO_PREALLOC);
Dsockopt_inherit.c18 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
25 __uint(map_flags, BPF_F_NO_PREALLOC | BPF_F_CLONE);
32 __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);
Dtask_ls_recursion.c12 __uint(map_flags, BPF_F_NO_PREALLOC);
19 __uint(map_flags, BPF_F_NO_PREALLOC);
Dnetns_cookie_prog.c11 __uint(map_flags, BPF_F_NO_PREALLOC);
18 __uint(map_flags, BPF_F_NO_PREALLOC);
Dtest_sk_storage_tracing.c17 __uint(map_flags, BPF_F_NO_PREALLOC);
25 __uint(map_flags, BPF_F_NO_PREALLOC);
/linux-6.1.9/net/xdp/
Dxskmap.c72 attr->map_flags & ~(BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY)) in xsk_map_alloc()
154 u64 map_flags) in xsk_map_update_elem() argument
164 if (unlikely(map_flags > BPF_EXIST)) in xsk_map_update_elem()
192 } else if (old_xs && map_flags == BPF_NOEXIST) { in xsk_map_update_elem()
195 } else if (!old_xs && map_flags == BPF_EXIST) { in xsk_map_update_elem()
/linux-6.1.9/drivers/usb/usbip/
Dusbip_common.c408 unsigned int map_flags = 0; in urb_to_usbip() local
413 map_flags |= flag_map[loop].usbip_flag; in urb_to_usbip()
416 return map_flags; in urb_to_usbip()
421 unsigned int map_flags = 0; in usbip_to_urb() local
426 map_flags |= flag_map[loop].urb_flag; in usbip_to_urb()
429 return map_flags; in usbip_to_urb()
/linux-6.1.9/mm/
Dmremap.c790 unsigned long map_flags = 0; in mremap_to() local
846 map_flags |= MAP_FIXED; in mremap_to()
849 map_flags |= MAP_SHARED; in mremap_to()
853 map_flags); in mremap_to()
1063 unsigned long map_flags = 0; in SYSCALL_DEFINE5() local
1065 map_flags |= MAP_SHARED; in SYSCALL_DEFINE5()
1070 map_flags); in SYSCALL_DEFINE5()

12345