diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2018-10-09 13:04:53 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-10-10 07:59:09 +0300 |
commit | 97396ff0bc2d31f8fcb29cbb57d2e0bbcb96d6c5 (patch) | |
tree | cbdbc3c7bfabbbda8a93384f818f4e435c5fac71 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 4f775448f4d79e2db5791fcc3aa708373497d7e6 (diff) | |
download | linux-97396ff0bc2d31f8fcb29cbb57d2e0bbcb96d6c5.tar.xz |
selftests/bpf: add XDP selftests for modifying and popping VLAN headers
This XDP selftest also contain a small TC-bpf component. It provoke
the generic-XDP bug fixed in previous commit.
The selftest itself shows how to do VLAN manipulation from XDP and TC.
The test demonstrate how XDP ingress can remove a VLAN tag, and how TC
egress can add back a VLAN tag.
This use-case originates from a production need by ISP (kviknet.dk),
who gets DSL-lines terminated as VLAN Q-in-Q tagged packets, and want
to avoid having an net_device for every end-customer on the box doing
the L2 to L3 termination.
The test-setup is done via a veth-pair and creating two network
namespaces (ns1 and ns2). The 'ns1' simulate the ISP network that are
loading the BPF-progs stripping and adding VLAN IDs. The 'ns2'
simulate the DSL-customer that are using VLAN tagged packets.
Running the script with --interactive, will simply not call the
cleanup function. This gives the effect of creating a testlab, that
the users can inspect and play with. The --verbose option will simply
request that the shell will print input lines as they are read, this
include comments, which in effect make the comments visible docs.
Reported-by: Yoel Caspersen <yoel@kviknet.dk>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions