linux-stable/tools
Hangbin Liu cf99e2442b selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing
[ Upstream commit e8023b030c ]

For tc ip_proto filter, when we extract the flow via __skb_flow_dissect()
without flag FLOW_DISSECTOR_F_STOP_AT_ENCAP, we will continue extract to
the inner proto.

So for GRE + ICMP messages, we should not track GRE proto, but inner ICMP
proto.

For test mirror_gre.sh, it may make user confused if we capture ICMP
message on $h3(since the flow is GRE message). So I move the capture
dev to h3-gt{4,6}, and only capture ICMP message.

Before the fix:
]# ./mirror_gre.sh
TEST: ingress mirror to gretap (skip_hw)                            [ OK ]
TEST: egress mirror to gretap (skip_hw)                             [ OK ]
TEST: ingress mirror to ip6gretap (skip_hw)                         [ OK ]
TEST: egress mirror to ip6gretap (skip_hw)                          [ OK ]
TEST: ingress mirror to gretap: envelope MAC (skip_hw)              [FAIL]
 Expected to capture 10 packets, got 0.
TEST: egress mirror to gretap: envelope MAC (skip_hw)               [FAIL]
 Expected to capture 10 packets, got 0.
TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw)           [FAIL]
 Expected to capture 10 packets, got 0.
TEST: egress mirror to ip6gretap: envelope MAC (skip_hw)            [FAIL]
 Expected to capture 10 packets, got 0.
TEST: two simultaneously configured mirrors (skip_hw)               [ OK ]
WARN: Could not test offloaded functionality

After fix:
]# ./mirror_gre.sh
TEST: ingress mirror to gretap (skip_hw)                            [ OK ]
TEST: egress mirror to gretap (skip_hw)                             [ OK ]
TEST: ingress mirror to ip6gretap (skip_hw)                         [ OK ]
TEST: egress mirror to ip6gretap (skip_hw)                          [ OK ]
TEST: ingress mirror to gretap: envelope MAC (skip_hw)              [ OK ]
TEST: egress mirror to gretap: envelope MAC (skip_hw)               [ OK ]
TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw)           [ OK ]
TEST: egress mirror to ip6gretap: envelope MAC (skip_hw)            [ OK ]
TEST: two simultaneously configured mirrors (skip_hw)               [ OK ]
WARN: Could not test offloaded functionality

Fixes: ba8d39871a ("selftests: forwarding: Add test for mirror to gretap")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Petr Machata <pmachata@gmail.com>
Tested-by: Petr Machata <pmachata@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-11 14:14:51 +01:00
..
accounting
arch jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00
bpf tools: bpftool: fix format strings and arguments for jsonw_printf() 2020-01-27 14:51:05 +01:00
build perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2019-02-12 19:47:16 +01:00
cgroup
firewire
gpio tools: gpio: Correctly add make dependencies for gpio_utils 2019-12-01 09:16:09 +01:00
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2019-09-10 10:33:50 +01:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2019-07-31 07:27:02 +02:00
include tools lib: Fix builds when glibc contains strlcpy() 2020-02-05 14:43:34 +00:00
kvm/kvm_stat tools/kvm_stat: Fix kvm_exit filter name 2020-02-11 04:34:08 -08:00
laptop
leds
lib tools lib api fs: Fix gcc9 stringop-truncation compilation error 2020-02-24 08:34:45 +01:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool x86/decoder: Add TEST opcode to Group3-2 2020-02-24 08:34:50 +01:00
pci tools: PCI: Fix broken pcitest compilation 2019-11-24 08:21:08 +01:00
pcmcia
perf perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc 2020-03-05 16:42:22 +01:00
power tools/power/acpi: fix compilation error 2020-02-14 16:33:25 -05:00
scripts
spi
testing selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing 2020-03-11 14:14:51 +01:00
thermal/tmon
time
usb usbip: Fix unsafe unaligned pointer usage 2020-02-24 08:34:45 +01:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm/page-types.c: fix "kpagecount returned fewer pages than expected" failures 2019-12-05 09:20:59 +01:00
wmi
Makefile