Hi,
the goal of this patch set is to provide test coverage to offloading of L3
tunnels, with the emphasis on GRE in particular.
The first patch is a small improvement in how routes are parsed, so that later
on I can ask about IPv6 route flags and have tests about that.
Then there are three patches that introduce support for several netdevices
pertaining to IP-in-IP setups: dummy device, which serves as an underlay anchor
for many tests, and GRE and IPIP netdevices for tunnels themselves.
Finally there's a suite of patches that introduce the tests. First several
context managers for TestLib, and then eight patches, one per test recipe. Each
recipe then holds several actual tests to exercise the feature in a variety of
scenarios.
Regarding the context managers, those allow one to structure netdevice lifetimes
(and other artifacts) in a nicely scoped manner, such as:
with vrf(sw) as vrf_u, \
vrf(sw) as vrf_o:
# Do stuff with the VRFs.
with dummy(sw, vrf_u) as d, \
gre(sw, d, vrf_o,
local_ip="1.2.3.4", remote_ip="1.2.3.5") as g:
# Do stuff with D and G.
ping_test(...)
# Here, D and G are gone again, but the VRFs are still around for
# more tests.
Not all tests map nicely to that paradigm. E.g. often, routes exhibit this
nested lifetime, but sometimes one wants to shuffle a route around mid-operation
to test some corner case. But most of the time, resources tend to have nested
lifetime like this, and there the "with" statement is a natural fit.
Thanks,
Petr
Petr Machata (13):
HostAPI: Make SlaveMethods.get_routes() IPv6-aware
Support dummy devices
Support GRE devices
Support ipip devices
recipes: switchdev: TestLib: Add context managers
recipes: switchdev: Test GRE tunnels
recipes: switchdev: Test IPIP tunnels
recipes: switchdev: Test GRE in flat scenario
recipes: switchdev: Test alien traffic in GRE tunnel
recipes: switchdev: Test offload flag in IPIP routes
recipes: switchdev: Test decap-only GRE tunnels
recipes: switchdev: Test GRE migration
recipes: switchdev: Test a conflicting tunnel
lnst/Controller/RecipeParser.py | 8 +-
lnst/Controller/Task.py | 47 ++++++
lnst/Slave/NetConfigDevice.py | 79 +++++++++-
lnst/Slave/NetTestSlave.py | 3 +-
recipes/switchdev/TestLib.py | 152 +++++++++++++++++++
recipes/switchdev/ipip-001-gre-hier-basic.py | 197 +++++++++++++++++++++++++
recipes/switchdev/ipip-001-gre-hier-basic.xml | 12 ++
recipes/switchdev/ipip-002-ipip-hier-basic.py | 60 ++++++++
recipes/switchdev/ipip-002-ipip-hier-basic.xml | 57 +++++++
recipes/switchdev/ipip-003-gre-flat.py | 134 +++++++++++++++++
recipes/switchdev/ipip-003-gre-flat.xml | 12 ++
recipes/switchdev/ipip-004-gre-traps.py | 69 +++++++++
recipes/switchdev/ipip-004-gre-traps.xml | 12 ++
recipes/switchdev/ipip-005-offload-flag.py | 63 ++++++++
recipes/switchdev/ipip-005-offload-flag.xml | 12 ++
recipes/switchdev/ipip-006-gre-decap.py | 93 ++++++++++++
recipes/switchdev/ipip-006-gre-decap.xml | 136 +++++++++++++++++
recipes/switchdev/ipip-007-gre-migration.py | 96 ++++++++++++
recipes/switchdev/ipip-007-gre-migration.xml | 12 ++
recipes/switchdev/ipip-008-gre-conflict.py | 82 ++++++++++
recipes/switchdev/ipip-008-gre-conflict.xml | 12 ++
recipes/switchdev/ipip_common.py | 72 +++++++++
recipes/switchdev/ipip_common_topology.xml | 58 ++++++++
schema-recipe.rng | 24 +++
24 files changed, 1496 insertions(+), 6 deletions(-)
create mode 100644 recipes/switchdev/ipip-001-gre-hier-basic.py
create mode 100644 recipes/switchdev/ipip-001-gre-hier-basic.xml
create mode 100644 recipes/switchdev/ipip-002-ipip-hier-basic.py
create mode 100644 recipes/switchdev/ipip-002-ipip-hier-basic.xml
create mode 100644 recipes/switchdev/ipip-003-gre-flat.py
create mode 100644 recipes/switchdev/ipip-003-gre-flat.xml
create mode 100644 recipes/switchdev/ipip-004-gre-traps.py
create mode 100644 recipes/switchdev/ipip-004-gre-traps.xml
create mode 100644 recipes/switchdev/ipip-005-offload-flag.py
create mode 100644 recipes/switchdev/ipip-005-offload-flag.xml
create mode 100644 recipes/switchdev/ipip-006-gre-decap.py
create mode 100644 recipes/switchdev/ipip-006-gre-decap.xml
create mode 100644 recipes/switchdev/ipip-007-gre-migration.py
create mode 100644 recipes/switchdev/ipip-007-gre-migration.xml
create mode 100644 recipes/switchdev/ipip-008-gre-conflict.py
create mode 100644 recipes/switchdev/ipip-008-gre-conflict.xml
create mode 100644 recipes/switchdev/ipip_common.py
create mode 100644 recipes/switchdev/ipip_common_topology.xml
--
2.4.11