diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-11-03 23:56:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 16:26:18 +0300 |
commit | bd601b6ada11fdfb9e277f24ad2eb54bc599156b (patch) | |
tree | 358763b441dfcc6d0a3a8a6e75878f1f08cb60e3 /include/linux | |
parent | ab3f0063c48c26c927851b6767824e35a716d878 (diff) | |
download | linux-bd601b6ada11fdfb9e277f24ad2eb54bc599156b.tar.xz |
bpf: report offload info to user space
Extend struct bpf_prog_info to contain information about program
being bound to a device. Since the netdev may get destroyed while
program still exists we need a flag to indicate the program is
loaded for a device, even if the device is gone.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index e45d43f9ec92..98bacd0fa5cc 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -506,6 +506,7 @@ static inline int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, int bpf_prog_offload_compile(struct bpf_prog *prog); void bpf_prog_offload_destroy(struct bpf_prog *prog); +u32 bpf_prog_offload_ifindex(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); |