Searched refs:BPF_F_LOCK (Results 1 - 11 of 11) sorted by relevance

/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dhtab_reuse.c29 /* Use BPF_F_LOCK to use spin-lock in map value. */
31 bpf_map_lookup_elem_flags(ctx->fd, &key, &value, BPF_F_LOCK);
49 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
55 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
H A Dmap_lock.c27 err = bpf_map_lookup_elem_flags(map_fd, &key, vars, BPF_F_LOCK);
71 bpf_map_update_elem(map_fd[0], &key, vars, BPF_F_LOCK);
H A Dbloom_filter_map.c52 err = bpf_map_update_elem(fd, NULL, &value, BPF_F_LOCK);
/linux-master/tools/testing/selftests/bpf/map_tests/
H A Dsk_storage_map.c481 BPF_NOEXIST | BPF_F_LOCK);
482 CHECK(err, "bpf_map_update_elem(BPF_NOEXIST|BPF_F_LOCK)",
485 BPF_F_LOCK);
487 "bpf_map_lookup_elem_flags(BPF_F_LOCK)",
491 /* Bump the cnt and update with BPF_EXIST | BPF_F_LOCK */
495 BPF_EXIST | BPF_F_LOCK);
496 CHECK(err, "bpf_map_update_elem(BPF_EXIST|BPF_F_LOCK)",
499 BPF_F_LOCK);
501 "bpf_map_lookup_elem_flags(BPF_F_LOCK)",
512 BPF_F_LOCK);
[all...]
/linux-master/kernel/bpf/
H A Dbpf_local_storage.c437 if (old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST)
441 if (!old_sdata && (map_flags & ~BPF_F_LOCK) == BPF_EXIST)
536 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST) ||
537 /* BPF_F_LOCK can only be used in a value with spin_lock */
538 unlikely((map_flags & BPF_F_LOCK) &&
542 if (gfp_flags == GFP_KERNEL && (map_flags & ~BPF_F_LOCK) != BPF_NOEXIST)
567 if ((map_flags & BPF_F_LOCK) && !(map_flags & BPF_NOEXIST)) {
609 if (old_sdata && (map_flags & BPF_F_LOCK)) {
H A Dlocal_storage.c150 if (unlikely(flags & ~(BPF_F_LOCK | BPF_EXIST)))
153 if (unlikely((flags & BPF_F_LOCK) &&
162 if (flags & BPF_F_LOCK) {
H A Dhashtab.c1082 if (l_old && (map_flags & ~BPF_F_LOCK) == BPF_NOEXIST)
1086 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST)
1105 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST))
1119 if (unlikely(map_flags & BPF_F_LOCK)) {
1151 if (unlikely(l_old && (map_flags & BPF_F_LOCK))) {
1625 if (flags & BPF_F_LOCK)
1704 if ((elem_map_flags & ~BPF_F_LOCK) ||
1705 ((elem_map_flags & BPF_F_LOCK) && !btf_record_has_field(map->record, BPF_SPIN_LOCK)))
1828 if (elem_map_flags & BPF_F_LOCK)
H A Darraymap.c317 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST))
329 if (unlikely((map_flags & BPF_F_LOCK) &&
340 if (map_flags & BPF_F_LOCK)
H A Dsyscall.c255 if (flags & BPF_F_LOCK)
1537 if (attr->flags & ~BPF_F_LOCK)
1549 if ((attr->flags & BPF_F_LOCK) &&
1622 if ((attr->flags & BPF_F_LOCK) &&
1785 if (attr->batch.elem_flags & ~BPF_F_LOCK)
1788 if ((attr->batch.elem_flags & BPF_F_LOCK) &&
1842 if (attr->batch.elem_flags & ~BPF_F_LOCK)
1845 if ((attr->batch.elem_flags & BPF_F_LOCK) &&
1907 if (attr->batch.elem_flags & ~BPF_F_LOCK)
1910 if ((attr->batch.elem_flags & BPF_F_LOCK)
[all...]
/linux-master/include/uapi/linux/
H A Dbpf.h177 * **BPF_F_LOCK**
199 * **BPF_F_LOCK**
581 * **BPF_F_LOCK**
657 * **BPF_F_LOCK**
718 * **BPF_F_LOCK**
761 * **BPF_F_LOCK**
1351 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */ enumerator in enum:__anon2586
/linux-master/tools/include/uapi/linux/
H A Dbpf.h177 * **BPF_F_LOCK**
199 * **BPF_F_LOCK**
581 * **BPF_F_LOCK**
657 * **BPF_F_LOCK**
718 * **BPF_F_LOCK**
761 * **BPF_F_LOCK**
1351 BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */ enumerator in enum:__anon3127

Completed in 373 milliseconds