| /linux/tools/testing/selftests/bpf/ |
| H A D | test_lru_map.c | 28 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() 161 static void test_lru_sanity0(int map_type, int map_flags) in test_lru_sanity0() argument 168 map_flags); in test_lru_sanity0() 172 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity0() 173 lru_map_fd = create_map(map_type, map_flags, 2 * nr_cpus); in test_lru_sanity0() 175 lru_map_fd = create_map(map_type, map_flags, 2); in test_lru_sanity0() 252 static void test_lru_sanity1(int map_type, int map_flags, unsigned int tgt_free) in test_lru_sanity1() argument 260 if (map_flags & BPF_F_NO_COMMON_LRU) in test_lru_sanity1() 265 map_flags); in test_lru_sanity1() [all …]
|
| H A D | test_maps.c | 273 "err: %s, flags: 0x%x\n", strerror(errno), map_opts.map_flags); in helper_fill_hashmap() 329 old_flags = map_opts.map_flags; in test_hashmap_zero_seed() 330 map_opts.map_flags |= BPF_F_ZERO_SEED; in test_hashmap_zero_seed() 352 map_opts.map_flags = old_flags; in test_hashmap_zero_seed() 551 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_queuemap() 607 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_stackmap() 1403 map_opts.map_flags == BPF_F_NO_PREALLOC)); in can_retry() 1537 old_flags = map_opts.map_flags; in test_map_rdonly() 1538 map_opts.map_flags |= BPF_F_RDONLY; in test_map_rdonly() 1541 map_opts.map_flags in test_map_rdonly() [all...] |
| /linux/samples/bpf/ |
| H A D | test_lru_dist.c | 202 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 …]
|
| H A D | map_perf_test.bpf.c | 36 __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 D | tcp_dumpstats_kern.c | 17 __u32 map_flags; member 22 .map_flags = BPF_F_NO_PREALLOC,
|
| /linux/kernel/bpf/ |
| H A D | bpf_local_storage.c | 407 u64 map_flags) in bpf_selem_link_storage_nolock() 409 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in bpf_selem_link_storage_nolock() 413 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in bpf_selem_unlink_map() 487 void *value, u64 map_flags, bool swap_uptrs, gfp_t gfp_flags) in bpf_local_storage_alloc() 497 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_alloc() 499 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_alloc() 503 if (gfp_flags == GFP_KERNEL && (map_flags & ~BPF_F_LOCK) != BPF_NOEXIST) in bpf_local_storage_alloc() 510 err = check_flags(NULL, map_flags); in bpf_local_storage_alloc() 528 if ((map_flags & BPF_F_LOCK) && !(map_flags in bpf_local_storage_alloc() 470 check_flags(const struct bpf_local_storage_data * old_sdata,u64 map_flags) check_flags() argument 558 bpf_local_storage_update(void * owner,struct bpf_local_storage_map * smap,void * value,u64 map_flags,bool swap_uptrs,gfp_t gfp_flags) bpf_local_storage_update() argument [all...] |
| H A D | reuseport_array.c | 192 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 D | map_in_map.c | 39 inner_map_meta->map_flags = inner_map->map_flags; in bpf_map_meta_alloc() 90 meta0->map_flags == meta1->map_flags && in bpf_map_meta_equal()
|
| H A D | bloom_filter.c | 103 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 D | local_storage.c | 28 __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 D | sockopt_inherit.c | 20 __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 D | test_btf_map_in_map.c | 46 __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 D | test_mmap.c | 12 __uint(map_flags, BPF_F_MMAPABLE | BPF_F_RDONLY_PROG); 19 __uint(map_flags, BPF_F_MMAPABLE);
|
| H A D | test_queue_stack_map.h | 14 __uint(map_flags, 0); 22 __uint(map_flags, 0);
|
| H A D | task_ls_recursion.c | 18 __uint(map_flags, BPF_F_NO_PREALLOC); 25 __uint(map_flags, BPF_F_NO_PREALLOC);
|
| H A D | map_kptr.c | 45 __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 D | bench_local_storage_create.c | 20 __uint(map_flags, BPF_F_NO_PREALLOC); 27 __uint(map_flags, BPF_F_NO_PREALLOC);
|
| H A D | test_map_in_map.c | 11 __uint(map_flags, 0); 19 __uint(map_flags, 0);
|
| H A D | cgrp_ls_recursion.c | 12 __uint(map_flags, BPF_F_NO_PREALLOC); 19 __uint(map_flags, BPF_F_NO_PREALLOC);
|
| H A D | test_sk_storage_tracing.c | 17 __uint(map_flags, BPF_F_NO_PREALLOC); 25 __uint(map_flags, BPF_F_NO_PREALLOC);
|
| H A D | cgrp_ls_tp_btf.c | 12 __uint(map_flags, BPF_F_NO_PREALLOC); 19 __uint(map_flags, BPF_F_NO_PREALLOC);
|
| /linux/tools/testing/selftests/bpf/map_tests/ |
| H A D | map_percpu_stats.c | 289 n_iter, n_real, map_type_to_s(info->type), info->map_flags); in check_expected_number_elements() 316 opts.retry_for_nomem = is_percpu(opts.map_type) && (info.map_flags & BPF_F_NO_PREALLOC); in __test() 363 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = BPF_F_NO_PREALLOC); in create_hash() 370 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = BPF_F_NO_PREALLOC); in create_percpu_hash() 385 static int create_lru_hash(__u32 type, __u32 map_flags) in create_lru_hash() argument 387 LIBBPF_OPTS(bpf_map_create_opts, map_opts, .map_flags = map_flags); in create_lru_hash() 395 .map_flags = BPF_F_NO_PREALLOC, in create_hash_of_maps()
|
| /linux/tools/testing/selftests/bpf/benchs/ |
| H A D | bench_bpf_hashmap_lookup.c | 22 __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()
|
| /linux/net/xdp/ |
| H A D | xskmap.c | 72 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/drivers/usb/usbip/ |
| H A D | usbip_common.c | 409 unsigned int map_flags = 0; in urb_to_usbip() local 414 map_flags |= flag_map[loop].usbip_flag; in urb_to_usbip() 417 return map_flags; in urb_to_usbip() 422 unsigned int map_flags = 0; in usbip_to_urb() local 427 map_flags |= flag_map[loop].urb_flag; in usbip_to_urb() 430 return map_flags; in usbip_to_urb()
|