diff options
author | Stanislav Fomichev | 2019-01-28 17:53:54 +0100 |
---|---|---|
committer | Daniel Borkmann | 2019-01-29 01:08:29 +0100 |
commit | b7a1848e8398b8396c990279e6a10272d818577e (patch) | |
tree | 1e7c535a6ab23d1e4e1f2d4a1a145a8fb6603da9 /net/core/filter.c | |
parent | net/flow_dissector: move bpf case into __skb_flow_bpf_dissect (diff) | |
download | kernel-qcow2-linux-b7a1848e8398b8396c990279e6a10272d818577e.tar.gz kernel-qcow2-linux-b7a1848e8398b8396c990279e6a10272d818577e.tar.xz kernel-qcow2-linux-b7a1848e8398b8396c990279e6a10272d818577e.zip |
bpf: add BPF_PROG_TEST_RUN support for flow dissector
The input is packet data, the output is struct bpf_flow_key. This should
make it easy to test flow dissector programs without elaborate
setup.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r-- | net/core/filter.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 8e587dd1da20..8ce421796ac6 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -7711,6 +7711,7 @@ const struct bpf_verifier_ops flow_dissector_verifier_ops = { }; const struct bpf_prog_ops flow_dissector_prog_ops = { + .test_run = bpf_prog_test_run_flow_dissector, }; int sk_detach_filter(struct sock *sk) |