libbpf: add ifindex to enable offload support

BPF programs currently can only be offloaded using iproute2. This
patch will allow programs to be offloaded using libbpf calls.

Signed-off-by: David Beckett <david.beckett@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
David Beckett
2018-05-16 14:02:49 -07:00
committed by Daniel Borkmann
parent be2d04d11f
commit f0307a7ed1
4 changed files with 20 additions and 3 deletions

View File

@@ -259,6 +259,7 @@ struct bpf_prog_load_attr {
const char *file;
enum bpf_prog_type prog_type;
enum bpf_attach_type expected_attach_type;
int ifindex;
};
int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,