mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
bpf: Add BPF_PROG_BIND_MAP syscall
This syscall binds a map to a program. Returns success if the map is already bound to the program. Signed-off-by: YiFei Zhu <zhuyifei@google.com> Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Cc: YiFei Zhu <zhuyifei1999@gmail.com> Link: https://lore.kernel.org/bpf/20200915234543.3220146-3-sdf@google.com
This commit is contained in:
committed by
Alexei Starovoitov
parent
984fe94f94
commit
ef15314aa5
@@ -124,6 +124,7 @@ enum bpf_cmd {
|
||||
BPF_ENABLE_STATS,
|
||||
BPF_ITER_CREATE,
|
||||
BPF_LINK_DETACH,
|
||||
BPF_PROG_BIND_MAP,
|
||||
};
|
||||
|
||||
enum bpf_map_type {
|
||||
@@ -658,6 +659,12 @@ union bpf_attr {
|
||||
__u32 flags;
|
||||
} iter_create;
|
||||
|
||||
struct { /* struct used by BPF_PROG_BIND_MAP command */
|
||||
__u32 prog_fd;
|
||||
__u32 map_fd;
|
||||
__u32 flags; /* extra flags */
|
||||
} prog_bind_map;
|
||||
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
/* The description below is an attempt at providing documentation to eBPF
|
||||
|
Reference in New Issue
Block a user