]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test
authorAlexei Starovoitov <ast@fb.com>
Thu, 15 Sep 2016 20:00:32 +0000 (13:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Sep 2016 14:13:07 +0000 (10:13 -0400)
commit6ecb897a2f406fc53d0d22f5b56654980142d2b6
tree6a13c4e0b613b960b60c1dfe46c6209b49ef1605
parent0b7cbbcc539c503b47d1df292a318972ea0a3a8f
samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test

the test creates 3 namespaces with veth connected via bridge.
First two namespaces simulate two different hosts with the same
IPv4 and IPv6 addresses configured on the tunnel interface and they
communicate with outside world via standard tunnels.
Third namespace creates collect_md tunnel that is driven by BPF
program which selects different remote host (either first or
second namespace) based on tcp dest port number while tcp dst
ip is the same.
This scenario is rough approximation of load balancer use case.
The tests check both traditional tunnel configuration and collect_md mode.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/tcbpf2_kern.c
samples/bpf/test_ipip.sh [new file with mode: 0755]