/linux-6.1.9/tools/testing/selftests/bpf/ |
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() 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 …]
|
D | test_maps.c | 277 "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/ |
D | test_lru_dist.c | 207 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 …]
|
D | map_perf_test_kern.c | 38 __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);
|
D | tcp_dumpstats_kern.c | 17 __u32 map_flags; member 22 .map_flags = BPF_F_NO_PREALLOC,
|
/linux-6.1.9/kernel/bpf/ |
D | bpf_local_storage.c | 279 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 …]
|
D | reuseport_array.c | 195 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()
|
D | map_in_map.c | 51 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()
|
D | hashtab.c | 133 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 …]
|
D | arraymap.c | 60 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 …]
|
D | devmap.c | 122 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 …]
|
D | bloom_filter.c | 102 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()
|
D | local_storage.c | 212 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/ |
D | local_storage.c | 27 __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);
|
D | sockopt_inherit.c | 18 __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);
|
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);
|
D | test_map_in_map.c | 11 __uint(map_flags, 0); 19 __uint(map_flags, 0);
|
D | test_mmap.c | 12 __uint(map_flags, BPF_F_MMAPABLE | BPF_F_RDONLY_PROG); 19 __uint(map_flags, BPF_F_MMAPABLE);
|
D | test_queue_stack_map.h | 14 __uint(map_flags, 0); 22 __uint(map_flags, 0);
|
D | task_ls_recursion.c | 12 __uint(map_flags, BPF_F_NO_PREALLOC); 19 __uint(map_flags, BPF_F_NO_PREALLOC);
|
D | netns_cookie_prog.c | 11 __uint(map_flags, BPF_F_NO_PREALLOC); 18 __uint(map_flags, BPF_F_NO_PREALLOC);
|
D | test_sk_storage_tracing.c | 17 __uint(map_flags, BPF_F_NO_PREALLOC); 25 __uint(map_flags, BPF_F_NO_PREALLOC);
|
/linux-6.1.9/net/xdp/ |
D | xskmap.c | 72 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/ |
D | usbip_common.c | 408 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/ |
D | mremap.c | 790 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()
|