summaryrefslogtreecommitdiffstats
path: root/include/linux/bpf.h
diff options
context:
space:
mode:
authorJakub Kicinski2017-12-28 03:39:09 +0100
committerDaniel Borkmann2017-12-31 16:12:23 +0100
commit675fc275a3a2d905535207237402c6d8dcb5fa4b (patch)
treeb1c1ae477626ab0a2695249713b5a5941f25042f /include/linux/bpf.h
parentnsfs: generalize ns_get_path() for path resolution with a task (diff)
downloadkernel-qcow2-linux-675fc275a3a2d905535207237402c6d8dcb5fa4b.tar.gz
kernel-qcow2-linux-675fc275a3a2d905535207237402c6d8dcb5fa4b.tar.xz
kernel-qcow2-linux-675fc275a3a2d905535207237402c6d8dcb5fa4b.zip
bpf: offload: report device information for offloaded programs
Report to the user ifindex and namespace information of offloaded programs. If device has disappeared return -ENODEV. Specify the namespace using dev/inode combination. CC: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r--include/linux/bpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 9a916ab34299..7810ae57b357 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -531,6 +531,8 @@ static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
int bpf_prog_offload_compile(struct bpf_prog *prog);
void bpf_prog_offload_destroy(struct bpf_prog *prog);
+int bpf_prog_offload_info_fill(struct bpf_prog_info *info,
+ struct bpf_prog *prog);
#if defined(CONFIG_NET) && defined(CONFIG_BPF_SYSCALL)
int bpf_prog_offload_init(struct bpf_prog *prog, union bpf_attr *attr);