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
124 BPF_ENABLE_STATS,124 BPF_ENABLE_STATS,
125 BPF_ITER_CREATE,125 BPF_ITER_CREATE,
126 BPF_LINK_DETACH,126 BPF_LINK_DETACH,
127 BPF_PROG_BIND_MAP,
127};128};
128 129
129enum bpf_map_type {130enum bpf_map_type {
@@ -658,6 +659,12 @@ union bpf_attr { · 528 unmodified lines
658 __u32 flags;659 __u32 flags;
659 } iter_create;660 } iter_create;
660 661
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
661} __attribute__((aligned(8)));668} __attribute__((aligned(8)));
662 669
663/* The description below is an attempt at providing documentation to eBPF670/* The description below is an attempt at providing documentation to eBPF