| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | htab_reuse.c | 29 /* Use BPF_F_LOCK to use spin-lock in map value. */ in htab_lookup_fn() 31 bpf_map_lookup_elem_flags(ctx->fd, &key, &value, BPF_F_LOCK); in htab_lookup_fn() 49 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK); in htab_update_fn() 55 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK); in htab_update_fn() 104 * Writes consistency test for BPF_F_LOCK update 107 * 1. Thread A: BPF_F_LOCK|BPF_EXIST update 144 BPF_F_LOCK | BPF_EXIST); 165 bpf_map_update_elem(ctx->fd, &key, &value, BPF_ANY | BPF_F_LOCK); 181 if (bpf_map_lookup_elem_flags(ctx->fd, &key, &value, BPF_F_LOCK))
|
| H A D | map_lock.c | 27 err = bpf_map_lookup_elem_flags(map_fd, &key, vars, BPF_F_LOCK); in parallel_map_access() 71 bpf_map_update_elem(map_fd[0], &key, vars, BPF_F_LOCK); in test_map_lock()
|
| H A D | bloom_filter_map.c | 56 err = bpf_map_update_elem(fd, NULL, &value, BPF_F_LOCK); in test_fail_cases()
|
| H A D | task_local_storage.c | 439 err = bpf_map_update_elem(map_fd, &task_fd, &value, BPF_F_LOCK); in test_uptr_update_failure() 440 if (!ASSERT_ERR(err, "update_elem(udata, BPF_F_LOCK)")) in test_uptr_update_failure()
|
| /linux/tools/testing/selftests/bpf/map_tests/ |
| H A D | sk_storage_map.c | 481 BPF_NOEXIST | BPF_F_LOCK); in test_sk_storage_map_basic() 485 BPF_F_LOCK); in test_sk_storage_map_basic() 495 BPF_EXIST | BPF_F_LOCK); in test_sk_storage_map_basic() 499 BPF_F_LOCK); in test_sk_storage_map_basic() 512 BPF_F_LOCK); in test_sk_storage_map_basic() 522 BPF_NOEXIST | BPF_F_LOCK); in test_sk_storage_map_basic() 531 BPF_F_LOCK); in test_sk_storage_map_basic() 544 BPF_F_LOCK); in test_sk_storage_map_basic() 555 BPF_F_LOCK); in test_sk_storage_map_basic()
|
| H A D | lpm_trie_map_basic_ops.c | 816 err = bpf_map_update_elem(fd, &key, &value, BPF_F_LOCK); in test_lpm_trie_update_flags()
|
| /linux/kernel/bpf/ |
| H A D | bpf_local_storage.c | 465 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags() 469 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags() 559 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) || in bpf_local_storage_update() 561 unlikely((map_flags & BPF_F_LOCK) && in bpf_local_storage_update() 587 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) { in bpf_local_storage_update() 631 if (old_sdata && (map_flags & BPF_F_LOCK)) { in bpf_local_storage_update()
|
| H A D | hashtab.c | 1143 } else if (map_flags & BPF_F_LOCK) { in alloc_htab_elem() 1161 if (l_old && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST) in check_flags() 1165 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags() 1184 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in htab_map_update_elem() 1197 if (unlikely(map_flags & BPF_F_LOCK)) { in htab_map_update_elem() 1229 if (unlikely(l_old && (map_flags & BPF_F_LOCK))) { in htab_map_update_elem() 1350 if (unlikely(onallcpus && ((map_flags & BPF_F_LOCK) || (u32)map_flags > BPF_F_ALL_CPUS))) in htab_map_check_update_flags() 1719 if (flags & BPF_F_LOCK) in __htab_map_lookup_and_delete_elem() 1796 allowed_flags = BPF_F_LOCK; in __htab_map_lookup_and_delete_batch() 1929 if (elem_map_flags & BPF_F_LOCK) in __htab_map_lookup_and_delete_batch() [all …]
|
| H A D | local_storage.c | 150 if (unlikely(flags & ~(BPF_F_LOCK | BPF_EXIST))) in cgroup_storage_update_elem() 153 if (unlikely((flags & BPF_F_LOCK) && in cgroup_storage_update_elem() 162 if (flags & BPF_F_LOCK) { in cgroup_storage_update_elem()
|
| H A D | arraymap.c | 399 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in array_map_update_elem() 411 if (unlikely((map_flags & BPF_F_LOCK) && in array_map_update_elem() 422 if (map_flags & BPF_F_LOCK) in array_map_update_elem() 441 if (unlikely((map_flags & BPF_F_LOCK) || (u32)map_flags > BPF_F_ALL_CPUS)) in bpf_percpu_array_update()
|
| H A D | syscall.c | 352 if (flags & BPF_F_LOCK) in bpf_map_copy_value() 1805 err = bpf_map_check_op_flags(map, attr->flags, BPF_F_LOCK | BPF_F_CPU); in map_lookup_elem() 2018 if (attr->batch.elem_flags & ~BPF_F_LOCK) in generic_map_delete_batch() 2021 if ((attr->batch.elem_flags & BPF_F_LOCK) && in generic_map_delete_batch() 2076 BPF_F_LOCK | BPF_F_CPU | BPF_F_ALL_CPUS); in generic_map_update_batch() 2135 err = bpf_map_check_op_flags(map, attr->batch.elem_flags, BPF_F_LOCK | BPF_F_CPU); in generic_map_lookup_batch() 2228 if (attr->flags & ~BPF_F_LOCK) in map_lookup_and_delete_elem() 2249 if ((attr->flags & BPF_F_LOCK) && in map_lookup_and_delete_elem()
|
| /linux/tools/include/uapi/linux/ |
| H A D | bpf.h | 1405 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */ enumerator
|
| /linux/include/uapi/linux/ |
| H A D | bpf.h | 1405 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */ enumerator
|
| /linux/include/linux/ |
| H A D | bpf.h | 4199 if ((flags & BPF_F_LOCK) && !btf_record_has_field(map->record, BPF_SPIN_LOCK)) in bpf_map_check_op_flags()
|