summaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-03-16remove spurious print statements from DVR testsNeale Ranns1-2/+0
Change-Id: I3b1c71b144b4760922a467086fcdb410cd225c57 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16IPv6 ND Router discovery data plane (VPP-1095)Juraj Sloboda3-3/+132
Add API call to send Router Solicitation messages. Save info from incoming Router Advertisement messages and notify listeners. Change-Id: Ie518b5492231e03291bd4c4280be4727bfecab46 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-03-15make test: Add VCL iperf3 testsDave Wallace1-36/+102
Change-Id: I101a44aa4913bee8d9a1aa37822e8e7e61c7aa1d Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-15IPIP: Linter on test_*.pyOle Troan3-137/+78
Change-Id: Icd491e382a2da0e5d55a673458605bc37e39b669 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-14make test: early core detection, code cleanupKlement Sekera3-10/+31
Change-Id: I503d69f902f1c8d3107fb3f2b9f31b0083ebb747 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-14IPIP: Add IP{v4,v6} over IP{v4,v6} configured tunnel support.Ole Troan3-25/+299
Change-Id: I166301c9e2388bae5f70ec0179d663a2703e27f5 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-14socket_test.sh: Don't hard code debug image with gdb.Dave Wallace1-3/+0
Change-Id: Idd6c175b9102c74621c027136ab4550821a23ecc Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-14make test: handle multiple failures in one caseKlement Sekera1-1/+4
Change-Id: I5451ddec4bfdede12653415f90bf991e81494033 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-14Improve l2_macs_events API to provide MAC move informationJohn Lo1-2/+7
Change mac_entry layout in l2_macs_event API message so the MAC entry can be either add, delete or move where the sw_if_index of an existing MAC entry changed. Also added a 8-bit flags field in mac_entry for any future expansion. Change-Id: I3bf9e1cf2556f2938202025a5d0772c2ce2fc99f Signed-off-by: John Lo <loj@cisco.com>
2018-03-14VOM: acl: Add support for acl ethertype unbind and dumpMohsin Kazmi1-0/+5
Change-Id: I667b9ccabe54c8f9cff5b1a2e63864965f5064f5 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-13Common form of fib-path reproting in dumpsNeale Ranns1-0/+17
Change-Id: I8f6fdbbeef2ac7e9fe5d87490ae5cba6e9a0b294 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-12NAT44: fix nat_not_translate_output_feature for ICMP (VPP-1191)Matus Fabian1-37/+42
Change-Id: I1552e1418b704fdf1f1fa2c0174313b9b82a37a3 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-09make test: Force VCL test timeouts to FAIL test.Dave Wallace1-2/+8
Change-Id: Ie8d3bcb9021d9272bd27dba35d30e5081023f061 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-09MPLS Unifom modeNeale Ranns7-414/+570
- support both pipe and uniform modes for all MPLS LSP - all API programming for output-labels requires that the mode (and associated data) is specificed - API changes in MPLS, BIER and IP are involved - new DPO [sub] types for MPLS labels to handle the two modes. Change-Id: I87b76401e996f10dfbdbe4552ff6b19af958783c Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-08VCL: Add full hoststack test option to socket_test.shDave Wallace1-7/+72
Change-Id: I3e5e179daa9d6f1c46adb85b05dd810bdd312054 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-07test: disable reassembly tests and system modification scriptDamjan Marion2-1/+0
One of basic requirements from day one for maek test is that it should run unpriviledged, so modifying system paremeters is unacceptable. Disabling script and reassembly tests as they need to be done in different way. Change-Id: I063c73eb82f2ebd7499e8adb1574a9fd2475fb5b Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-03-02make test: VCL extended test casesDave Wallace1-16/+194
- Add VCL cut thru uni-direction test over multiple sockets - Add VCL cut thru bi-direction test over multiple sockets - Add LDP cut thru uni-directional test over multiple sockets - Add LDP cut thru bi-directional test over multiple sockets - Add VCL thru host stack uni-direction test over multiple sockets - Add VCL thru host stack bi-direction test over multiple sockets - Add LDP thru host stack uni-directional test over multiple sockets - Add LDP thru host stack bi-directional test over multiple sockets - Fix validateResults to ensure worker_server process is killed if it still exists after running the test. Change-Id: I77ea9acef172667558dbcec23af1e4c72b29f376 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-02make test: add "EXTENDED_TESTS" to help output.Dave Wallace1-0/+1
Change-Id: I89540e93f3c8839bf6fc4363f4736e9c01d91927 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-02NAT44: interface output feature and service host direct access (VPP-1176)Matus Fabian1-0/+44
forwarding mode: session initiaded from service host - translate session initiaded from remote host - do not translate Change-Id: I48170ee8e4ad14d3d3083ee31a40ef8d10d6ff32 Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-016RD: Rewritten 6RD RFC5969 support.Ole Troan3-1/+309
Change-Id: Ic30fbcb2630f39e45345d7215babf5d7ed4b33a0 Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-01Fix ERSPAN encap to set EN bits in the header and add test caseJohn Lo2-2/+100
For ERSPAN encap, both bits in the EN field of the header should be set to indicate any VLAN tag in the original Ethernet frame is preserved. Added SPAN L2 test case where the mirrored packet output is a GRE ERSPAN tunnel. Change-Id: Ie7a40992a9278469c24aa6fa9e122b4505797d10 Signed-off-by: John Lo <loj@cisco.com>
2018-03-01make test: Add VCL LD_PRELOAD testsDave Wallace1-76/+117
- Refactor test code into VclTestCase object. - Add LDP cut thru and thru host stack tests. Change-Id: I2b16473df108004c79cc86fe1b7a789485b2dc5b Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-27make test: refactor vcl test casesDave Wallace2-89/+81
- Reduce replicated code in test cases - Configure separate namespace secrets for thru hoststack test case to validate namespace secret functionality. - Pass per-instance environment variables to Worker class init function. Change-Id: I3cd5d4538f105cbfb09671c4d761541b40714b8f Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-26Python: addressing PEP8 deprecationMarco Varlese1-2/+2
PEP8 has been deprecated and python users are being asked to migrate to pycodestyle. Change-Id: I52d5f7b2bf72156216a9966e8322ec58763f24d4 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-02-26update BIER scapy patch to match the scapy repo PRNeale Ranns1-4/+2
Change-Id: I4953b8444b49d1ad445c98a199ae8fd1635e24a5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-25SCTP: fix connection memory corruptionMarco Varlese1-2/+3
A bug was found when multiple SCTP connections were being opened to the same SCTP server. This patch addresses that problem, removing the use of the 'parent' pointer approach for sub-connection and saving instead within the sub-connection itself the ID representing its position. That facilitates pointer-arithmetic to be computed in the get_connection_from_transport(). Change-Id: Iaa1f4efc501590be1c93e42fd6fe3d6e02f635eb Signed-off-by: Marco Varlese <marco.varlese@suse.com>
2018-02-24LDP: Refactor epoll_ctl wrapper.Dave Wallace1-2/+2
- Add AF_UNIX transaction to sock_test_client/server echo test to verify mixed epoll ldp implementation. - Misc cleanup / refactoring of ldp code. - Fix LDP_DEBUG in test/socket_test.sh Change-Id: Ib524c824728f109007d8c4d07d74603b6c687902 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-22VOM: vhost-use interfacesNeale Ranns1-1/+29
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-22make test: tidy worker subprocess outputKlement Sekera1-1/+1
Change-Id: I362765a67762a59775863af12b712abb47445b3a Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-22make test: build test/ext when doing coverageKlement Sekera3-9/+4
This makes VAPI/VOM tests part of code coverage report. Change-Id: I66511b0a59880c2a64daecd37088268bdf5e1269 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-21make test: Add VCL thru hoststack test case.Dave Wallace1-8/+109
Change-Id: I7deb1fa4624cc1b7d7bc2f68034d4ce7589d4ef1 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-21make test: disable broken kubeproxy testsKlement Sekera1-2/+2
Change-Id: I8de2594596053a7331c81b342c63df2358548ca3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-19make test: Add VPP VCL cut-thru test.Dave Wallace2-0/+75
Change-Id: Id3ec196bfeb90b141123adee97f15d9712351680 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-19VCL: config api prefix using env var.Dave Wallace1-0/+3
- Configure vpp api prefix using VCL_API_PREFIX environment variable. - Prepend api prefix to vpp api filename when connecting to vpp. - Fix stale vcl_cfg ptr after heap allocation. - Cleanup misleading warning messages wrt. reading the vcl config file. Change-Id: I908c9b567ff4f6f0c21ae43a4627a1a3202a3290 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-19VOM: acl: Some necessary fixesMohsin Kazmi1-0/+7
It: 1. changes ethertype_rule_t to hold actual objects instead of reference to them. 2. fixes acl_ethertype 'update' function 3. fixes pretty-print of acl-list-update. 4. adds l3-acl update unit test. Change-Id: Iec72212806e96bd0574b46b563de79f0744cb248 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-17make test: add test framework debuggingKlement Sekera3-1/+58
New option TEST_DEBUG=1 turns on test framework debugging, which currently consists of printing difference in allocated objects/memory and also creates reference graphs for any unfreed VppPapiProvider/VPP objects - these take a lot of memory and thus should be freed regularly. Change-Id: I29db0c1341009d4b5c5df9222d14f3095883fd0f Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-17make test: detect child crashKlement Sekera1-7/+17
This change causes parent process to detect child crash in seconds instead of waiting for timeout to pass. Change-Id: Ib45e86b7fc97e687d99c554be4212aaeea781dcc Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-16Allow providers to override glean behaviourNeale Ranns3-1/+76
and update glean address on local interface MAC change Change-Id: I530826d60c7e9db2b0fa2d45754139d82c5ea807 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-02-15Revert "Allow interface types to override glean adjacency behaivour"Ole Trøan3-69/+1
This reverts commit 8b30e471df4d42214619e1d6c50cc8298426b45f. Change-Id: I99edb236eb0a7f8ba3fba333c3481a710ebcb59c Signed-off-by: Ole Troan <ot@cisco.com>
2018-02-15Allow interface types to override glean adjacency behaivourNeale Ranns3-1/+69
update the glean adj on a local interface MAC change Change-Id: Ia5c5cde424ed0fea3431532cc5abf22b364bbab5 Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-15Optimize GRE Tunnel and add support for ERSPAN encapJohn Lo4-13/+35
Change GRE tunnel to use the interface type where the same encap node is used as output node for all GRE tunnels, instead of having dedicated output and tx node for each tunnel. This allows for more efficient tunnel creation and deletion at scale tested at 1000's of GRE tunnels. Add support for ERSPAN encap as another tunnel type, in addition to the existing L3 and TEB types. The GRE ERSPAN encap supported is type 2 thus GRE encap need to include sequence number and GRE- ERSPAN tunnel can be created with user secified ERSPAN session ID. The GRE tunnel lookup hash key is updated to inclue tunnel type and session ID, in addition to SIP/DIP and FIB index. Thus, GRE-ERSPAN tunnel can be created, with the appropriate session ID, to be used as output interface for SPAN config to send mirrored packets. Change interface naming so that all GRE tunnels, irrespective of tunnel type, uses "greN" where N is the instance number. Removed interface reuse on tunnel creation and deletion to enable unfied tunnel interface name. Add support of user specified instance on GRE tunnel creation. Thus, N in the "greN" interface name can optionally be specified by user via CLI/API. Optimize GRE tunnel encap DPO stacking to bypass load-balance DPO node since packet output on GRE tunnel always belong to the same flow after 5-tupple hash. Change-Id: Ifa83915744a1a88045c998604777cc3583f4da52 Signed-off-by: John Lo <loj@cisco.com>
2018-02-14session: support local sessions and deprecate redirectsFlorin Coras1-0/+3
Memfd backed shared memory segments can only be negotiated over sockets. For such scenarios, the existing redirect mechanism that establishes cut-through sessions does not work anymore as the two peer application do not share such a socket. This patch adds support for local sessions, as opposed to sessions backed by a transport connection, in a way that is almost transparent to the two applications by reusing the existing binary api messages. Moreover, all segment allocations are now entirely done through the segment manager valloc, so segment overlaps due to independent allocations previously required for redirects are completely avoided. The one notable characteristic of local sessions (cut-through from app perspective) notification messages is that they carry pointers to two event queues, one for each app peer, instead of one. For transport-backed sessions one of the queues can be inferred but for local session they cannot. Change-Id: Ia443fb63e2d9d8e43490275062a708f039038175 Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-02-14make-test: use api custom-dump to reduce log size.Dave Wallace1-1/+1
- Reduce log size by using "api trace custom-dump" instead of "api trace dump". - Fix custom-dump output of cli_inband_t api message to include cli command being executed. New output: DBGvpp# api trace custom-dump /tmp/test vl_api_memclnt_delete_t: index: 2 handle: 0x301d8e10 SCRIPT: memclnt_create name vpp_api_test SCRIPT: sw_interface_dump all SCRIPT: control_ping SCRIPT: exec show run Old output: DBGvpp# api trace dump /tmp/test ---------- trace 0 ----------- vl_api_memclnt_delete_t: index: 33554432 handle: 0x108e1d3000000000 ---------- trace 1 ----------- vl_api_memclnt_create_t: name: vpp_api_test input_queue: 0x808e1d3000000000 context: 0 ctx_quota: 0 ---------- trace 2 ----------- vl_api_sw_interface_dump_t: _vl_msg_id: 61 client_index: 33554432 context: 0 name_filter_valid: 0 ---------- trace 3 ----------- vl_api_control_ping_t: _vl_msg_id: 712 client_index: 33554432 context: 0 ---------- trace 4 ----------- vl_api_cli_inband_t: _vl_msg_id: 715 client_index: 33554432 context: 0 length: 9 Change-Id: If740c861649a3a59b8cc7a777c23c3cf94b8ff87 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-13VOM: ACL: Add Object Model for acl ethertypeMohsin Kazmi1-0/+16
Change-Id: I2b572ebd4b7bb26381f127912a4cc0825c04fc34 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-12Improve MTU handlingNeale Ranns2-0/+36
- setting MTU on an interface updates the L3 max bytes too - value cached in the adjacency is also updated - MTU exceeded generates ICMP to sender Change-Id: I343ec71d8e903b529594c4bd0543f04bc7f370b3 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-02-09GBP pluginNeale Ranns2-0/+396
Group Base Policy (GBP) defines: - endpoints: typically a VM or container that is connected to the virtual switch/router (i.e. to VPP) - endpoint-group: (EPG) a collection of endpoints - policy: rules determining which traffic can pass between EPGs a.k.a a 'contract' Here, policy is implemented via an ACL. EPG classification for transit packets is determined by: - source EPG: from the packet's input interface - destination EPG: from the packet's destination IP address. Change-Id: I7b983844826b5fc3d49e21353ebda9df9b224e25 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-02-08classifier-based ACL: testcases for L2 ACLs + fix the enabling of outbound ↵Andrew Yourtchenko1-0/+633
L2 ACL There was no test coverage for the L2 ACL (other than indirect by means of ACL plugin tests), so the enabling of the outbound ACL got fumbled throughout the revisions of the refactoring. Fix both issues - the error and the lack of test coverage for L2 ACL. Change-Id: Ib7f42780ef84b4a4f70bd88d7319aeeda866cf06 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-02-08Geneve - reduce unit-test run timeGabriel Ganne1-2/+2
Reduce the number of tunnels created/destroyed to reduce the load of the tests without changing the code covered. These are functional tests, not performance tests. This reduced the test time down to 10s from 4 minutes on my machine. Change-Id: Ifcaddc0b0628a21392c5cb247196f56bc28a53a2 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
2018-02-08acl-plugin: add whitelisted ethertype mode (VPP-1163)Andrew Yourtchenko2-7/+103
Currently, ACL plugin largely does not care about the ethertypes other than 0x0800 (IPv4) and 0x86dd (IPv6), the only exception being 0x0806 (ARP), which is dealt with by the MACIP ACLs. The other ethertypes in L2 mode are just let through. This adds a new API message acl_interface_set_etype_whitelist, which allows to flip the mode of a given interface into "ethertype whitelist mode": the caller of this message must supply the two lists (inbound and outbound) of the ethertypes that are to be permitted, the rest of the ethertypes are dropped. The whitelisting for a given interface and direction takes effect only when a policy ACL is also applied. This operates on the same classifier node as the one used for dispatching the policy ACL, thus, if one wishes for most of the reasonable IPv4 deployments to continue to operate within the whitelist mode, they must permit ARP ethertype (0x0806) The empty list for a given direction resets the processing to allow the unknown ethertypes. So, if one wants to just permit the IPv4 and IPv6 and nothing else, one can add their ethertypes to the whitelist. Add the "show acl-plugin interface" corresponding outputs about the whitelists, vat command, and unittests. Change-Id: I4659978c801f36d554b6615e56e424b77876662c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-02-08acl-plugin: an elog-based tracing implementation for troubleshooting the ↵Andrew Yourtchenko1-0/+3
conn cleaner threads interactions This replaces some of the early-stage commented-out printf()s with an elog-based debug collector. It is aimed to be "better than nothing" initial implementation to be available in the field. It will be refined/updated based on use. This initial code is focused on the main/worker threads interactions, hence uses just the worker tracks. This code adds a developer debug CLI "set acl-plugin session table event-trace 1", which allows to gather the events pertaining to connection cleaning. The CLI is deliberately not part of the online help, as the express declaration that the semantics/trace levels, etc. are subject to change without notice. Change-Id: I3536309f737b73e50639cd5780822dcde667fc2c Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>