vpp.git
5 years agonsim: add packet loss simulation, docs 78/16378/2
Dave Barach [Thu, 6 Dec 2018 15:20:14 +0000 (10:20 -0500)]
nsim: add packet loss simulation, docs

Change-Id: Ic9747541aad8148ebf7d520b525b99c4cc3961f3
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoDOC-ONLY: MFIB documentation 82/16382/1
Neale Ranns [Thu, 6 Dec 2018 16:36:55 +0000 (08:36 -0800)]
DOC-ONLY: MFIB documentation

Change-Id: I8c7277584f231dd4732a4c6013e156a5bb821f41
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoAPI: Change ip4_address and ip6_address to use type alias. 17/16217/11
Ole Troan [Tue, 27 Nov 2018 09:05:23 +0000 (10:05 +0100)]
API: Change ip4_address and ip6_address to use type alias.

Change-Id: Id8669bbadd1d6b2054865a310a654e9b38d1667d
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoUpdate japi to support type aliases 69/16369/2
Michal Cmarada [Thu, 6 Dec 2018 09:17:39 +0000 (10:17 +0100)]
Update japi to support type aliases

Change-Id: I6d6068d641d4c91e5c5b52eefb898affc5c0d2c0
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agoMFIB; CLI improvements 57/16357/2
Neale Ranns [Wed, 5 Dec 2018 16:39:45 +0000 (16:39 +0000)]
MFIB; CLI improvements

Change-Id: I7cf3ae8c10dd584e8bc234a3253bea3c5a2d105a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFix gcc-8 compile issues in string_test.c 62/16362/1
Dave Barach [Wed, 5 Dec 2018 19:19:26 +0000 (14:19 -0500)]
Fix gcc-8 compile issues in string_test.c

gcc-8 flunks a certain number of tests at compile time, so
conditionally disable (negative) tests which won't even compile.

Change-Id: Id7e85f38bc371623972efa6e2c8f9ee4717f5ff5
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoImprove strncpy_s src/dst overlap check 52/16352/2
Dave Barach [Wed, 5 Dec 2018 13:41:11 +0000 (08:41 -0500)]
Improve strncpy_s src/dst overlap check

Let m = user estimate of the (max) src string length, low = smaller
address of (src, dst), hi = larger address (src, dst).

if (low + (m - 1) >= hi), we have a *potential* overlapping copy which
is not allowed. Before we declare overlap - and return an error -
retry the check with m = actual src string length.

The resulting "test string" failure affected aarch64 (only) because of
differences in test code stack variable placement / alignment.

Change-Id: I2931d1ce2c61af3d3880075b033d2a4c4e421f09
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agobapi: add options to have vpp cleanup client registration 42/16342/3
Florin Coras [Wed, 5 Dec 2018 00:34:05 +0000 (16:34 -0800)]
bapi: add options to have vpp cleanup client registration

A client can send a memclnt delete message and ask vpp to cleanup the
shared memory queue. Obviously, in this case no delete reply is sent
back to the client.

Change-Id: I9c8375093f8607680ad498a6bed0690ba02a7c3b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoldp: avoid calling write in destructors 40/16340/2
Florin Coras [Tue, 4 Dec 2018 21:43:45 +0000 (13:43 -0800)]
ldp: avoid calling write in destructors

Change-Id: Ia9c3d7a68a23dc4ab3be06f88fdfb053db422372
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession/tcp: postpone cleanup on reset 39/16339/6
Florin Coras [Tue, 4 Dec 2018 17:21:36 +0000 (09:21 -0800)]
session/tcp: postpone cleanup on reset

Change-Id: I45fd7538853f84c6c8bf804cc20acbc9601db3ba
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDOC ONLY: describe dispatch pcap tracing 38/16338/2
Dave Barach [Tue, 4 Dec 2018 15:29:18 +0000 (10:29 -0500)]
DOC ONLY: describe dispatch pcap tracing

and wireshark dissection of these traces.

Change-Id: I61029fd20d6d5f6c40638e3ea9223f2354abedba
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agostat-client: pass names as const strings 19/16319/2
Neale Ranns [Mon, 3 Dec 2018 09:53:32 +0000 (01:53 -0800)]
stat-client: pass names as const strings

Change-Id: I8debcd078b733ed19c4b46ea41a2a150d816724c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: interface event struct 51/16351/2
Neale Ranns [Wed, 5 Dec 2018 12:34:27 +0000 (04:34 -0800)]
VOM: interface event struct

Change-Id: If133829ba4db2da1c9c20bfbbdfc6df6276efa10
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1508: Python3 compatible print 66/16266/2
Paul Vinciguerra [Thu, 29 Nov 2018 03:06:41 +0000 (19:06 -0800)]
VPP-1508: Python3 compatible print

Change-Id: I7d2597f2a9589f2463e213da6ca67b1b7593095e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508 python3 tests: xrange 72/16172/7
Paul Vinciguerra [Sun, 25 Nov 2018 19:21:50 +0000 (11:21 -0800)]
VPP-1508 python3 tests: xrange

xrange is not supported. Use six.range.

py27 runtests: commands[5] | stestr --test-path ./test run --slowest test_ip4 test_ip6
==============================================================================
IPv4 disabled
==============================================================================
==============================================================================
ICMP Echo Test Case
==============================================================================
{0} test.test_ip4.TestIPDisabled.test_ip_disabled [5.256819s] ... ok
07:24:41,902 Couldn't stat : /tmp/vpp-unittest-TestICMPEcho-hU4IsB/stats.sock
{1} test.test_ip4.TestICMPEcho.test_icmp_echo [0.367035s] ... ok
==============================================================================
IPv4 Deaggregate Routes
==============================================================================
==============================================================================
IPv4 Input Exceptions
==============================================================================
07:24:47,314 Couldn't stat : /tmp/vpp-unittest-TestIPDeag-eE1VgC/stats.sock
{1} test.test_ip4.TestIPDeag.test_ip_deag [5.895646s] ... ok
{0} test.test_ip4.TestIPInput.test_ip_input [5.819001s] ... ok
==============================================================================
IPv4 longest Prefix Match

... output truncated ...

==============================
Failed 4 tests - output below:
==============================

test.test_ip4.TestIPv4FibCrud.test_3_add_new_routes
---------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4.py", line 509, in test_3_add_new_routes
        self.deleted_routes.remove(x)
    ValueError: list.remove(x): x not in list

test.test_ip4.TestIPv4FibCrud.test_2_del_routes
-----------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4.py", line 478, in test_2_del_routes
        self.configured_routes.remove(x)
    ValueError: list.remove(x): x not in list

test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_03
--------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 465, in test_ip4_vrf_03
        self.create_vrf_and_assign_interfaces(1)
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 189, in create_vrf_and_assign_interfaces
        pg_if.set_table_ip4(vrf_id)
      File "/vpp/test/vpp_interface.py", line 322, in set_table_ip4
        self.sw_if_index, 0, self.ip4_table_id)
      File "/vpp/test/vpp_papi_provider.py", line 264, in sw_interface_set_table
        'vrf_id': table_id})
      File "/vpp/test/vpp_papi_provider.py", line 196, in api
        raise UnexpectedApiReturnValueError(msg)
    test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -114 in sw_interface_set_table_reply(_0=91, context=1007, retval=-114)

test.test_ip4_vrf_multi_instance.TestIp4VrfMultiInst.test_ip4_vrf_02
--------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 445, in test_ip4_vrf_02
        self.reset_vrf_and_remove_from_vrf_list(1)
      File "/vpp/test/test_ip4_vrf_multi_instance.py", line 208, in reset_vrf_and_remove_from_vrf_list
        self.vapi.reset_fib(vrf_id, is_ipv6=0)
      File "/vpp/test/vpp_papi_provider.py", line 1137, in reset_fib
        'is_ipv6': is_ipv6,
      File "/vpp/test/vpp_papi_provider.py", line 196, in api
        raise UnexpectedApiReturnValueError(msg)
    test.vpp_papi_provider.UnexpectedApiReturnValueError: API call failed, expected 0 return value instead of -3 in reset_fib_reply(_0=259, context=1198, retval=-3)

======
Totals
======
Ran: 57 tests in 266.0000 sec.
 - Passed: 53
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 4
Sum of execute time for each test: 157.3925 sec.

==============
Worker Balance
==============
 - Worker 0 (29 tests) => 0:03:52.608995
 - Worker 1 (28 tests) => 0:04:08.615473
Test id                                        Runtime (s)
---------------------------------------------  -----------
test.test_ip_mcast.TestIPMcast.test_ip6_mcast  8.535
test.test_ip4.TestIPPunt.test_ip_punt          8.082
test.test_ip6.TestIP6Punt.test_ip_punt         6.582
test.test_ip6.TestIPDeag.test_ip_deag          6.175
test.test_ip6.TestIPv6.test_ns                 6.171
test.test_ip4.TestIPDeag.test_ip_deag          5.896
test.test_ip6.TestIPv6.test_fib                5.846
test.test_ip4.TestIPInput.test_ip_input        5.819
test.test_ip6.TestIPv6.test_rs                 5.737
test.test_ip4.TestIPv4.test_fib                5.267
ERROR: InvocationError for command '/vpp/.tox/py27/bin/stestr --test-path ./test run --slowest test_ip4 test_ip6' (exited with code 1)
______________________________________________________ summary ______________________________________________________
ERROR:   py27: commands failed
Change-Id: Id9f6ecb4897386f790d82ab908963e4971a3aac8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoipsec: simplify bumping counters - cosmetic change 00/16300/4
Klement Sekera [Fri, 30 Nov 2018 13:37:03 +0000 (14:37 +0100)]
ipsec: simplify bumping counters - cosmetic change

Change-Id: Ibb55427ed49d0277854a352922c6c4bb007bf072
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovcl: cleanup children that use _exit() 11/16311/14
Florin Coras [Sun, 2 Dec 2018 20:45:53 +0000 (12:45 -0800)]
vcl: cleanup children that use _exit()

Change-Id: Ia56c2698adb0ea7811203844dc4db10e121fbc42
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAdd VNET_BUFFER_F_AVAIL definitions 31/16331/2
Dave Barach [Tue, 4 Dec 2018 00:07:09 +0000 (19:07 -0500)]
Add VNET_BUFFER_F_AVAIL definitions

Add a check to make sure that the vlib and vnet buffer flag bit
definitions do not overlap.

The VNET_BUFFER_F_AVAIL1...8 definitions allow out-of-tree codes to:

  #define VNET_BUFFER_F_MY_USECASE VNET_BUFFER_F_AVAIL1

and so on. This avoids introducing irrelevant and/or proprietary bit
definitions into vnet/buffer.h, and hopefully minimizes merge pain for
everyone involved.

Change-Id: I5be4f61dceb81b5bfca005f6d609ade074af205b
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovcl: test refactor and improvements 32/16332/5
Florin Coras [Tue, 4 Dec 2018 01:47:26 +0000 (17:47 -0800)]
vcl: test refactor and improvements

Change-Id: I92f415bf253d6e051ec9d94ebeb98f081b2a0293
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMPLS: buffer over-run with incorrectly init'd vector. fix VAT dump 34/16334/2
Neale Ranns [Tue, 4 Dec 2018 09:39:40 +0000 (09:39 +0000)]
MPLS: buffer over-run with incorrectly init'd vector. fix VAT dump

Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoFormat vnet_buffer_t l2 feature bitmap 28/16328/1
Dave Barach [Mon, 3 Dec 2018 16:33:09 +0000 (11:33 -0500)]
Format vnet_buffer_t l2 feature bitmap

Change-Id: Iad3120ab6466b77875efc89ccb49f6d22e36e62a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoAPI: C generator improve symbol protection. 90/16290/2
Ole Troan [Fri, 30 Nov 2018 07:34:11 +0000 (08:34 +0100)]
API: C generator improve symbol protection.

Change-Id: I9ef042c06c12892a2bbc23cc3bac6891c77e3feb
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovcl: handle worker process exit 08/16308/5
Florin Coras [Fri, 30 Nov 2018 20:11:20 +0000 (12:11 -0800)]
vcl: handle worker process exit

Change-Id: Ife05d25fd736ae3064f01e974e5aecc5b48de924
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosvm: use explicit svm fifo segment main for slaves 12/16312/4
Florin Coras [Sun, 2 Dec 2018 21:36:00 +0000 (13:36 -0800)]
svm: use explicit svm fifo segment main for slaves

Change-Id: Id39d64bf1b49345a3dc31c63360569212aba6865
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAdd UDP encap flag 05/16305/3
Filip Tehlar [Fri, 30 Nov 2018 15:27:27 +0000 (07:27 -0800)]
Add UDP encap flag

Change-Id: Ic6a8b9aaec7e5dee4fb1971168988dbe4f931f86
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agomove [m]fib and BIER tests to unittest plugin 20/16320/2
Neale Ranns [Mon, 3 Dec 2018 10:48:27 +0000 (10:48 +0000)]
move [m]fib and BIER tests to unittest plugin

Change-Id: I9d2f52e756363df011026773bfffa838a557313f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoCopying QoS Bits when fragmented, so that marking can happen properly also cleaning... 60/16260/5
Vijayabhaskar Katamreddy [Wed, 28 Nov 2018 20:05:23 +0000 (12:05 -0800)]
Copying QoS Bits when fragmented, so that marking can happen properly also cleaning up some unused code

Change-Id: I1558eec79af173e5cdcc769d7c3909039403eed8
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agoIPSEC-AH: anti-replay testing 96/16296/2
Neale Ranns [Wed, 28 Nov 2018 09:38:34 +0000 (01:38 -0800)]
IPSEC-AH: anti-replay testing

Change-Id: Ia5d45db73e4bdb32214ed4f365d5eec8e28115f3
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovppinfra: c11 safe string functions 20/15520/15
Steven [Thu, 25 Oct 2018 04:15:45 +0000 (21:15 -0700)]
vppinfra: c11 safe string functions

Add memcmp_s, strcmp_s, strncmp_s, strcpy_s, strncpy_s, strcat_s, strncat_s,
strtok_s, strnlen_s, and strstr_s C11 safe string API. For migrating extant
unsafe API, add also the corresponding macro version of each safe API,
clib_memcmp, clib_strcmp, etc.

In general, the benefits of the safe string APIs are to provide null pointer
checks, add additional argument to specify the string length of the passed
string rather than relying on the null terminated character, and src/dest
overlap checking for the the string copy operations.

The macro version of the API takes the same number of arguments as the unsafe
API to provide easy migration. However, it does not usually provide the full
aformentioned benefits. In some cases, it is necessary to move to the safe
API rather than using the macro in order to avoid some unpredictable problems
such as accessing memory beyond what it is intended due to the lack of the
passed string length.

dbarach: add a "make test" vector, and a doxygen file header cookie.

Change-Id: I5cd79b8928dcf76a79bf3f0b8cbc1a8f24942f4c
Signed-off-by: Steven <sluong@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoip_reassembly_enable_disable reply handler name is changed. 36/16236/2
Chore [Wed, 28 Nov 2018 06:57:58 +0000 (10:27 +0330)]
ip_reassembly_enable_disable reply handler name is changed.

Change-Id: I89be597376690bb75c4347bcfc1c6c3d27c4034c
Signed-off-by: Chore <s3m2e1.6star@gmail.com>
5 years agodpdk-ipsec-mempool: allocate from dpdk mem specified by socket-mem in startup.conf 87/16287/2
Kingwel Xie [Fri, 30 Nov 2018 02:29:04 +0000 (21:29 -0500)]
dpdk-ipsec-mempool: allocate from dpdk mem specified by socket-mem in startup.conf

otherwise, these pools will occupy an entire huge page for each even
they are very small.

Change-Id: I08919714de9b6cd4b8dddb546ca54364b56ec99f
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoDelete shared memory segment files when vpp starts 10/16310/2
Dave Barach [Fri, 30 Nov 2018 21:46:29 +0000 (16:46 -0500)]
Delete shared memory segment files when vpp starts

Should have been done this way years ago. My bad.

Change-Id: Ic7bf937fb6c4dc5c1b6ae64f2ecf8608b62e7039
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix L2BD arp termination Test Case 07/16307/2
Paul Vinciguerra [Fri, 30 Nov 2018 20:03:04 +0000 (12:03 -0800)]
Fix L2BD arp termination Test Case

==============================================================================
L2BD arp termination Test Case
==============================================================================
12:02:21,850 Couldn't stat : /tmp/vpp-unittest-TestL2bdArpTerm-_h44qo/stats.sock
L2BD arp term - add 5 hosts, verify arp responses                        OK
L2BD arp term - delete 3 hosts, verify arp responses                     OK
L2BD arp term - recreate BD1, readd 3 hosts, verify arp responses        OK
L2BD arp term - 2 IP4 addrs per host                                     OK
L2BD arp term - create and update 10 IP4-mac pairs                       OK
L2BD arp/ND term - hosts with both ip4/ip6                               OK
L2BD ND term - Add and Del hosts, verify ND replies                      OK
L2BD ND term - Add and update IP+mac, verify ND replies                  OK
L2BD arp term - send garps, verify arp event reports                     OK
L2BD arp term - send duplicate garps, verify suppression                 OK
L2BD arp term - disable ip4 arp events,send garps, verify no events      OK
L2BD ND term - send NS packets verify reports                            OK
L2BD ND term - send duplicate ns, verify suppression                     OK
L2BD ND term - disable ip4 arp events,send ns, verify no events          OK

==============================================================================
TEST RESULTS:
     Scheduled tests: 14
      Executed tests: 14
        Passed tests: 14
==============================================================================

Test run was successful

Change-Id: I6bb1ced11b88080ffaa845d22b0bc471c4f91683
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoMetadata / opaque formatting belongs in vpp 30/16230/3
Dave Barach [Tue, 27 Nov 2018 21:52:59 +0000 (16:52 -0500)]
Metadata / opaque formatting belongs in vpp

VPP graph dispatch trace record description:

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Major Version | Minor Version | NStrings      | ProtoHint     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Buffer index (big endian)                                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   + VPP graph node name ...     ...               | NULL octet    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Buffer Metadata ... ...                       | NULL octet    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Buffer Opaque ... ...                         | NULL octet    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Buffer Opaque 2 ... ...                       | NULL octet    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | VPP ASCII packet trace (if NStrings > 4)      | NULL octet    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Packet data (up to 16K)                                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Graph dispatch records comprise a version stamp, an indication of how
many NULL-terminated strings will follow the record header, and a
protocol hint.

The buffer index allows downstream consumers of these data to easily
filter/track single packets as they traverse the forwarding
graph. FWIW, the 32-bit buffer index is stored in big endian format.

As of this writing, major version = 1, minor version = 0. Nstrings
will be either 4 or 5.

Here is the current set of protocol hints:

typedef enum
  {
    VLIB_NODE_PROTO_HINT_NONE = 0,
    VLIB_NODE_PROTO_HINT_ETHERNET,
    VLIB_NODE_PROTO_HINT_IP4,
    VLIB_NODE_PROTO_HINT_IP6,
    VLIB_NODE_PROTO_HINT_TCP,
    VLIB_NODE_PROTO_HINT_UDP,
    VLIB_NODE_N_PROTO_HINTS,
  } vlib_node_proto_hint_t;

Example: VLIB_NODE_PROTO_HINT_IP6 means that the first octet of packet
data SHOULD be 0x60, and should begin an ipv6 packet header.

Change-Id: Idf310bad80cc0e4207394c80f18db5f77c378741
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agocoding-style: missing coding-style-patch 95/16295/2
Kingwel Xie [Fri, 30 Nov 2018 09:43:25 +0000 (04:43 -0500)]
coding-style: missing coding-style-patch

fix coding style

Change-Id: I458d81fa80c509b71edb2021468a89715cb32ae3
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoIPSEC-AH: fix packet drop 91/16291/2
Neale Ranns [Fri, 30 Nov 2018 09:15:11 +0000 (09:15 +0000)]
IPSEC-AH: fix packet drop

Change-Id: I45b97cfd0c3785bfbf6d142d362bd3d4d56bae00
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agomake test: print TEST= values for failed tests 99/16299/2
Klement Sekera [Fri, 30 Nov 2018 13:17:20 +0000 (14:17 +0100)]
make test: print TEST= values for failed tests

This prints the format strings required to rerun the failed test next to
the failures.

Change-Id: I973d8ae025f026129826356bce265b1e70086d2f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoGBP: UT more robust for endpoint timeout 77/16277/3
Neale Ranns [Thu, 29 Nov 2018 12:02:16 +0000 (12:02 +0000)]
GBP: UT more robust for endpoint timeout

Change-Id: Ib78c747fa3e304f7158f8182d060e11e4e778400
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl/test: increase wait time before connect 88/16288/2
Florin Coras [Fri, 30 Nov 2018 02:22:10 +0000 (18:22 -0800)]
vcl/test: increase wait time before connect

Also split tests into smaller groups

Change-Id: I35809607b7a59029606bb34b90cfeffd1985fe60
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: wait for segments with segment handle 86/16286/4
Florin Coras [Fri, 30 Nov 2018 01:02:29 +0000 (17:02 -0800)]
vcl: wait for segments with segment handle

Instead of waiting for notification from binary api.

Change-Id: I5ecab857d6bcdbed62d6bb06709570c4cf6b19ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAPI: Add dependency on compiler for API .json and .api generation. 83/16283/2
Ole Troan [Thu, 29 Nov 2018 19:14:33 +0000 (20:14 +0100)]
API: Add dependency on compiler for API .json and .api generation.

Add dependency on the API compiler, so that builds can deal with changes to the tool.

Change-Id: I2587235fefa93a69955495870d49f36b4203bfea
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoTests: Fix traceback. 63/16163/4
Paul Vinciguerra [Sun, 25 Nov 2018 06:19:12 +0000 (22:19 -0800)]
Tests: Fix traceback.

        self.assertTrue(packet.haslayer(msg_type))
      File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
        raise self.failureException(msg)
    AssertionError: 0 is not true

* Scapy packet.haslayer() returns 1 or 0.
  Replace with assertEqual(packet.haslayer(), 1) to fix tracebacks.

* Scapy has multiple layers called TCP/UDP
  Specify the module name to prevent namespace collisions.

* Remove duplicate import.

Change-Id: I600f9f330075cd40e1da50f8b2ceb24f645f2c20
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agosession: segment handle in accept/connect notifications 84/16284/7
Florin Coras [Thu, 29 Nov 2018 20:40:10 +0000 (12:40 -0800)]
session: segment handle in accept/connect notifications

Change-Id: I03884b6cde9d4c38ae13d1994fd8d37d44016ef0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: use endpt fib index if app in default ns 99/16199/5
John Lo [Tue, 27 Nov 2018 03:13:57 +0000 (22:13 -0500)]
session: use endpt fib index if app in default ns

Change-Id: Icf1408c50a6438c81e16033e83b2a76ce6eb0166
Signed-off-by: John Lo <loj@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGRE: UT uses new pkt send functions 78/16278/2
Neale Ranns [Thu, 29 Nov 2018 08:48:37 +0000 (08:48 +0000)]
GRE: UT uses new pkt send functions

Change-Id: Icb1767b31421aa1e427498adc82d79307835ee1a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agomake test: verify packet counters in ipsec tests 02/15902/9
Klement Sekera [Tue, 13 Nov 2018 10:12:57 +0000 (11:12 +0100)]
make test: verify packet counters in ipsec tests

Change-Id: Ia15b40f9d91daf3a325cb8d707b22a1dbc68d9cc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agodo not opttimize graph node functions in debug builds 80/16280/2
Damjan Marion [Thu, 29 Nov 2018 13:40:30 +0000 (14:40 +0100)]
do not opttimize graph node functions in debug builds

Change-Id: I5b4cd419d317381a06e7e6d703373959f4bbd97b
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoDHCP: Initialise trace for copied buffers. 76/16276/4
Ole Troan [Thu, 29 Nov 2018 11:39:41 +0000 (12:39 +0100)]
DHCP: Initialise trace for copied buffers.

DHCP tests failed intermittantly with a core dump.
Let's see if this fixes it.

Change-Id: I42829a2c7e7f5a9a6775330d37bf972ff0008210
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovpp_papi: Add custom exceptions. 29/16229/3
Paul Vinciguerra [Tue, 27 Nov 2018 16:15:22 +0000 (08:15 -0800)]
vpp_papi:  Add custom exceptions.

This patchset adds and raises the following custom exception classes:

* class VPPApiError(Exception):
* class VPPNotImplementedError(NotImplementedError):
* class VPPIOError(IOError):
* class VPPRuntimeError(RuntimeError):
* class VPPValueError(ValueError):

* class VPPSerializerValueError(ValueError):

* class VPPStatsIOError(IOError):
* class VPPStatsClientLoadError(RuntimeError):

* class VppTransportShmemIOError(IOError):

* class VppTransportSocketIOError(IOError)

Change-Id: Ia40900fd2dcef148d01125d6c691329fc666901e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi: Fix: raise NotImplemented. 07/16207/4
Paul Vinciguerra [Tue, 27 Nov 2018 09:41:35 +0000 (01:41 -0800)]
vpp_papi: Fix: raise NotImplemented.

'raise NotImplemented' should be 'raise NotImplementedError'.
NotImplemented is not part of the Exception heirarchy.

Change-Id: I7fb647f1d56e689fafa2cd9a5566da826def072b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTrivial: test_container.py 24/16224/3
Paul Vinciguerra [Tue, 27 Nov 2018 13:53:35 +0000 (05:53 -0800)]
Trivial: test_container.py

First argument of a classmethod should be named 'cls'.

Change-Id: Iff4b8d856e57c13a3404dbf6780c1d4add45b36a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTrivial: test/test_ipip.py 25/16225/3
Paul Vinciguerra [Tue, 27 Nov 2018 14:01:22 +0000 (06:01 -0800)]
Trivial: test/test_ipip.py

First argument of a method should be named 'self'.

Change-Id: I7260916ce9d96108202b650dbf7ac8ce4b3aafdc
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVOM: missing GBP symbol 81/16281/1
Neale Ranns [Thu, 29 Nov 2018 14:39:08 +0000 (06:39 -0800)]
VOM: missing GBP symbol

Change-Id: I6cbed0bce7c78970d5a22ac823d0380d14b73dbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoapi: ip_source_check_interface_add_del api is added. 41/16241/7
Chore [Wed, 28 Nov 2018 07:23:11 +0000 (10:53 +0330)]
api: ip_source_check_interface_add_del api is added.

Change-Id: I4799a9d469c797e54669ff4b50851a9acc849427
Signed-off-by: Chore <s3m2e1.6star@gmail.com>
5 years agoVOM: deprecate TAP add ip-punt redirect dump 74/16274/3
Neale Ranns [Wed, 28 Nov 2018 17:51:40 +0000 (09:51 -0800)]
VOM: deprecate TAP add ip-punt redirect dump

Change-Id: I675e04d9f8bb2a18293cf6dd01581a9dc62882fe
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: l3-out subnets 15/16215/7
Neale Ranns [Wed, 21 Nov 2018 13:44:35 +0000 (05:44 -0800)]
GBP: l3-out subnets

Change-Id: Id4a20066fc5be716c61a497dfcb4d00dc1dbb28d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agogbp: Add support for flow hash profile 79/16079/7
Mohsin Kazmi [Wed, 21 Nov 2018 09:46:57 +0000 (10:46 +0100)]
gbp: Add support for flow hash profile

Change-Id: Ibea87f21b3403045cc0d865903b94396fe670e79
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoNAT: syslog - sessions logging (VPP-1139) 68/16268/2
Matus Fabian [Thu, 29 Nov 2018 05:26:34 +0000 (21:26 -0800)]
NAT: syslog - sessions logging (VPP-1139)

Change-Id: I6e0b7cf37c1a9ac66f8ac011db29504e57844ee9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agotest: use smaller timeouts for vcl/ldp tests 73/16273/3
Florin Coras [Thu, 29 Nov 2018 08:39:53 +0000 (00:39 -0800)]
test: use smaller timeouts for vcl/ldp tests

Change-Id: Idebd110cbf5f0ddc5d9da5a1975b5d278825d131
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: basic support for apps that fork 98/16198/18
Florin Coras [Tue, 27 Nov 2018 01:01:36 +0000 (17:01 -0800)]
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>
5 years agoGRE: fix VRF unit-tests 72/16272/2
Neale Ranns [Thu, 29 Nov 2018 08:24:38 +0000 (08:24 +0000)]
GRE: fix VRF unit-tests

Change-Id: Ic6d011065bf062a84fdccdb1726ed3e5ed99cfbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1507: Added binary api to dump configured ip_punt_redirect 09/16209/5
Pavel Kotucek [Tue, 27 Nov 2018 08:59:44 +0000 (09:59 +0100)]
VPP-1507: Added binary api to dump configured ip_punt_redirect

Change-Id: I790f7785e183cc9aaffd5b593617c4e12a32e20d
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
5 years agoldp: basic multiworker support 69/16269/2
Florin Coras [Thu, 29 Nov 2018 06:13:45 +0000 (22:13 -0800)]
ldp: basic multiworker support

Change-Id: Ia794fa7e15dac02c8607c4cee2f119ad9815c0a8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovppinfra: add pool_dup macro 31/16231/4
Florin Coras [Wed, 28 Nov 2018 01:11:37 +0000 (17:11 -0800)]
vppinfra: add pool_dup macro

Change-Id: I192e340bd072d27bf6ddc382347ad5c3ca411bad
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoExport ethernet/mac_address.h as part of API installation. 61/16261/2
Jon Loeliger [Wed, 28 Nov 2018 19:51:42 +0000 (13:51 -0600)]
Export ethernet/mac_address.h as part of API installation.

Change-Id: Ibb6d648948f990280e3cb048ce907f01e5c32b12
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agomake test: create virtualenv under /test/ 99/15999/5
Klement Sekera [Thu, 8 Nov 2018 10:21:39 +0000 (11:21 +0100)]
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>
5 years agodpdk-ipsec-nodes multiarch: nodes are formatted in VLIB_NODE_FN style 35/16235/4
Kingwel Xie [Wed, 28 Nov 2018 07:10:35 +0000 (02:10 -0500)]
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>
5 years agodpdk: bump to DPDK 18.11 14/16214/5
Damjan Marion [Tue, 27 Nov 2018 11:18:26 +0000 (12:18 +0100)]
dpdk: bump to DPDK 18.11

Change-Id: Ib6458e56f546bb5b11c23aa5e1afe0f4b5011c08
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoMAP: Use bool type in map.api instead of u8. 49/16249/2
Ole Troan [Wed, 28 Nov 2018 10:34:38 +0000 (11:34 +0100)]
MAP: Use bool type in map.api instead of u8.

Change-Id: I4e40bb6d6bf274a27892053f37aeeb81a7278965
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovppapigen: Fix python3 compatibility 68/15468/8
Ole Troan [Tue, 23 Oct 2018 08:50:07 +0000 (10:50 +0200)]
vppapigen: Fix python3 compatibility

Change-Id: I9124fcb755ba43fd8f44712f0940f351c460c5b0
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAPI: Add support for type aliases 06/15906/9
Ole Troan [Tue, 13 Nov 2018 11:36:56 +0000 (12:36 +0100)]
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>
5 years agoipsec: move ipsec defs to ipsec.h 00/15900/7
Klement Sekera [Mon, 12 Nov 2018 13:32:19 +0000 (14:32 +0100)]
ipsec: move ipsec defs to ipsec.h

Change-Id: Ia3dcd98edb6188deb96a3a99d831e71b2ffa0060
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoVPP-1508: vpp_transport_socket.py fix import 63/16263/2
Paul Vinciguerra [Thu, 29 Nov 2018 00:17:56 +0000 (16:17 -0800)]
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>
5 years agoUse acquire/release ordering when accessing svm_fifo shared variable cursize 84/16184/6
Sirshak Das [Thu, 8 Nov 2018 00:46:42 +0000 (18:46 -0600)]
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>
5 years agovpp_papi: Reserved keywords. 06/16206/3
Paul Vinciguerra [Tue, 27 Nov 2018 09:32:42 +0000 (01:32 -0800)]
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>
5 years agopmalloc: fix shared hugepage backed mmap on older kernels 16/16216/4
Damjan Marion [Tue, 27 Nov 2018 12:02:13 +0000 (13:02 +0100)]
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>
5 years agodpdk: allow interface name to be specified from startup.conf 19/16219/4
Damjan Marion [Tue, 27 Nov 2018 12:41:02 +0000 (13:41 +0100)]
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>
5 years agocmake: display warning and continue if dpdk not present 46/16246/1
Damjan Marion [Wed, 28 Nov 2018 09:46:03 +0000 (10:46 +0100)]
cmake: display warning and continue if dpdk not present

Change-Id: I5cb2619444507a159c42ac8401800e90b6541a20
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRemove useless prefetch in ip4-rewrite node 77/16177/3
Simon Zhang [Mon, 26 Nov 2018 09:15:24 +0000 (17:15 +0800)]
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>
5 years agovpp_papi: Use new style classes. 05/16205/2
Paul Vinciguerra [Mon, 26 Nov 2018 20:04:48 +0000 (12:04 -0800)]
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>
5 years agotest/remote_test.py: Fix missing import 20/16220/2
Paul Vinciguerra [Tue, 27 Nov 2018 12:42:05 +0000 (04:42 -0800)]
test/remote_test.py: Fix missing import

Change-Id: I192c33d36f43ae2df0dda509e118f2b920d561ac
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoldp: sid to fd mapper for apps with multiple workers 02/16202/2
Florin Coras [Tue, 27 Nov 2018 08:04:59 +0000 (00:04 -0800)]
ldp: sid to fd mapper for apps with multiple workers

Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agopmalloc: correct format_pmalloc_map u32 index overrun bug 50/15850/4
Kingwel Xie [Mon, 12 Nov 2018 03:55:58 +0000 (22:55 -0500)]
pmalloc: correct format_pmalloc_map u32 index overrun bug

Change-Id: I95ba4eab6e2154ef33a479450b997c8317db3a92
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agodocs: Add more on trex 96/16196/2
jdenisco [Mon, 26 Nov 2018 20:15:09 +0000 (15:15 -0500)]
docs: Add more on trex

Change-Id: Ifb5eabe30e1b0ba911ddf455573cc346ff4bec85
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agocmake: Add protocol.h to lacp plugin .h includes 03/16203/2
Alexander Chernavin [Tue, 27 Nov 2018 08:16:43 +0000 (03:16 -0500)]
cmake: Add protocol.h to lacp plugin .h includes

Change-Id: I42e715345b6bc9b469d8b74ce216fc98b7824cf8
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
5 years agoVPP-1508 python3 tests: use six.iteritems 67/16167/3
Paul Vinciguerra [Sun, 25 Nov 2018 16:36:47 +0000 (08:36 -0800)]
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>
5 years agoVPP-1508 python3 tests: .encode('hex') 69/16169/3
Paul Vinciguerra [Sun, 25 Nov 2018 18:35:29 +0000 (10:35 -0800)]
VPP-1508 python3 tests: .encode('hex')

Change to binascii.hexlify() for consistent bahavior.

Change-Id: Ie430cdd1ffeb6510db4aa037546e42d85992093b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVPP-1508 Fix for bug introduced in tests on use of repr. 95/16195/3
Paul Vinciguerra [Mon, 26 Nov 2018 17:57:21 +0000 (09:57 -0800)]
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>
5 years agoMinor tweaks 97/16197/1
Dave Barach [Mon, 26 Nov 2018 23:34:33 +0000 (18:34 -0500)]
Minor tweaks

Significant refit coming soon.

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: If7d196e84354c5088706e2ac81e2add42597a550

5 years agoSplit non-parallel testsuite 24/16024/4
juraj.linkes [Fri, 16 Nov 2018 16:28:56 +0000 (17:28 +0100)]
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>
5 years agostats: Remove unneeded dependencies in stat_client 56/16156/2
Ole Troan [Fri, 23 Nov 2018 22:07:13 +0000 (23:07 +0100)]
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>
5 years agoPython3 tests: Fix asserts. 64/16164/3
Paul Vinciguerra [Sun, 25 Nov 2018 07:19:53 +0000 (23:19 -0800)]
Python3 tests: Fix asserts.

Use assert(Not)Equal()
Use assert{Greater,Less}[Equal]

Change-Id: I7c14570b8dce463ee13a67e9c1f10beb1a0308a8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoFix IPSec CLI key parsing 76/16176/3
Pierre Pfister [Mon, 26 Nov 2018 08:29:00 +0000 (09:29 +0100)]
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>
5 years agoAdd a feature arc consistency check 93/16193/2
Dave Barach [Mon, 26 Nov 2018 16:04:45 +0000 (11:04 -0500)]
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>
5 years agovppinfra: prevent dlmalloc from allocating memory via mmap_alloc() 86/16186/2
Andrew Yourtchenko [Mon, 26 Nov 2018 14:40:20 +0000 (15:40 +0100)]
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>
5 years agoflow-hash: Add symmetric flag for flow hashing 49/16049/3
Mohsin Kazmi [Tue, 20 Nov 2018 10:11:12 +0000 (11:11 +0100)]
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>
5 years agovapi: break if parsing progress cannot be made 85/16185/2
Klement Sekera [Mon, 26 Nov 2018 14:37:28 +0000 (15:37 +0100)]
vapi: break if parsing progress cannot be made

Change-Id: I1b76994f674a045f7fce3d61ef2aa5294ddb53a9
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoRemove unused argument from eth_identify_subint(...) 88/16188/1
Damjan Marion [Mon, 26 Nov 2018 15:05:07 +0000 (16:05 +0100)]
Remove unused argument from eth_identify_subint(...)

Change-Id: I0e89fbc51f30325655c4e9d0104aceb3ead3b16f
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoRevert "VPP-1508 python3 tests: raw_input" 80/16180/2
Ole Trøan [Mon, 26 Nov 2018 10:27:50 +0000 (10:27 +0000)]
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>
5 years ago test_fib.py: Remove empty methods 74/16174/2
Paul Vinciguerra [Sun, 25 Nov 2018 20:20:40 +0000 (12:20 -0800)]
 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>