This syscall binds a map to a program. Returns success if the map is already bound to the program.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -124,6 +124,7 @@ enum bpf_cmd { · 123 unmodified lines | ||
| 124 | 124 | BPF_ENABLE_STATS, |
| 125 | 125 | BPF_ITER_CREATE, |
| 126 | 126 | BPF_LINK_DETACH, |
| 127 | + BPF_PROG_BIND_MAP, | |
| 127 | 128 | }; |
| 128 | 129 | |
| 129 | 130 | enum bpf_map_type { |
| @@ -658,6 +659,12 @@ union bpf_attr { · 528 unmodified lines | ||
| 658 | 659 | __u32 flags; |
| 659 | 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 | 668 | } __attribute__((aligned(8))); |
| 662 | 669 | |
| 663 | 670 | /* The description below is an attempt at providing documentation to eBPF |