5647 Commits

Author SHA1 Message Date
Mohsin Kazmi
d40c3e652d gbp: Add support for flow hash profile
Change-Id: Ibea87f21b3403045cc0d865903b94396fe670e79
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-29 12:33:54 +00:00
Matus Fabian
ad1f3e1482 NAT: syslog - sessions logging (VPP-1139)
Change-Id: I6e0b7cf37c1a9ac66f8ac011db29504e57844ee9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-11-29 11:28:29 +00:00
Florin Coras
2eb42e7061 test: use smaller timeouts for vcl/ldp tests
Change-Id: Idebd110cbf5f0ddc5d9da5a1975b5d278825d131
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 11:27:47 +00:00
Florin Coras
47c40e2d94 vcl: basic support for apps that fork
- intercept fork and register a new worker with vpp
- share sessions between parent and forked child
- keep binary api state per worker

Change-Id: Ib177517d661724fa042bd2d98d18e777056352a2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 11:27:18 +00:00
Neale Ranns
743ee3e125 GRE: fix VRF unit-tests
Change-Id: Ic6d011065bf062a84fdccdb1726ed3e5ed99cfbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-11-29 09:40:19 +00:00
Pavel Kotucek
609e1210c6 VPP-1507: Added binary api to dump configured ip_punt_redirect
Change-Id: I790f7785e183cc9aaffd5b593617c4e12a32e20d
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-11-29 08:49:17 +00:00
Florin Coras
dfe4cf48ae ldp: basic multiworker support
Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 08:43:16 +00:00
Florin Coras
8be6c40cf3 vppinfra: add pool_dup macro
Change-Id: I192e340bd072d27bf6ddc382347ad5c3ca411bad
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-29 08:43:00 +00:00
Jon Loeliger
330bf9387b Export ethernet/mac_address.h as part of API installation.
Change-Id: Ibb6d648948f990280e3cb048ce907f01e5c32b12
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-11-29 08:29:34 +00:00
Klement Sekera
b8c72a4a8d make test: create virtualenv under /test/
instead of using build-root, use /test/venv directory for virtualenv
similarly, don't pollute build-root with test-built binaries

Change-Id: I1e63c04037eaee718b27b34ef16c9eb0252afa53
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 08:22:10 +00:00
Kingwel Xie
040950a59d dpdk-ipsec-nodes multiarch: nodes are formatted in VLIB_NODE_FN style
crypto-input,esp encrypt/decrypt are indicated in CMakefiles

Change-Id: I18ba851c1d4e5633d07c5de61cdaeae938e94982
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-29 08:20:40 +00:00
Damjan Marion
14033aaebd dpdk: bump to DPDK 18.11
Change-Id: Ib6458e56f546bb5b11c23aa5e1afe0f4b5011c08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-29 08:12:56 +00:00
Ole Troan
a173a7a07b MAP: Use bool type in map.api instead of u8.
Change-Id: I4e40bb6d6bf274a27892053f37aeeb81a7278965
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29 07:42:23 +00:00
Ole Troan
58914254f0 vppapigen: Fix python3 compatibility
Change-Id: I9124fcb755ba43fd8f44712f0940f351c460c5b0
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-29 07:42:03 +00:00
Ole Troan
53fffa1db7 API: Add support for type aliases
Previously all types are compound. This adds support for aliases,
so one can do things like:

typedef u32 interface_index;

or
typedef u8 ip4_address[4];

Change-Id: I0455cad0123fc88acb491d2a3ea2725426bdb246
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 07:39:22 +00:00
Klement Sekera
4f10db3173 ipsec: move ipsec defs to ipsec.h
Change-Id: Ia3dcd98edb6188deb96a3a99d831e71b2ffa0060
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-29 07:20:45 +00:00
Paul Vinciguerra
555ea9a105 VPP-1508: vpp_transport_socket.py fix import
Import queue in an py2-py3 compatable way.

Change-Id: I83f166a959c4ee55438e3997edbcb596dc72059f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-29 07:18:16 +00:00
Sirshak Das
19515acddc Use acquire/release ordering when accessing svm_fifo shared variable cursize
Improves TCP iperf3 performance by ~3% on AArch64.

Change-Id: I1e51bd8403ba45ec6af4c2f96b95e884c1ae0d67
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
2018-11-28 20:50:21 +00:00
Paul Vinciguerra
5785e89ba1 vpp_papi: Reserved keywords.
'async' and 'await' are reserved keywords starting with Python 3.7.

This change is necessary to support VPP-1508.

Change-Id: Iba2b3aef98a0ecaabc1622719b364f8f4ab5d5a3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28 16:34:30 +00:00
Damjan Marion
068ec3809c pmalloc: fix shared hugepage backed mmap on older kernels
Usual suspect, CentOS 7. Kernel doens't like MAP_HUGETLB to be
set together with MAP_SHARED even if we are mapping hugetlb backed file.

Change-Id: I6bb0fe14e9e42286963bb648840279942b2e8307
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28 16:34:27 +00:00
Damjan Marion
940d1c8a18 dpdk: allow interface name to be specified from startup.conf
Example:

dpdk {
    dev 0000:01:00.0 { name eth0 }
    dev 0000:02:00.0 { name eth1 }
}

Change-Id: I11e60e969a7e3548c99ac0c0c3531767819cb157
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28 14:12:22 +00:00
Damjan Marion
8ebd7929bd cmake: display warning and continue if dpdk not present
Change-Id: I5cb2619444507a159c42ac8401800e90b6541a20
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28 10:46:50 +01:00
Simon Zhang
5a5a86987b Remove useless prefetch in ip4-rewrite node
Prefetching first 2 packets' header is useless cause of the prefetching
action is not done before using the packets.

There's no performance drop in Xeon platform and slightly performance
gain in Atom platform after rmoving the prefetch.

Change-Id: Ib4b074af20d7cd5053aecc7147b162141aec31f5
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
2018-11-28 08:43:46 +00:00
Paul Vinciguerra
7e713f133a vpp_papi: Use new style classes.
Python2 defaults to old style classes to maintain compatability with python 2.1.
Moving to new style classes will ensure consistent behavior across interpreters.

Change-Id: I89493d608d1edb63989000c17a9566a97785a4aa
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28 07:30:40 +00:00
Paul Vinciguerra
526ad04e01 test/remote_test.py: Fix missing import
Change-Id: I192c33d36f43ae2df0dda509e118f2b920d561ac
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-28 07:28:28 +00:00
Florin Coras
30e273b305 ldp: sid to fd mapper for apps with multiple workers
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-11-27 22:55:36 +00:00
Kingwel Xie
dbc34b8906 pmalloc: correct format_pmalloc_map u32 index overrun bug
Change-Id: I95ba4eab6e2154ef33a479450b997c8317db3a92
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-27 17:58:41 +00:00
jdenisco
ad4426e565 docs: Add more on trex
Change-Id: Ifb5eabe30e1b0ba911ddf455573cc346ff4bec85
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-11-27 15:48:06 +00:00
Alexander Chernavin
e411d9d86f cmake: Add protocol.h to lacp plugin .h includes
Change-Id: I42e715345b6bc9b469d8b74ce216fc98b7824cf8
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2018-11-27 13:50:06 +00:00
Paul Vinciguerra
f1f2aa6bf9 VPP-1508 python3 tests: use six.iteritems
This replaces dictionary.iteritems() on Python 2 and dictionary.items() on Python 3.

Change-Id: I58a3ded7d284c59e28d484b0c285aac435bfc229
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-27 09:02:02 +00:00
Paul Vinciguerra
6e4c6ad92e VPP-1508 python3 tests: .encode('hex')
Change to binascii.hexlify() for consistent bahavior.

Change-Id: Ie430cdd1ffeb6510db4aa037546e42d85992093b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-27 09:01:27 +00:00
Paul Vinciguerra
6c746172ef VPP-1508 Fix for bug introduced in tests on use of repr.
This fixes the change from https://gerrit.fd.io/r/#/c/16175/

...

======
Totals
======
Ran: 856 tests in 2123.0000 sec.
 - Passed: 667
 - Skipped: 157
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 32
Sum of execute time for each test: 1641.0832 sec.

==============
Worker Balance
==============
 - Worker 0 (416 tests) => 0:35:06.788054
 - Worker 1 (440 tests) => 0:31:13.814911
Test id                                                                                 Runtime (s)
--------------------------------------------------------------------------------------  -----------
test.test_vcl.VCLCutThruTestCase.test_ldp_cut_thru_bi_dir_nsock                         120.382
test.test_vcl.VCLThruHostStackGroupBTestCase.test_ldp_thru_host_stack_bi_dir_nsock       60.368
test.test_vcl.VCLIpv6ThruHostStackGroupBTestCase.test_ldp_thru_host_stack_bi_dir_nsock   60.356
test.test_igmp.TestIgmp.test_igmp_host                                                   47.411
test.test_reassembly.TestFIFReassembly.test_fif6                                         38.561
test.test_reassembly.TestFIFReassembly.test_fif4                                         37.045
test.test_gbp.TestGBP.test_gbp                                                           30.041
test.test_dhcp.TestDHCP.test_dhcp_proxy                                                  29.339
test.test_vcl.VCLCutThruTestCase.test_ldp_cut_thru_iperf3                                20.489
test.test_neighbor.ARPTestCase.test_arp                                                  19.004

Change-Id: Ic1565f14962f157d5041230de3aeeab0b85f21e1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-27 09:00:51 +00:00
Dave Barach
f970d2f8c6 Minor tweaks
Significant refit coming soon.

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If7d196e84354c5088706e2ac81e2add42597a550
2018-11-26 18:36:14 -05:00
juraj.linkes
abec0129b1 Split non-parallel testsuite
Split one big suite into smaller suites when not running tests in
parallel. This results in all tests being executed in one iteration.

Change-Id: I0d3d357a95d9cc596b606d5911a5819e8ffdeee5
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-11-26 19:54:25 +00:00
Ole Troan
2152e1cf8b stats: Remove unneeded dependencies in stat_client
Remove exposing stat_client_main internals and atomics to
simplify use from C++.

Change-Id: Ie864170fee8b4eaa2fd7f98556cf0ebb46cb1a2a
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-26 19:53:55 +00:00
Paul Vinciguerra
3d2df215bf Python3 tests: Fix asserts.
Use assert(Not)Equal()
Use assert{Greater,Less}[Equal]

Change-Id: I7c14570b8dce463ee13a67e9c1f10beb1a0308a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 19:53:39 +00:00
Pierre Pfister
6221927e9b Fix IPSec CLI key parsing
strncpy stops copying when a byte set to 0 is read.
The fix is to use mempcy instead.

This patch also adds spd id to ipsec input trace.

Change-Id: Ibed071d3607fa76c3f6ee065f94128f1aca9b2e2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2018-11-26 19:53:18 +00:00
Dave Barach
a25def7807 Add a feature arc consistency check
Verify that last node in the computed feature order matches
reality. This check doesn't make sense in all cases, so we skip it if
the newly-added vnet_feature_arc_registration_t ".last_in_arc" datum
is a NULL pointer.

Change-Id: Ia99c3e2b2da2e4780a7d5bc71670c5742a66fef2
Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-26 19:52:42 +00:00
Andrew Yourtchenko
37f4456363 vppinfra: prevent dlmalloc from allocating memory via mmap_alloc()
If the heap does not have enough space to satisfy allocation
request, the allocator calls sys_alloc(). There, if the request
is bigger than mparams.mmap_threshold, the mmap_alloc() is called
to allocate memory via a direct mmap call.
The resulting allocated memory is properly recognized by
clib_mem_is_heap_object() only for the first such request.
Subsequent requests overwrite the tracking data, resulting
in previously "valid" addresses become invalid, as seen
by clib_mem_is_heap_object(). The result is a misleading
behavior which masks other issues.

This is a temporary change to avoid the affected codepath
until there is a proper fix to track the directly mmap-allocated
memory.

Change-Id: I4137f91b5196d4503c40cf8ecc2f71554bc8f858
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2018-11-26 17:09:01 +00:00
Mohsin Kazmi
2af0e3a74c flow-hash: Add symmetric flag for flow hashing
When 'Symmetric' flag is enabled, it will sort the addresses
and hence, same flow hash will be calculated on both directions.

Change-Id: I5d846f8d0b94ca1121e03d15b02bb56edb5887b1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-26 17:07:48 +00:00
Klement Sekera
ab11ec9ab9 vapi: break if parsing progress cannot be made
Change-Id: I1b76994f674a045f7fce3d61ef2aa5294ddb53a9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-11-26 16:33:26 +00:00
Damjan Marion
ddf6e08d2e Remove unused argument from eth_identify_subint(...)
Change-Id: I0e89fbc51f30325655c4e9d0104aceb3ead3b16f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-26 16:05:07 +01:00
Ole Trøan
162989e051 Revert "VPP-1508 python3 tests: raw_input"
This reverts commit 72f0004ac5f6e201cbe042593d76df6f2491d743.

Reason for revert: Traceback (most recent call last):
  File "/home/ksekera/vpp/test/test_ipsec_ah.py", line 36, in
setUpClass
    super(TemplateIpsecAh, cls).setUpClass()
  File "/home/ksekera/vpp/test/template_ipsec.py", line 105, in
setUpClass
    super(TemplateIpsec, cls).setUpClass()
  File "/home/ksekera/vpp/test/framework.py", line 459, in setUpClass
    cls.quit()
  File "/home/ksekera/vpp/test/framework.py", line 475, in quit
    six.input("When done debugging, press ENTER to kill the "
AttributeError: 'module' object has no attribute 'input'

Change-Id: Idf0bbfea231730b37bae5dcb4557a0f82ab1b810
Signed-off-by: Ole Troan <ot@cisco.com>
2018-11-26 12:05:34 +00:00
Paul Vinciguerra
76f3a2b6d9 test_fib.py: Remove empty methods
Remove methods that only call super.

py27 runtests: commands[5] | stestr --test-path ./test run --slowest test_fib
==============================================================================
FIB Test Case
==============================================================================
==============================================================================
IPv6 Test Case
==============================================================================
12:19:23,856 Couldn't stat : /tmp/vpp-unittest-TestFIB-BcLbkQ/stats.sock
{1} test.test_fib.TestFIB.test_fib [0.216340s] ... ok
==============================================================================
IPv4 Test Case
==============================================================================
{0} test.test_ip6.TestIPv6.test_fib [5.328127s] ... ok
12:19:33,921 Couldn't stat : /tmp/vpp-unittest-TestIPv4-AoGvoK/stats.sock
{1} test.test_ip4.TestIPv4.test_fib [5.071083s] ... ok

======
Totals
======
Ran: 3 tests in 34.0000 sec.
 - Passed: 3
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 10.6155 sec.

==============
Worker Balance
==============
 - Worker 0 (1 tests) => 0:00:05.328127
 - Worker 1 (2 tests) => 0:00:10.251002
Test id                          Runtime (s)
-------------------------------  -----------
test.test_ip6.TestIPv6.test_fib  5.328
test.test_ip4.TestIPv4.test_fib  5.071
test.test_fib.TestFIB.test_fib   0.216
______________________________________________________ summary ______________________________________________________
  py27: commands succeeded
  congratulations :)
vagrant@vpp:/vpp$

Change-Id: Ia07fe13affe2672ea2df774678312c6db8ea63fb
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 09:31:03 +00:00
Paul Vinciguerra
ab9e20b731 VPP-1508 Add support for environment markers.
Add the ability to specify a specific python library version
based on the interpreter/platform/etc.

Change-Id: I027acdf22ad839b5cff63b319f0aa100b0f336c8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 09:30:46 +00:00
Paul Vinciguerra
9db94454b9 VPP-1508 python3 tests locals()
Do not use locals() for string formatting.

Change-Id: I2e811f479198159b4005fa69c09ad903944d8ae3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 09:09:56 +00:00
Paul Vinciguerra
86ebba6b3f Fix swapped decorators in VppTestCase.
Change-Id: I39b5a8e368f0e0b5c83203141d01f22d909b6f9d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 08:58:22 +00:00
Paul Vinciguerra
72f0004ac5 VPP-1508 python3 tests: raw_input
Raw input does not exist in python3 use six.input.

Change-Id: Ie461696ff869057bcc3969a7571602dde570f5b8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-26 08:30:50 +00:00
Paul Vinciguerra
00671cf9cf VPP-1508 python3 tests: python3 repr.
Use six.reprlib.  Uses repr for python 2 and reprlib for python 3.

Change-Id: Ia343a492d533bd511ed57166381e10a37e452d36
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-25 12:47:04 -08:00
Paul Vinciguerra
61e63bf4e1 make test: Fix too wide subprocess exceptions
When a command fails, CalledProcessError is raised. testing with except: masks other failures.

Change-Id: I7e3a6739411cb6a4c13e96dd123aff9159213fea
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-11-25 18:33:50 +00:00