470 Commits

Author SHA1 Message Date
Andrew Yourtchenko
de3682f510 acl-plugin: make test: add a test which deletes an interface with applied ACL
There was no test coverage for a scenario of an interface having an
ACL and that interface being deleted. Add a basic sanity test which
applies an ACL to an interface and then deletes that interface.

Change-Id: Ib6462e02cf69f1173125ac2481c608f68eb389ac
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-03-23 11:06:02 +00:00
Andrew Yourtchenko
0e89dfc916 acl-plugin: make test: shuffle applied ACLs as part of the tests
During the testing of 94f9a6de3f706243d138e05b63fef1d5c8174f6c
I realized there was no test coverage for the cases where
the ACLs are added then modified while having beein applied.

This change adds some simple shuffling to l2l3 ACL test set,
whereby after each of the ACLs being applied, a few extra ACLs
are applied at the front and the back of the list, and are changed
several times, the base for the changes being the set of all the
ACEs that are being applied previously.

After these few shuffles, the routine restores the applied ACLs
and proceeds to the test as usual.

Change-Id: Ieda2aa5b7963746d62484e54719309de9c1ee752
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-03-23 09:34:29 +01:00
Neale Ranns
5237c77cdd IGMP: coverity fixes and remove checks for scapy IGMPv3
Change-Id: Ic2eddc803f9ba8215e37388a686004830211cf6f
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
2018-03-23 03:55:54 +00:00
Matus Fabian
4d023c8c93 NAT44: interface output feature and dst NAT (VPP-1200)
Do not translate packet which go out via nat44-in2out-output and was tranlated
in nat44-out2in before. On way back forward packet to nat44-in2out node.

Change-Id: I934d69856f0178c86ff879bc691c9e074b8485c8
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-22 17:30:42 +00:00
Steven
9cd2d7a5a4 bond: Add bonding driver and LACP protocol
Add bonding driver to support creation of bond interface which composes of
multiple slave interfaces. The slave interfaces could be physical interfaces,
or just any virtual interfaces. For example, memif interfaces.

The syntax to create a bond interface is
create bond mode <lacp | xor | acitve-backup | broadcast | round-robin>

To enslave an interface to the bond interface,
enslave interface TenGigabitEthernet6/0/0 to BondEthernet0

Please see src/plugins/lacp/lacp_doc.md for more examples and additional
options.

LACP is a control plane protocol which manages and monitors the status of
the slave interfaces. The protocol is part of 802.3ad standard. This patch
implements LACPv1. LACPv2 is not supported.
To enable LACP on the bond interface, specify "mode lacp" when the bond
interface is created. The syntax to enslave a slave interface is the same as
other bonding modes.

Change-Id: I06581d3b87635972f9f0e1ec50b67560fc13e26c
Signed-off-by: Steven <sluong@cisco.com>
2018-03-21 21:02:15 +00:00
Neale Ranns
43b1f44571 UDP Encap counters
Change-Id: Ib5639981dca0b11b2d62acf2c0963cc95c380f70
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-21 20:24:34 +00:00
Klement Sekera
4c53313cd7 reassembly: feature/concurrency
This change makes ip reassembly an interface feature, while adding
concurrency support. Due to this, punt is no longer needed to test
reassembly.

Change-Id: I467669514ec33283ce935be0f1dd08f07684f0c7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-21 00:01:44 +00:00
Neale Ranns
2303cb181b FIB Interpose Source
The interpose source allows the source/provider to insert/interpose
a DPO in the forwarding chain of the FIB entry ahead of the forwarding
provided by the next best source. For example if the API source (i.e
the 'control plane') has provided an adjacency for forwarding, then
an interpose source (e.g. a monitoring service) couold interpose a
replicatte DPO to copy the traffic to another location AND forward
using the API's adjacency.
To use the interose feature an existing source (i.e FIB_SOURCE_PLUGIN_HI)
cn specifiy as a flag FIB_ENTRY_FLAG_INTERPOSE and provide a DPO to
interpose. One might also consider using interpose in conjunction with
FIB_ENTRY_FLAG_COVER_INHERIT to ensure the interpose object affects
all prefixes in the sub-tree.

Change-Id: I8b2737b985f8f7c08123406d0491881def347b52
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-20 23:59:06 +00:00
Jakub Grajciar
7b867a8e49 IGMP plugin
- host mode:
  igmp_listen - API to signal that the host has joined an (S,G)

- route mode:
  igmp_enable - API to enable the reception of host IGMP messages
  igmp_event - API to report the host join/leave from an (S,G)

Change-Id: Id180ec27dee617d33ab3088f5dcf6125d3aa9c8f
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
2018-03-19 15:53:19 +00:00
Neale Ranns
2bc940272e Scapy upgrade to 2.4.0.rc5
- many of the patches fd.io applies in test/patches/2.3.3 are now upstreamed in 2.4
- 2.4 adds support for IGMPv3 which is my main motivation for the upgrade

Change-Id: If2c0a524e3cba320b4a5d8cd07817c6ea2bf0c5a
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-19 13:09:45 +00:00
Neale Ranns
2ae2bc5380 Remove unnumbered configuration on interface delete
Change-Id: Iae5532c3d53e208831f3b2782242d9e59d367087
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-18 03:16:49 -07:00
Neale Ranns
039cbfe254 QoS recording and marking
Change-Id: Ie5a50def4ec1e4a3b3404a8b6ab9ec248bc16744
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16 20:28:50 +00:00
Juraj Sloboda
c03742346f IPv6 ND Router discovery control plane (VPP-1095)
Change-Id: I4b5b60e7c6f618bb935eab1e96a2e79bbb14f58f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
2018-03-16 20:07:51 +00:00
Neale Ranns
bce6b7bcf9 remove spurious print statements from DVR tests
Change-Id: I3b1c71b144b4760922a467086fcdb410cd225c57
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-16 05:08:24 -07:00
Juraj Sloboda
4b9669dc11 IPv6 ND Router discovery data plane (VPP-1095)
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-16 10:37:18 +00:00
Dave Wallace
816833f0e9 make test: Add VCL iperf3 tests
Change-Id: I101a44aa4913bee8d9a1aa37822e8e7e61c7aa1d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-15 15:12:12 +00:00
Ole Troan
46c1c11ba0 IPIP: Linter on test_*.py
Change-Id: Icd491e382a2da0e5d55a673458605bc37e39b669
Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-15 14:59:08 +00:00
Klement Sekera
05742265d4 make test: early core detection, code cleanup
Change-Id: I503d69f902f1c8d3107fb3f2b9f31b0083ebb747
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-14 19:14:54 +00:00
Ole Troan
298c69510f IPIP: Add IP{v4,v6} over IP{v4,v6} configured tunnel support.
Change-Id: I166301c9e2388bae5f70ec0179d663a2703e27f5
Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-14 14:06:02 +00:00
Dave Wallace
1c5ddbb22b socket_test.sh: Don't hard code debug image with gdb.
Change-Id: Idd6c175b9102c74621c027136ab4550821a23ecc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-14 13:34:32 +00:00
Klement Sekera
833e76151f make test: handle multiple failures in one case
Change-Id: I5451ddec4bfdede12653415f90bf991e81494033
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-03-14 13:33:45 +00:00
John Lo
e23c99ec00 Improve l2_macs_events API to provide MAC move information
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-14 12:07:48 +00:00
Mohsin Kazmi
04def7418b VOM: acl: Add support for acl ethertype unbind and dump
Change-Id: I667b9ccabe54c8f9cff5b1a2e63864965f5064f5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-03-14 09:09:01 +00:00
Neale Ranns
8145842bf2 Common form of fib-path reproting in dumps
Change-Id: I8f6fdbbeef2ac7e9fe5d87490ae5cba6e9a0b294
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-03-13 16:48:23 +00:00
Matus Fabian
2aad876be8 NAT44: fix nat_not_translate_output_feature for ICMP (VPP-1191)
Change-Id: I1552e1418b704fdf1f1fa2c0174313b9b82a37a3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-03-12 10:21:42 +00:00
Dave Wallace
fef3f7bd0a make test: Force VCL test timeouts to FAIL test.
Change-Id: Ie8d3bcb9021d9272bd27dba35d30e5081023f061
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-09 18:12:32 +00:00
Neale Ranns
31ed744076 MPLS Unifom mode
- 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-09 11:59:58 +00:00
Dave Wallace
fbbb07c33e VCL: Add full hoststack test option to socket_test.sh
Change-Id: I3e5e179daa9d6f1c46adb85b05dd810bdd312054
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-08 19:08:55 +00:00
Damjan Marion
7139e757b1 test: disable reassembly tests and system modification script
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-07 12:00:59 +00:00
Dave Wallace
d85075e6e4 make test: VCL extended test cases
- 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-02 19:22:53 +00:00
Dave Wallace
05e4f9b377 make test: add "EXTENDED_TESTS" to help output.
Change-Id: I89540e93f3c8839bf6fc4363f4736e9c01d91927
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-02 19:22:10 +00:00
Matus Fabian
204591d1bd NAT44: interface output feature and service host direct access (VPP-1176)
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-02 08:48:40 +00:00
Ole Troan
6ee4051139 6RD: Rewritten 6RD RFC5969 support.
Change-Id: Ic30fbcb2630f39e45345d7215babf5d7ed4b33a0
Signed-off-by: Ole Troan <ot@cisco.com>
2018-03-01 14:37:11 +00:00
John Lo
2bf8b8154d Fix ERSPAN encap to set EN bits in the header and add test case
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-01 13:09:57 +00:00
Dave Wallace
9f11c0108b make test: Add VCL LD_PRELOAD tests
- 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-03-01 02:49:22 +00:00
Dave Wallace
42996c0fcd make test: refactor vcl test cases
- 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-27 18:23:05 +00:00
Marco Varlese
767fcb6742 Python: addressing PEP8 deprecation
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-26 12:05:10 +00:00
Neale Ranns
cbcc84ba66 update BIER scapy patch to match the scapy repo PR
Change-Id: I4953b8444b49d1ad445c98a199ae8fd1635e24a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-02-26 11:29:22 +00:00
Marco Varlese
04e5d64c45 SCTP: fix connection memory corruption
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-25 19:33:48 +00:00
Dave Wallace
3ee1fe1608 LDP: Refactor epoll_ctl wrapper.
- 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-24 18:11:16 +00:00
Neale Ranns
4ef4226282 VOM: vhost-use interfaces
Change-Id: Iee1574d1f0f081ccc4a90fd9825a0b5e254aa642
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-02-22 19:57:08 +00:00
Klement Sekera
de0203edd2 make test: tidy worker subprocess output
Change-Id: I362765a67762a59775863af12b712abb47445b3a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-22 19:32:18 +00:00
Klement Sekera
cae7134a8c make test: build test/ext when doing coverage
This makes VAPI/VOM tests part of code coverage report.

Change-Id: I66511b0a59880c2a64daecd37088268bdf5e1269
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-22 17:55:39 +00:00
Dave Wallace
a67a03e324 make test: Add VCL thru hoststack test case.
Change-Id: I7deb1fa4624cc1b7d7bc2f68034d4ce7589d4ef1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-21 20:33:07 +00:00
Klement Sekera
fa5fb2d162 make test: disable broken kubeproxy tests
Change-Id: I8de2594596053a7331c81b342c63df2358548ca3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-02-21 16:36:17 +00:00
Dave Wallace
cfcf2f476a make test: Add VPP VCL cut-thru test.
Change-Id: Id3ec196bfeb90b141123adee97f15d9712351680
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-19 21:51:59 +00:00
Dave Wallace
b5a86eed8b VCL: config api prefix using env var.
- 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-19 14:57:39 +00:00
Mohsin Kazmi
d91d14095b VOM: acl: Some necessary fixes
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-19 10:09:49 +00:00
Klement Sekera
ebbaf55e09 make test: add test framework debugging
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-17 20:42:49 +00:00
Klement Sekera
545be52c79 make test: detect child crash
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-17 20:42:49 +00:00