diff options
Diffstat (limited to 'tools/lib/bpf/bpf.c')
-rw-r--r-- | tools/lib/bpf/bpf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 3ddb58a36d3c..ae752fa4eaa7 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c | |||
@@ -168,7 +168,8 @@ int bpf_obj_get(const char *pathname) | |||
168 | return sys_bpf(BPF_OBJ_GET, &attr, sizeof(attr)); | 168 | return sys_bpf(BPF_OBJ_GET, &attr, sizeof(attr)); |
169 | } | 169 | } |
170 | 170 | ||
171 | int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type) | 171 | int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type, |
172 | unsigned int flags) | ||
172 | { | 173 | { |
173 | union bpf_attr attr; | 174 | union bpf_attr attr; |
174 | 175 | ||
@@ -176,6 +177,7 @@ int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type) | |||
176 | attr.target_fd = target_fd; | 177 | attr.target_fd = target_fd; |
177 | attr.attach_bpf_fd = prog_fd; | 178 | attr.attach_bpf_fd = prog_fd; |
178 | attr.attach_type = type; | 179 | attr.attach_type = type; |
180 | attr.attach_flags = flags; | ||
179 | 181 | ||
180 | return sys_bpf(BPF_PROG_ATTACH, &attr, sizeof(attr)); | 182 | return sys_bpf(BPF_PROG_ATTACH, &attr, sizeof(attr)); |
181 | } | 183 | } |