bpf/flow_dissector: don't adjust nhoff by ETH_HLEN in BPF_PROG_TEST_RUN
authorStanislav Fomichev <sdf@google.com>
Mon, 22 Apr 2019 15:55:52 +0000 (08:55 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 23 Apr 2019 16:36:35 +0000 (18:36 +0200)
commit02ee0658362d3713421851bb7487af77a4098bb5
treeda9f76ad09a765c5818de87d3b4e5401725ed49d
parentfe993c646831105f579976fec28d1842608bd551
bpf/flow_dissector: don't adjust nhoff by ETH_HLEN in BPF_PROG_TEST_RUN

Now that we use skb-less flow dissector let's return true nhoff and
thoff. We used to adjust them by ETH_HLEN because that's how it was
done in the skb case. For VLAN tests that looks confusing: nhoff is
pointing to vlan parts :-\

Warning, this is an API change for BPF_PROG_TEST_RUN! Feel free to drop
if you think that it's too late at this point to fix it.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/bpf/test_run.c
tools/testing/selftests/bpf/prog_tests/flow_dissector.c