History

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.

YiFei Zhu committed 6 years ago

Commit ef153141 parent 984fe943 files · +77 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/bpf.h+7−0
@@ -124,6 +124,7 @@ enum bpf_cmd { · 123 unmodified lines
124124 BPF_ENABLE_STATS,
125125 BPF_ITER_CREATE,
126126 BPF_LINK_DETACH,
127+ BPF_PROG_BIND_MAP,
127128 };
128129
129130 enum bpf_map_type {
@@ -658,6 +659,12 @@ union bpf_attr { · 528 unmodified lines
658659 __u32 flags;
659660 } iter_create;
660661
662+ struct { /* struct used by BPF_PROG_BIND_MAP command */
663+ __u32 prog_fd;
664+ __u32 map_fd;
665+ __u32 flags; /* extra flags */
666+ } prog_bind_map;
667+
661668 } __attribute__((aligned(8)));
662669
663670 /* The description below is an attempt at providing documentation to eBPF