selftests: bpf: add test_lwt_ip_encap selftest
authorPeter Oskolkov <posk@google.com>
Wed, 13 Feb 2019 19:53:41 +0000 (11:53 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 14 Feb 2019 02:27:55 +0000 (18:27 -0800)
commit0fde56e4385b09a67dd25321f607d4c942282de2
treeb00d597241213e1ddaab1185700262bb7c6abcef
parent755db4771c96cf49e60e188a2c90c4d2a1ea063d
selftests: bpf: add test_lwt_ip_encap selftest

This patch adds a bpf self-test to cover BPF_LWT_ENCAP_IP mode
in bpf_lwt_push_encap.

Covered:
- encapping in LWT_IN and LWT_XMIT
- IPv4 and IPv6

A follow-up patch will add GSO and VRF-enabled tests.

Signed-off-by: Peter Oskolkov <posk@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_lwt_ip_encap.sh [new file with mode: 0755]