]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: use thoff instead of nhoff in BPF flow dissector
authorStanislav Fomichev <sdf@google.com>
Thu, 6 Dec 2018 04:40:47 +0000 (20:40 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 7 Dec 2018 21:38:12 +0000 (13:38 -0800)
commitf4b83190a208afa60e6e68de6d3e6b1e7a29b5d4
tree5dac8dfa52ee1037a7c9518618bc619dcb724a64
parent36387002ac80a14252a097e8635afcfe93271bee
selftests/bpf: use thoff instead of nhoff in BPF flow dissector

We are returning thoff from the flow dissector, not the nhoff. Pass
thoff along with nhoff to the bpf program (initially thoff == nhoff)
and expect flow dissector amend/return thoff, not nhoff.

This avoids confusion, when by the time bpf flow dissector exits,
nhoff == thoff, which doesn't make much sense.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/flow_dissector.c
tools/testing/selftests/bpf/bpf_flow.c