aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoe Stringer <joe@cilium.io>2021-03-02 09:19:35 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-03-04 18:39:44 -0800
commit6690523bccb3e44cfcc4b2c995767e6814046e34 (patch)
tree3f6b0af4480522843b48a825a25e17ab8751630b /include
parentbpf: Add minimal bpf() command documentation (diff)
downloadlinux-dev-6690523bccb3e44cfcc4b2c995767e6814046e34.tar.xz
linux-dev-6690523bccb3e44cfcc4b2c995767e6814046e34.zip
bpf: Document BPF_F_LOCK in syscall commands
Document the meaning of the BPF_F_LOCK flag for the map lookup/update descriptions. Based on commit 96049f3afd50 ("bpf: introduce BPF_F_LOCK flag"). Signed-off-by: Joe Stringer <joe@cilium.io> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20210302171947.2268128-4-joe@cilium.io
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/bpf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 052bbfe65f77..eb9f059f0569 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -123,6 +123,14 @@ union bpf_iter_link_info {
* Look up an element with a given *key* in the map referred to
* by the file descriptor *map_fd*.
*
+ * The *flags* argument may be specified as one of the
+ * following:
+ *
+ * **BPF_F_LOCK**
+ * Look up the value of a spin-locked map without
+ * returning the lock. This must be specified if the
+ * elements contain a spinlock.
+ *
* Return
* Returns zero on success. On error, -1 is returned and *errno*
* is set appropriately.
@@ -140,6 +148,8 @@ union bpf_iter_link_info {
* Create a new element only if it did not exist.
* **BPF_EXIST**
* Update an existing element.
+ * **BPF_F_LOCK**
+ * Update a spin_lock-ed map element.
*
* Return
* Returns zero on success. On error, -1 is returned and *errno*