summaryrefslogtreecommitdiffstats
path: root/test/test_vxlan.py
AgeCommit message (Collapse)AuthorFilesLines
2023-11-03tests: refactor asf framework codeDave Wallace1-1/+2
- Make framework.py classes a subset of asfframework.py classes - Remove all packet related code from asfframework.py - Add test class and test case set up debug output to log - Repatriate packet tests from asf to test directory - Remove non-packet related code from framework.py and inherit them from asfframework.py classes - Clean up unused import variables - Re-enable BFD tests on Ubuntu 22.04 and fix intermittent test failures in echo_looped_back testcases (where # control packets verified but not guaranteed to be received during test) - Re-enable Wireguard tests on Ubuntu 22.04 and fix intermittent test failures in handshake ratelimiting testcases and event testcase - Run Wiregard testcase suites solo - Improve debug output in log.txt - Increase VCL/LDP post sleep timeout to allow iperf server to finish cleanly. - Fix pcap history files to be sorted by suite and testcase and ensure order/timestamp is correct based on creation in the testcase. - Decode pcap files for each suite and testcase for all errors or if configured via comandline option / env var - Improve vpp corefile detection to allow complete corefile generation - Disable vm vpp interfaces testcases on debian11 - Clean up failed unittest dir when retrying failed testcases and unify testname directory and failed linknames into framwork functions Type: test Change-Id: I0764f79ea5bb639d278bf635ed2408d4d5220e1e Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-05-10tests: replace pycodestyle with blackKlement Sekera1-98/+138
Drop pycodestyle for code style checking in favor of black. Black is much faster, stable PEP8 compliant code style checker offering also automatic formatting. It aims to be very stable and produce smallest diffs. It's used by many small and big projects. Running checkstyle with black takes a few seconds with a terse output. Thus, test-checkstyle-diff is no longer necessary. Expand scope of checkstyle to all python files in the repo, replacing test-checkstyle with checkstyle-python. Also, fixstyle-python is now available for automatic style formatting. Note: python virtualenv has been consolidated in test/Makefile, test/requirements*.txt which will eventually be moved to a central location. This is required to simply the automated generation of docker executor images in the CI. Type: improvement Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8 Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-03-09vxlan: add l2 mode testArtem Glazychev1-0/+59
The same test for v22.02 was already merged: https://gerrit.fd.io/r/c/vpp/+/35390 Type: improvement Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: I214f6fb5b63d97ca4afe3b10fd2d3e3410b5a6e4
2021-05-13tests: move test source to vpp/testDave Wallace1-0/+421
- Generate copyright year and version instead of using hard-coded data Type: refactor Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I6058f5025323b3aa483f5df4a2c4371e27b5914e
2021-03-29tests: move vxlan tests to src/vnet/vxlan/testsDave Wallace1-421/+0
- Refactor make test code to be co-located with the vpp feature source code Type: test Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I66379dfe671628e39dfc9685c4fd70fa0e566f6f
2021-02-05vxlan: add udp-port configuration supportArtem Glazychev1-30/+117
Type: improvement Signed-off-by: Artem Glazychev <artem.glazychev@xored.com> Change-Id: Ie30d51ab4df5599b52f7335f863b930cd69dbdc1
2021-01-14vxlan: Protect against tunnel config where source is not localNeale Ranns1-0/+48
Type: fix If a tunnel's source is not local then post encap VPP will attempt to receive (via ip4-local) that packet, things go wrong from there. The fix is when stacking the encap forwarding don't accept a receive DPO. This approach is taken, rather than rejecting bad tunnels, because the 'local-ness' of the tunnel's source can change and we can't reject tunnels that were once correctly configured but are no longer. the user will quickly discover their mistake as traffic won't pass. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I46198422e321606e8baba003112e978a526b4c2f
2020-06-08vxlan: Fixed checksum caclculation offsetVladimir Isaev1-1/+2
VXLAN uses csum_offload for IPv6 packets. But without gso node we have csum calculated only for inner packet. This patch adds support for outer header csum calculation. Checksum for inner packet should be calculated before interface-output node (for example in vxlan node). Type: fix Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Signed-off-by: Vladimir Isaev <visaev@netgate.com> Change-Id: Ica68429ede4426293769207cd83c791ebe72fe56
2020-05-03tests: vpp_interface remove deprecated packed propertiesPaul Vinciguerra1-10/+6
The api no longer requires packed ip addresses. Type: test Change-Id: If67365d86b7c3189f871a58234e99f9c8f875371 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2020-04-10geneve: Fix the byte swapping for the VNINeale Ranns1-2/+4
Type: fix - swipe away the vomit indent left last time. - add tests for VNIs > 16bit Change-Id: I2d1f591bfb9d7a18996c38969365a509168d4193 Signed-off-by: Neale Ranns <nranns@cisco.com>
2020-03-16vxlan: vxlan/vxlan.api API cleanupJakub Grajciar1-52/+66
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I7f6f37ec6eed780322e2488d6eb0f5681945ba09 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2019-12-14tests: changes for scapy 2.4.3 migrationsnaramre1-1/+2
Type: fix Change-Id: I7e041b666dabd90df23a920a1f1d99db4c10ddfe Signed-off-by: snaramre <snaramre@cisco.com>
2019-11-08tests: python3 use byte strings in raw()Ole Troan1-1/+1
Raw('\xaf) and Raw(b'\xaf) are two quite different things in python 2 versus 3. In most cases this didn't make a difference, apart from those cases where length of payload actually mattered. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I3cba5c1486e436a3ca8aa10a7b393da75aa9f6b9
2019-11-05misc: Fix python scripts shebang lineRenato Botelho do Couto1-1/+1
Type: fix Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python' as a valid shebang line. It requires scripts to explicitly chose between python2 or python3. Change all to use python3 as suggested by Paul Vinciguerra. Depends-On: https://gerrit.fd.io/r/23170 Signed-off-by: Renato Botelho do Couto <renato@netgate.com> Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
2019-06-18fib: fib api updatesNeale Ranns1-8/+13
Enhance the route add/del APIs to take a set of paths rather than just one. Most unicast routing protocols calcualte all the available paths in one run of the algorithm so updating all the paths at once is beneficial for the client. two knobs control the behaviour: is_multipath - if set the the set of paths passed will be added to those that already exist, otherwise the set will replace them. is_add - add or remove the set is_add=0, is_multipath=1 and an empty set, results in deleting the route. It is also considerably faster to add multiple paths at once, than one at a time: vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.11 100000 routes in .572240 secs, 174751.80 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.12 100000 routes in .528383 secs, 189256.54 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.13 100000 routes in .757131 secs, 132077.52 routes/sec vat# ip_add_del_route 1.1.1.1/32 count 100000 multipath via 10.10.10.14 100000 routes in .878317 secs, 113854.12 routes/sec vat# ip_route_add_del 1.1.1.1/32 count 100000 multipath via 10.10.10.11 via 10.10.10.12 via 10.10.10.13 via 10.10.10.14 100000 routes in .900212 secs, 111084.93 routes/sec Change-Id: I416b93f7684745099c1adb0b33edac58c9339c1a Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Ole Troan <ot@cisco.com> Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-11Tests: Refactor tearDown show command logging, add lifecycle markers.Paul Vinciguerra1-5/+6
This change adds a consistent interface for adding test-specific show commands to log.txt. It also adds log markers for the execution of setUp[Class], tearDown[Class] in the logs. Change-Id: I7d42e396e594a59e866a7d55dac0af25548e657a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-04-10Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.Paul Vinciguerra1-0/+4
Continuation/Part 2 of https://gerrit.fd.io/r/#/c/17092/ Change-Id: Id0122d84eaf2c05d29e5be63a594d5e528ee7c9a Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-12Tests: Raise exception, don't raise string.Paul Vinciguerra1-1/+1
This was deprecated ~ python 2.4, and causes a TypeError as sideEffect. >>> raise "foo" Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: exceptions must derive from BaseException Change-Id: I4117b6d60ae896eaa1ef2a73a323d8d241f8c3a7 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-03-11vpp_papi_provider: Remove more wrapper functions.Ole Troan1-35/+30
Split this work up into pieces. Please don't add new wrappers to vpp_papi_provider.py. Change-Id: I0f8f2afc4cd2bba07ea70ddecea2d7319f7b2e10 Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-10Test framework: StringIO fixes for Python3Ole Troan1-18/+2
Add 2/3 support to binarytomac and mactobinary and move to vpp_mac.py Change-Id: I3dc7e4a24486aee22140c781aae7e44e58935877 Signed-off-by: Ole Troan <ot@cisco.com>
2018-08-17VPP-1392: VXLAN fails with IP fragmentationOle Troan1-1/+46
Not only is it wasteful to send all fragments back through ip4-lookup, but it doesn't work with tunnel mechanisms that don't have IP enabled on their payload side. Change-Id: Ic92d95982dddaa70969a2a6ea2f98edec7614425 Signed-off-by: Ole Troan <ot@cisco.com>
2018-06-21test:vxlan over ipv6 testsEyal Bari1-1/+5
Change-Id: Id910db0e3a07ecc6f469e2f0d1e97f39ba48cc60 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-12-13make "test-all" target pass againGabriel Ganne1-1/+1
The "test-all" target is still never called as part of any continuous test (as it probably should) but at least it can now be expected to succeed. VXLAN-GPE: * decapsulate Ethernet to "l2-input" instead of "ethernet-input" otherwise the inner mac address get checked against the interface one (external) and packet gets dropped (mac mismatch) * set packet input sw_if_index to unicast vxlan tunnel for learning TEST: * VXLAN: * reduce the number of share tunnels: => reduce test duration by half => no functional change * VXLAN-GPE: * fix test TearDown() cli: command is "show vxlan-gpe" only * remove vxlan-gpe specific tests as the were a duplicated of the BridgeDomain one and already inherited. * disable test_mcast_rcv() and test_mcast_flood() tests * P2PEthernetAPI: * remove test: "create 100k of p2p subifs" there already is a "create 1k p2p subifs" so this one is a load test and not a unit test. See: lists.fd.io/pipermail/vpp-dev/2017-November/007280.html Change-Id: Icafb83769eb560cbdeb3dc6d1f1d3c23c0901cd9 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2017-04-07VXLAN/TEST:validate vxlan del reply has valid sw_if_indexEyal Bari1-1/+3
Change-Id: Icf7420b7ee212e9341f63f005dc287d019fd8e4c Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-03-29VXLAN:validate mcast encapsulation ip/macEyal Bari1-3/+9
Change-Id: I399257e372f83f4d12dc7873617980af6e46a9bc Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-25test adding and removing shared mcast dst tunnelsEyal Bari1-8/+39
Adds and delete 2000 multicast vxlan tunnels sharing group address to test mcast tunnel ref count code as part of the stability stage (before starting traffic tests) Change-Id: Ic50cedf80471e14431feb493104eff5ea7d5d429 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-11vxlan unit test - minor fixesEyal Bari1-20/+19
moved ip4_range and ip4n_range to util added n_ucast_tunnels Change-Id: I9140c4e54a0636d90a97db03da842f5183319af5 Signed-off-by: Eyal Bari <ebari@cisco.com>
2017-01-06Added basic tests for multicast vxlan tunnelsEyal Bari1-14/+107
unicast flood test - test headend replication multicast flood test - test flooding when a multicast vxlan tunnel is present in BD multicast receive test - verify that multicast packet are received on their corresponding unicast tunnels and that unmatched packets are dropped all tests run after adding and removing 200 mcast tunnels to test stability Change-Id: Ia05108c39ac35096a5b633cf52480a9ba87c14df Signed-off-by: Eyal Bari <ebari@cisco.com>
2016-12-13make test: Use VXLAN built in scapy 2.3.3Matej Klotton1-2/+6
- fix documentation issues. - fix mpls test. Change-Id: Ieef6b4b5e4aca99e89bd03e45a991be89d42adba Signed-off-by: Matej Klotton <mklotton@cisco.com>
2016-12-05make test: fix missing log/packet messagesKlement Sekera1-2/+1
Change-Id: Idb3119792943664748c4abc3829ad723f4156dfe Signed-off-by: Klement Sekera <ksekera@cisco.com>
2016-10-26refactor test frameworkKlement Sekera1-54/+52
Change-Id: I31da3b1857b6399f9899276a2d99cdd19436296c Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com> Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2016-10-03test: new test infrastructureDamjan Marion1-0/+102
Change-Id: I73ca19c431743f6b39669c583d9222a6559346ef Signed-off-by: Jan Gelety <jgelety@cisco.com> Signed-off-by: Juraj Sloboda <jsloboda@cisco.com> Signed-off-by: Stefan Kobza <skobza@cisco.com> Signed-off-by: Matej Klotton <mklotton@cisco.com> Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com> Signed-off-by: Damjan Marion <damarion@cisco.com>