aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/bpf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-02-16 19:34:01 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-16 19:34:01 -0500
commit3f64116a838e6c3468f9d5eed7f1f87cf3a2c3eb (patch)
tree388024d2ddbdcb9991ef4b472dfac31e425b807e /tools/lib/bpf/bpf.c
parentcxgb4: Remove redundant code in t4_uld_clean_up() (diff)
parentMerge tag 'media/v4.10-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media (diff)
downloadlinux-dev-3f64116a838e6c3468f9d5eed7f1f87cf3a2c3eb.tar.xz
linux-dev-3f64116a838e6c3468f9d5eed7f1f87cf3a2c3eb.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'tools/lib/bpf/bpf.c')
-rw-r--r--tools/lib/bpf/bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 2de9c386989a..d48b70ceb25a 100644
--- a/tools/lib/bpf/bpf.c
+++ b/tools/lib/bpf/bpf.c
@@ -168,7 +168,8 @@ int bpf_obj_get(const char *pathname)
return sys_bpf(BPF_OBJ_GET, &attr, sizeof(attr));
}
-int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type)
+int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type,
+ unsigned int flags)
{
union bpf_attr attr;
@@ -176,6 +177,7 @@ int bpf_prog_attach(int prog_fd, int target_fd, enum bpf_attach_type type)
attr.target_fd = target_fd;
attr.attach_bpf_fd = prog_fd;
attr.attach_type = type;
+ attr.attach_flags = flags;
return sys_bpf(BPF_PROG_ATTACH, &attr, sizeof(attr));
}