vpp.git
5 years agostats: Deprecate old stats framework 07/15907/4
Ole Troan [Tue, 13 Nov 2018 13:04:50 +0000 (14:04 +0100)]
stats: Deprecate old stats framework

Change-Id: Iecdf0e5767115ef0570e9ea7212dc4644cf4afbd
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agomake test: add option for adding extra vpp config 21/16321/2
Klement Sekera [Mon, 3 Dec 2018 11:24:21 +0000 (12:24 +0100)]
make test: add option for adding extra vpp config

Change-Id: Ief316756635794dadf2f0f4190aa20745df5e53c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agolibmemif: fix possible segfault on memif_get_details 82/16482/2
Koichiro Den [Fri, 14 Dec 2018 15:31:34 +0000 (00:31 +0900)]
libmemif: fix possible segfault on memif_get_details

insufficient buflen does not mean immediate return but
fallthrough by design so assigning values to these
array elements should just be skipped in that case.

Change-Id: Iaa9718db073108e44a9b05e1c8ffb0725147ff1f
Signed-off-by: Koichiro Den <den@klaipeden.com>
5 years agoFix TestIPv4FibCrud interdependencies. 04/16504/2
Paul Vinciguerra [Sun, 16 Dec 2018 22:52:36 +0000 (14:52 -0800)]
Fix TestIPv4FibCrud interdependencies.

The tests fail if run independently or out of order.
This change breaks the dependency between the tests.

ERROR: Add 1k routes
------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/vpp/test/test_ip4.py", line 514, in test_3_add_new_routes
    self.deleted_routes.remove(x)
ValueError: list.remove(x): x not in list

Change-Id: I344ceba6bd8b86556f92e50080be6c43092b9faf
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoAdded CMake building system for libmemif 36/16436/11
msardara [Tue, 11 Dec 2018 17:36:55 +0000 (18:36 +0100)]
Added CMake building system for libmemif
Added Cpack support for building libmemif DEB/RPM packages
Fixed compilation errors in libmemif test and examples

Change-Id: I59a237a4ca8eb08840857d5b0e666f3a8d74411d
Signed-off-by: msardara <msardara+fdio@cisco.com>
5 years agoString type: Not include \0 in show_version 03/16503/3
Ole Troan [Sun, 16 Dec 2018 22:44:54 +0000 (23:44 +0100)]
String type: Not include \0 in show_version

The string type does not include the \0 in strings.

Change-Id: I869f438b84880df40a018e43b4510194d84ce0fe
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovcl/session: handle reset/disconnect before app accept 91/16491/8
Florin Coras [Fri, 14 Dec 2018 19:28:43 +0000 (11:28 -0800)]
vcl/session: handle reset/disconnect before app accept

Also further improves reset handling.

Change-Id: I6e517632f700f181761726b965134e0c217eb06d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovmxnet3: support clear hardware interface counters 51/16451/2
Steven [Thu, 13 Dec 2018 00:01:28 +0000 (16:01 -0800)]
vmxnet3: support clear hardware interface counters

Add clear hardware interface counters callback for vmxnet3 device. We take a
snap shot of the statistics in the callback. For the show hardware command,
we display the delta between the current statistics and the last snapshot.

Change-Id: Ie1389d2141f519300f427fe6ff2fdf97fd9e9378
Signed-off-by: Steven <sluong@cisco.com>
5 years agoMAP: Encode ht-ratio as f64 for API. 90/16490/2
Jon Loeliger [Fri, 14 Dec 2018 18:27:25 +0000 (12:27 -0600)]
MAP: Encode ht-ratio as f64 for API.

Change-Id: I5f05f112e8002e8b57db5c7a215ca4778ab6f76a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agodocs: clarify vector element alignment description. 67/16467/3
Dave Wallace [Thu, 13 Dec 2018 17:29:44 +0000 (12:29 -0500)]
docs: clarify vector element alignment description.

Change-Id: I6da153779010263e6fc4b51c64b01444aaadca17
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agoVPP-1523: harden reassembly 78/16478/3
Klement Sekera [Fri, 14 Dec 2018 11:00:44 +0000 (12:00 +0100)]
VPP-1523: harden reassembly

Change-Id: I00d7b38bd99e81e3921ce08cce50d613f11de36e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoIP6-MFIB: replace the radix tree with bihash (VPP-1526) 47/16447/6
Neale Ranns [Fri, 23 Nov 2018 17:00:27 +0000 (09:00 -0800)]
IP6-MFIB: replace the radix tree with bihash (VPP-1526)

Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: fixes for stats 80/16480/2
Neale Ranns [Fri, 14 Dec 2018 13:48:02 +0000 (05:48 -0800)]
VOM: fixes for stats

Change-Id: I62582123361e091e79bbcc6d71794c6f76216b25
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoString type: Fix off by one error 92/16492/2
Ole Troan [Fri, 14 Dec 2018 19:34:29 +0000 (20:34 +0100)]
String type: Fix off by one error

String is not sent nul terminated across API.
The hardest two problems in computer science is cache invalidation
naming and off by one errors.

Change-Id: I36f1952ca955cb2d9dfb4c8120ec48c50ba17991
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoRevert gerrit 16429 to fix a Debian build-break 96/16496/1
Dave Barach [Fri, 14 Dec 2018 20:27:40 +0000 (15:27 -0500)]
Revert gerrit 16429 to fix a Debian build-break

Change-Id: I9382bc981c25a29c293f7ddc6ed3d34130678696
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoNAT: counters (VPP-1484) 76/16476/2
Matus Fabian [Fri, 14 Dec 2018 09:55:16 +0000 (01:55 -0800)]
NAT: counters (VPP-1484)

Change-Id: I5d1852a09712adfe7547c200d161539736aca6f5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoFix test results 61/16461/2
juraj.linkes [Thu, 13 Dec 2018 10:10:47 +0000 (11:10 +0100)]
Fix test results

In a rare case a failure can occur in a VppTestCase which hasn't been
part of the original TestSuite, such as in memif testcases. Fix the
reporting after test run in these cases.

Change-Id: Ib2a34fc195179605c22b95bd0e2c7cebca17012f
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoFix compiling issue with GCC-8.x in string test functions 29/16429/2
Lijian.Zhang [Tue, 4 Dec 2018 06:45:41 +0000 (22:45 -0800)]
Fix compiling issue with GCC-8.x in string test functions

Same pointer is passed to two or more restrict-qualified parameters of a function.

vpp/src/plugins/unittest/string_test.c: In function ‘test_strcpy_s’:
vpp/src/plugins/unittest/string_test.c:562:19: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
err = strcpy_s (dst, s1size, dst);
^~~ ~~~

Change-Id: Ica06b457bbcbf2d552eec380976c37f9fd447b1c
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <sirdas@arm.com>
5 years agoVPP-1510: add support for punt delete 67/16367/2
Pavel Kotucek [Wed, 5 Dec 2018 16:16:23 +0000 (17:16 +0100)]
VPP-1510: add support for punt delete

Change-Id: Ibd7b1b13da0861f67e5e9e73bf6539199b3c82ea
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
5 years agoMAP: Fix inverted 'is_add'/'is_del' flag in map_pre_resolve() call. 72/16472/1
Jon Loeliger [Thu, 13 Dec 2018 23:48:21 +0000 (17:48 -0600)]
MAP: Fix inverted 'is_add'/'is_del' flag in map_pre_resolve() call.

Change-Id: I82e95358a4d710f1ddd4c8de584f03798e2b85f1
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoreassembly: fix internal buffer count accounting 64/16464/2
Klement Sekera [Thu, 13 Dec 2018 13:35:48 +0000 (14:35 +0100)]
reassembly: fix internal buffer count accounting

Change-Id: I6af2c8552aeafe0abc8b8c3e5af1a05640e95919
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoVPP-1522: harden reassembly code 32/16432/5
Klement Sekera [Mon, 10 Dec 2018 12:46:09 +0000 (13:46 +0100)]
VPP-1522: harden reassembly code

Change-Id: Ib5a20bff7d8a340ecf50bcd4a023d6bf36382ba3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agofix vlib_buffer_chain_compress assert in debug 35/16435/4
Klement Sekera [Tue, 11 Dec 2018 15:55:33 +0000 (16:55 +0100)]
fix vlib_buffer_chain_compress assert in debug

replace vlib_buffer_advance with its code to work around assert

Change-Id: I6e332527f5e0c10d23305b6fc2e837d8b4f99e78
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agotcp: drop handshake ack with fin set 55/16455/3
Florin Coras [Thu, 13 Dec 2018 07:31:33 +0000 (23:31 -0800)]
tcp: drop handshake ack with fin set

Change-Id: I529c34235ad2b0e4c730959bb1b8c9d50a83738c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agomake build failure. 26/16426/4
Paul Vinciguerra [Mon, 10 Dec 2018 22:50:13 +0000 (14:50 -0800)]
make build failure.

[84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o
FAILED: ccache /usr/lib/ccache/cc  -DWITH_LIBSSL=1 -Dvnet_EXPORTS -I/vpp/src -I. -Iinclude -march=corei7 -mtune=corei7-avx -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -fPIC   -Wno-address-of-packed-member -Wall -MMD -MT vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o -MF vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o.d -o vnet/CMakeFiles/vnet.dir/ip/ip_types_api.c.o   -c /vpp/src/vnet/ip/ip_types_api.c
/vpp/src/vnet/ip/ip_types_api.c: In function 'ip_address_union_encode':
/vpp/src/vnet/ip/ip_types_api.c:70:13: error: incompatible type for argument 1 of 'memcpy'
     memcpy (out->ip6, &in->ip6, sizeof (out->ip6));
             ^
In file included from /usr/include/string.h:635:0,
                 from /vpp/src/vppinfra/string.h:55,
                 from /vpp/src/vppinfra/mem.h:55,
                 from /vpp/src/vppinfra/vec.h:42,
                 from /vpp/src/vppinfra/error.h:53,
                 from /vpp/src/vppinfra/hash.h:41,
                 from /vpp/src/vnet/ip/ip.h:43,
                 from /vpp/src/vnet/ip/ip_types_api.h:23,
                 from /vpp/src/vnet/ip/ip_types_api.c:16:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip6_address_t {aka struct _vl_api_ip6_address}'
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
                                          ^
/vpp/src/vnet/ip/ip_types_api.c:72:13: error: incompatible type for argument 1 of 'memcpy'
     memcpy (out->ip4, &in->ip4, sizeof (out->ip4));
             ^
In file included from /usr/include/string.h:635:0,
                 from /vpp/src/vppinfra/string.h:55,
                 from /vpp/src/vppinfra/mem.h:55,
                 from /vpp/src/vppinfra/vec.h:42,
                 from /vpp/src/vppinfra/error.h:53,
                 from /vpp/src/vppinfra/hash.h:41,
                 from /vpp/src/vnet/ip/ip.h:43,
                 from /vpp/src/vnet/ip/ip_types_api.h:23,
                 from /vpp/src/vnet/ip/ip_types_api.c:16:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:42: note: expected 'void * restrict' but argument is of type 'vl_api_ip4_address_t {aka struct _vl_api_ip4_address}'
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
                                          ^
/vpp/src/vnet/ip/ip_types_api.c: At top level:
cc1: error: unrecognized command line option '-Wno-address-of-packed-member' [-Werror]
cc1: all warnings being treated as errors
[84/597] Building C object vnet/CMakeFiles/vnet.dir/ip/ip4_forward.c.o
ninja: build stopped: subcommand failed.
Makefile:691: recipe for target 'vpp-build' failed
make[1]: *** [vpp-build] Error 1
make[1]: Leaving directory '/vpp/build-root'
Makefile:394: recipe for target 'test' failed
make: *** [test] Error 2

DBGvpp# show cpu
Model name:               Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Microarchitecture:        Haswell (Crystalwell)
Flags:                    sse3 ssse3 sse41 sse42 avx avx2 aes invariant_tsc
Base frequency:           2.49 GHz

DBGvpp# show version verbose
Version:                  v19.01-rc0~447-g3be662f
Compiled by:              vagrant
Compile host:             vpp
Compile date:             Mon Dec 10 14:55:24 PST 2018
Compile location:         /vpp
Compiler:                 GCC 5.4.0 20160609
Current PID:              14104

Change-Id: I6ff03bc5ad1c3517256e244b6986e9a1507a3349
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotest/hook.py. Add human-friendly annotations to log msgs. 39/16439/2
Paul Vinciguerra [Wed, 12 Dec 2018 09:04:20 +0000 (01:04 -0800)]
test/hook.py.  Add human-friendly annotations to log msgs.

*  Add human-friendly annotations to packed data values in
   the logs.

Examples:
vpp-unittest-TestNAT66-_JdbMS/log.txt:22:31:29,152 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=2, dst_address='\xfd\x01\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02 (fd01:2::2)', mac_address='\x02\x02\x00\x00\xff\x02 (02:02:00:00:ff:02)', is_ipv6=1)

vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,130 API: ip_neighbor_add_del (is_static=0, is_no_adj_fib=0, is_add=1, sw_if_index=5, dst_address='\xfd\x01\x00\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9 (fd01:5::c9)', mac_address='\x02\x05\xc9\x00\xff\xc9 (02:05:c9:00:ff:c9)', is_ipv6=1)
vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,240 API: sw_interface_add_del_address (address_length=24, del_all=0, is_add=1, sw_if_index=6, address='\xac\x10\x06\x01 (172.16.6.1)', is_ipv6=0)
vpp-unittest-TestACL_dot1ad_bridged-xEdhrj/log.txt:22:31:17,314 API: sw_interface_add_del_address (address_length=64, del_all=0, is_add=1, sw_if_index=6, address='\xfd\x01\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01 (fd01:6::1)', is_ipv6=1)

Change-Id: Id6991569ee0ff853f76fae8fac941e8a26468a19
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoFix VPP-1530 Classify session creation error 60/16460/3
jackiechen1985 [Thu, 13 Dec 2018 17:43:21 +0000 (01:43 +0800)]
Fix VPP-1530 Classify session creation error

Change-Id: I6f877be6b3a1ef7100607560d430400bb824b6ba
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
5 years agotcp: fix handling of no wscale in syns 53/16453/2
Florin Coras [Thu, 13 Dec 2018 03:25:43 +0000 (19:25 -0800)]
tcp: fix handling of no wscale in syns

Change-Id: I7219a8d315b312812acafd9d2709fba8b4a2a679
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoldp/vcl: reduce debug verbosity 52/16452/2
Florin Coras [Thu, 13 Dec 2018 02:19:39 +0000 (18:19 -0800)]
ldp/vcl: reduce debug verbosity

Also cleanup some ldp debug code.

Change-Id: I23d1b9d744289244f4778f623702fc2b5d6fcd8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: validate seq for handshake ack 50/16450/2
Florin Coras [Wed, 12 Dec 2018 22:34:38 +0000 (14:34 -0800)]
tcp: validate seq for handshake ack

Change-Id: Ifc0584d781efc30904069ea17c0afbb68c49c442
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession/tcp: support tx flush mark 48/16448/4
Florin Coras [Wed, 12 Dec 2018 18:56:01 +0000 (10:56 -0800)]
session/tcp: support tx flush mark

For tcp this means that the last enqueued data goes out with a psh bit
set.

Change-Id: I29d357ecae6f02e748b59a7b799150ec73d14ba2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAPI: Use string type instead of u8. 26/16326/10
Ole Troan [Wed, 28 Nov 2018 10:36:05 +0000 (11:36 +0100)]
API: Use string type instead of u8.

The new string type is modelled after string in proto3.
It is always variable length.

Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agodocs: Update the requirements 49/16449/2
jdenisco [Wed, 12 Dec 2018 19:45:35 +0000 (14:45 -0500)]
docs: Update the requirements

Change-Id: I80ea8a65317805c6542e338a92a21e6090f6c015
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agoip4_rewrite_inline: fix variable error 54/16454/2
Zhiyong Yang [Thu, 13 Dec 2018 06:09:40 +0000 (14:09 +0800)]
ip4_rewrite_inline: fix variable error

Change-Id: I0470b4b13095583fe018f565f100342fab45715e
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
5 years agovapi: code cleanup 43/16443/2
Klement Sekera [Wed, 12 Dec 2018 11:57:32 +0000 (12:57 +0100)]
vapi: code cleanup

Change-Id: If3bdb4369d6055e06a9b29bcba37785dbd32eb71
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovom: Add support for new stats 22/16122/24
Mohsin Kazmi [Wed, 21 Nov 2018 18:00:46 +0000 (19:00 +0100)]
vom: Add support for new stats

This patch deprecates old stats and adds support for
new stats.

This implements the PULL design where client will enable
stats on objects (i.e. interfaces, etc), register a call
back function which will run once stats will be ready for
enabled object and call HW::read_stats() periodically to
read stats for enabled objects from VPP.

Change-Id: I32525a417427be87408d01f8bc93a731602ff690
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoVPP-1529: check hop-by-hop header length 45/16445/1
Dave Barach [Wed, 12 Dec 2018 13:29:41 +0000 (08:29 -0500)]
VPP-1529: check hop-by-hop header length

Fix a single packet-of-death case, caught by vlib_buffer_advance() in
debug images.

Change-Id: I9c107f20d7c053c3e40a0756dd7ca1c3be276a1a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoVOM: vxlan-tunnel takes egress interface for multicast 34/16434/2
Neale Ranns [Tue, 11 Dec 2018 16:40:20 +0000 (08:40 -0800)]
VOM: vxlan-tunnel takes egress interface for multicast

Change-Id: I23b44d883fbd7919bf55b96b180f97837fd6dae9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodpdk: net/bonding: fix buffer corruption in packets 07/16407/2
Igor Mikhailov (imichail) [Fri, 7 Dec 2018 19:27:24 +0000 (11:27 -0800)]
dpdk: net/bonding: fix buffer corruption in packets

This fix is needed for setup with bonded interfaces.
In some scenarios vpp might crash, this change fixes the issue.

Change-Id: I0dc66e32b6c89dc3f8d552401833d6785a12c978
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agoFix CDP failure in make test 28/16428/2
Lijian.Zhang [Mon, 10 Dec 2018 10:08:02 +0000 (02:08 -0800)]
Fix CDP failure in make test

Once the hostname is longer than 15 bytes,
the name of device in the output of show cdp command will be truncated,
and CDP test case will fail with below message.

==============================================================================
FAIL: test_send_cdp_packet (test_cdp.TestCDP)
------------------------------------------------------------------------------
Traceback (most recent call last):
File "vpp/test/test_cdp.py", line 92, in test_send_cdp_packet
    "CDP received invalid device id")
File "vpp/test/framework.py", line 804, in assert_equal
    self.assertEqual(real_value, expected_value, msg)
AssertionError: Invalid CDP received invalid device id: net-x86-supermi does not match expected value net-x86-supermicro-02

Change-Id: Ia32b92c6cd1bb6070adcee3ec45e38399ec382a7
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
5 years agoPAPI: Allow ipaddress object as argument and return values from API calls 31/16431/3
Ole Troan [Tue, 11 Dec 2018 12:04:01 +0000 (13:04 +0100)]
PAPI: Allow ipaddress object as argument and return values from API calls

The API calls that use any of vl_api_address_t, vl_api_ip4_address,
vl_api_ip6_address_t, vl_api_prefix_t, vl_api_ip4_prefix_t,
vl_api_ip6_prefix_t now accepts either the old style dictionary,
a text string (2001:db8::/32) or an ipaddress ojbect.

Unless it is called with '_no_type_conversion':True, it will
also return an appropriate ipaddress object.

Change-Id: I84e4a1577bd57f6b5ae725f316a523988b6a955b
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agofix spurious error setting SA on ipsec intf 85/16385/2
Matthew Smith [Wed, 5 Dec 2018 20:41:21 +0000 (14:41 -0600)]
fix spurious error setting SA on ipsec intf

Reverse the polarity on test to determine if old SA session
deletion succeeded. 0 == success, not failure.

Change-Id: I499cb04c7f13165e6c92367d4385057b77fe3836
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoChange ipsec feature node names 24/16424/2
Pierre Pfister [Mon, 10 Dec 2018 16:01:01 +0000 (17:01 +0100)]
Change ipsec feature node names

ipsec4-output and ipsec6-output were conflicting with ipsec
interface names ("ipsec<id>") and vnet/interface.c autogenerated
output node ("<ifname>-output").

Changing feature names seems to be the less invasive option.
This patch also changes "input" feature names for consistency.

Change-Id: I4ba10d07e9ba09df20aa2500104252b06b55f8f7
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
5 years agoNew api in order to get max entries of connection table is added. 11/16411/9
Khers [Mon, 10 Dec 2018 09:52:14 +0000 (13:22 +0330)]
New api in order to get max entries of connection table is added.

Change-Id: I2f81ec95de55ad2355f82550451ad825c228e5cd
Signed-off-by: Khers <s3m2e1.6star@gmail.com>
5 years agoFix vat dependencies 35/16335/3
juraj.linkes [Tue, 4 Dec 2018 12:03:15 +0000 (13:03 +0100)]
Fix vat dependencies

Needed for arm machines in CI.

Change-Id: Ib16a8b63e145116c7cb22376243e9026d9545c8a
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoFix typo in sanity test description 54/16254/3
juraj.linkes [Wed, 28 Nov 2018 13:30:34 +0000 (14:30 +0100)]
Fix typo in sanity test description

Change-Id: Icd575b8ed62c340c57857ff6576f65557434f3e0
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoAdd IPSec interface FIB index for TX packet 12/16412/6
Pierre Pfister [Mon, 10 Dec 2018 10:19:08 +0000 (11:19 +0100)]
Add IPSec interface FIB index for TX packet

This patch adds a configuration parameter to IPSec tunnels, enabling
custom FIB selection for encapsulated packets.
Although this option could also be used for policy-based IPSec,
this change only enables it for virtual-tunnel-interface mode.

Note that this patch does change the API default behavior regarding
TX fib selection for encapsulated packets.
Previous behavior was to use the same FIB after and before encap.
The new default behavior consists in using the FIB 0 as default.

Change-Id: I5c212af909940a8cf6c7e3971bdc7623a2296452
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
5 years agoFix [csit-dev] CSIT IPv6 IPSec transport mode tests are failing 15/16415/3
jackiechen1985 [Mon, 10 Dec 2018 20:13:22 +0000 (04:13 +0800)]
Fix [csit-dev] CSIT IPv6 IPSec transport mode tests are failing

Change-Id: I7893a8fd5b3e15063675597c0e9bd1cd0b49ef0e
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
5 years agoMAP: Add API support for setting parameters. 97/16397/8
Jon Loeliger [Thu, 6 Dec 2018 17:49:17 +0000 (11:49 -0600)]
MAP: Add API support for setting parameters.

Change-Id: Ic67073e1f2ebe54bee5cb96a951eb92a28b1de06
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoVOM: vxlan-gbp 20/16420/4
Neale Ranns [Mon, 10 Dec 2018 14:01:46 +0000 (06:01 -0800)]
VOM: vxlan-gbp

Change-Id: I5f4464435f1346207f2f9b497369795eb82b58b6
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIP-local: any IP can appear as the source (VPP-1522) 10/16410/2
Neale Ranns [Sun, 9 Dec 2018 20:54:51 +0000 (12:54 -0800)]
IP-local: any IP can appear as the source (VPP-1522)

Change-Id: Ib0d9b533d72c899b77c9a7bd1daa9b4a55b7221c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotest/framework.py: change logger to return 'e' format. 09/16409/6
Paul Vinciguerra [Sun, 9 Dec 2018 23:37:04 +0000 (15:37 -0800)]
test/framework.py: change logger to return 'e' format.

* When the framework logs an unexpected sleep time,
  display the units in the same format. Typically,
  it has been returning a float and an 'e'.
  ex. unexpected time.sleep() result - slept for 0.000107049942017s instead of ~4.88758087158e-05s!

* Defer logger interpolation.

Change-Id: I543ad6d41c7f263d61615341437f80973c0017de
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoPython API: Use services to determine stream RPC 06/16406/3
Ole Troan [Fri, 7 Dec 2018 13:31:16 +0000 (14:31 +0100)]
Python API: Use services to determine stream RPC

The services {} definitions contain which APIs are streaming.
In addition only create function definition for the client side
(not for reply messages).

Change-Id: I8e83d35386cdd9ebee83d4571eaebdc6dff19e82
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoTest framework: StringIO fixes for Python3 81/16381/7
Ole Troan [Thu, 6 Dec 2018 16:35:12 +0000 (17:35 +0100)]
Test framework: StringIO fixes for Python3

Add 2/3 support to binarytomac and mactobinary and move to vpp_mac.py

Change-Id: I3dc7e4a24486aee22140c781aae7e44e58935877
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFIB recusrion loop checks traverse midchain adjacencies 73/16373/2
Neale Ranns [Thu, 6 Dec 2018 13:46:49 +0000 (13:46 +0000)]
FIB recusrion loop checks traverse midchain adjacencies

if a tunnel's destination address is reachable through the tunnel
(see example config belwo) then search for and detect a recursion
loop and don't stack the adjacency. Otherwise this results in a
nasty surprise.

DBGvpp# loop cre
DBGvpp# set int state loop0 up
DBGvpp# set int ip addr loop0 10.0.0.1/24
DBGvpp# create gre tunnel src 10.0.0.1 dst 1.1.1.1
DBGvpp# set int state gre0 up
DBGvpp# set int unnum gre0 use loop0
DBGvpp# ip route 1.1.1.1/32 via gre0

DBGvpp# sh ip fib 1.1.1.1
ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] locks:[src:plugin-hi:2, src:default-route:1, ]
1.1.1.1/32 fib:0 index:11 locks:4   <<< this is entry #11
  src:CLI refs:1 entry-flags:attached, src-flags:added,contributing,active,
    path-list:[14] locks:2 flags:shared,looped, uPRF-list:12 len:1 itfs:[2, ]
      path:[14] pl-index:14 ip4 weight=1 pref=0 attached-nexthop:  oper-flags:recursive-loop,resolved, cfg-flags:attached,
        1.1.1.1 gre0 (p2p)
          [@0]: ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800
             stacked-on entry:11:  <<<< and the midchain forwards via entry #11
               [@2]: dpo-drop ip4

  src:recursive-resolution refs:1 src-flags:added, cover:-1

 forwarding:   unicast-ip4-chain
  [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:12 to:[0:0]]
    [0] [@6]: ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800
        stacked-on entry:11:
          [@2]: dpo-drop ip4

DBGvpp# sh adj 1
[@1] ipv4 via 0.0.0.0 gre0: mtu:9000 4500000000000000fe2fb0cc0a0000010101010100000800
  stacked-on entry:11:
    [@2]: dpo-drop ip4
   flags:midchain-ip-stack midchain-looped  <<<<< this is a loop
   counts:[0:0]
   locks:4
 delegates:

 children:
  {path:14}

Change-Id: I39b82bd1ea439be4611c88b130d40289fa0c1b59
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: improve check for invalid sack blocks 00/16400/2
Florin Coras [Fri, 7 Dec 2018 02:24:19 +0000 (18:24 -0800)]
tcp: improve check for invalid sack blocks

Change-Id: Ic6a6202a2d5aca33eee7fc6ff8eeaa1db9b58525
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: measure us rtt with syn-ack 99/16399/2
Florin Coras [Fri, 7 Dec 2018 01:41:10 +0000 (17:41 -0800)]
tcp: measure us rtt with syn-ack

Change-Id: I20820145377060e12aeeb23b433206c79fd88332
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix timestamp check and paws 98/16398/2
Florin Coras [Fri, 7 Dec 2018 01:24:59 +0000 (17:24 -0800)]
tcp: fix timestamp check and paws

Change-Id: I5a5ee48755befc370a1f89ddbb0d91f164ed564f
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: better handling of options only allowed in syns 63/16363/4
Florin Coras [Wed, 5 Dec 2018 23:59:31 +0000 (15:59 -0800)]
tcp: better handling of options only allowed in syns

Change-Id: I6debfe85d9d55f6f9a8ef0ce1dcc008393847a37
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: validate connection state in retransmit 61/16361/3
Florin Coras [Wed, 5 Dec 2018 19:19:14 +0000 (11:19 -0800)]
tcp: validate connection state in retransmit

Change-Id: Ia9048bb4e074f7ebc36eb77e542a916924103332
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix length check 60/16360/2
Florin Coras [Wed, 5 Dec 2018 18:03:34 +0000 (10:03 -0800)]
tcp: fix length check

Change-Id: Iff75be238a231df88a37b61610c134e4a4770708
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVPP-1506: dump local punts and registered punt sockets 66/16366/5
Pavel Kotucek [Wed, 28 Nov 2018 06:42:11 +0000 (07:42 +0100)]
VPP-1506: dump local punts and registered punt sockets

Change-Id: If7835e9b80ec9402404bfc8d271eb11a10ef992b
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
5 years agoTest reader thread hardening 75/16275/5
juraj.linkes [Thu, 29 Nov 2018 08:56:35 +0000 (09:56 +0100)]
Test reader thread hardening

The test reader thread could get stuck in case an unexpected Exception
was raised during test runs in parent thread. Catch the Exception, close
the thread and raise the Exception to avoid this.

Change-Id: I3a9298d593c334d96d04b6207d604b684572a2ac
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agovpp_if_stats: Fixing a bug in getting vpp interfaces indexes 68/16368/3
Koren Lev [Thu, 6 Dec 2018 08:51:18 +0000 (10:51 +0200)]
vpp_if_stats: Fixing a bug in getting vpp interfaces indexes

Change-Id: I6290945a94b4f7878e9af94cc7daec455327482e
Signed-off-by: Koren Lev <korenlev@gmail.com>
5 years agoFix VPP-1515 IPSec receive packet error in transport mode with udp encap 50/16350/5
jackiechen1985 [Wed, 5 Dec 2018 19:10:31 +0000 (03:10 +0800)]
Fix VPP-1515 IPSec receive packet error in transport mode with udp encap

Change-Id: Ife66395b89e1e9f9206666e5f0fd441b3c241bb2
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
5 years agovom: Fix the api type definition 96/16396/2
Mohsin Kazmi [Thu, 6 Dec 2018 16:36:55 +0000 (08:36 -0800)]
vom: Fix the api type definition

Change-Id: I1e5f5a0d60745a42e6efaab3b6eb49b6b0e74e36
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoFix L2BD arp termination Test Case 09/16309/5
Paul Vinciguerra [Fri, 30 Nov 2018 20:03:04 +0000 (12:03 -0800)]
Fix L2BD arp termination Test Case

This patch is a followup to: https://gerrit.fd.io/r/#/c/16307/ which is
currently causing ubuntu1804 to complain.

See: https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-beta-verify-master-ubuntu1804/3837/console-timestamp.log.gz
s/RuntimeError/ for details.

==============================================================================
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: If66f22412f8aa36b183131cd22af4b3e7a20da46
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRename VPP_TEST_FAILED_DIR to FAILED_DIR 23/16323/2
juraj.linkes [Mon, 3 Dec 2018 13:08:07 +0000 (14:08 +0100)]
Rename VPP_TEST_FAILED_DIR to FAILED_DIR

15999 renamed VPP_TEST_FAILED_DIR, but not in all files. Fix this in the
one remaining file.

Change-Id: I159cdc86bfd5dd33af74256830873a8d081f1a73
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agostat_client: Fix the type casting 36/16336/7
Mohsin Kazmi [Tue, 4 Dec 2018 14:31:15 +0000 (14:31 +0000)]
stat_client: Fix the type casting

Change-Id: I9726ac5cc7292a492928b213bc85ccfa8a26c1cb
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoSkip failing ARM testcases for CI 82/16282/8
juraj.linkes [Thu, 29 Nov 2018 08:37:08 +0000 (09:37 +0100)]
Skip failing ARM testcases for CI

There are a few tests that fail on ARM and thus we can't enable testing
in CI. Skip the failing tests until they're fixed so that we catch new
failures in CI (when we enable testing for the remaining tests).

Change-Id: Ie896ef5c449ef965029633e38d317a8d5ac26352
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoTest framework: fix import logic for sphynx. 86/16386/2
Paul Vinciguerra [Thu, 6 Dec 2018 17:32:45 +0000 (09:32 -0800)]
Test framework: fix import logic for sphynx.

  * Simplify conditional import. Remove global variable.
  * Fix vpp_l2 import side effect.

Change-Id: I3945cf2a0cf8844004af2cd636f92d73ddc60f93
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
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>