]> git.ipfire.org Git - thirdparty/iproute2.git/commit
bpf: keep parsed program mode in struct bpf_cfg_in
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 24 Nov 2017 02:11:59 +0000 (18:11 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 26 Nov 2017 19:57:57 +0000 (11:57 -0800)
commitf20ff2f1955237a67af7849466b7b8681a45cd35
tree98b3653c4e6f360020aa8803e225b49ab21e812a
parent658cfebc27f20dd006659b5e90d1585b300eba85
bpf: keep parsed program mode in struct bpf_cfg_in

bpf_parse() will parse command line arguments to find out the
program mode.  This mode will later be needed at loading time.
Instead of keeping it locally add it to struct bpf_cfg_in,
this will allow splitting parsing and loading stages.

enum bpf_mode has to be moved to the header file, because C
doesn't allow forward declaration of enums.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
include/bpf_util.h
lib/bpf.c