diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-04-22 18:55:45 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-04-23 19:36:34 +0300 |
commit | 7b8a1304323b35bbf060e0d29691031056836b73 (patch) | |
tree | 19d54fc05d3c50660c9c7277e11ebda3665e12cf /net/ethernet | |
parent | 089b19a9204fc090793d389a265f54124eacb05d (diff) | |
download | linux-7b8a1304323b35bbf060e0d29691031056836b73.tar.xz |
bpf: when doing BPF_PROG_TEST_RUN for flow dissector use no-skb mode
Now that we have bpf_flow_dissect which can work on raw data,
use it when doing BPF_PROG_TEST_RUN for flow dissector.
Simplifies bpf_prog_test_run_flow_dissector and allows us to
test no-skb mode.
Note, that previously, with bpf_flow_dissect_skb we used to call
eth_type_trans which pulled L2 (ETH_HLEN) header and we explicitly called
skb_reset_network_header. That means flow_keys->nhoff would be
initialized to 0 (skb_network_offset) in init_flow_keys.
Now we call bpf_flow_dissect with nhoff set to ETH_HLEN and need
to undo it once the dissection is done to preserve the existing behavior.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/ethernet')
0 files changed, 0 insertions, 0 deletions