5675 Commits

Author SHA1 Message Date
Neale Ranns
66b48a9c61 VOM: IGMP only supports IPv4
Change-Id: Ie0a8898fa2d8ab71522686fb83fb1de959ee3098
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-17 16:30:50 +00:00
Ole Troan
f49ba0e81e stats: Deprecate old stats framework
Change-Id: Iecdf0e5767115ef0570e9ea7212dc4644cf4afbd
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-17 15:02:55 +00:00
Klement Sekera
b6d92d811c make test: add option for adding extra vpp config
Change-Id: Ief316756635794dadf2f0f4190aa20745df5e53c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-17 14:31:00 +01:00
Koichiro Den
be420e59e9 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>
2018-12-17 10:52:34 +00:00
Paul Vinciguerra
4eed7474f4 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>
2018-12-17 10:14:12 +00:00
msardara
8f554b793c 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>
2018-12-17 09:25:18 +00:00
Ole Troan
d6e9aecfd6 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>
2018-12-17 08:48:24 +00:00
Florin Coras
3c7d4f9e1f vcl/session: handle reset/disconnect before app accept
Also further improves reset handling.

Change-Id: I6e517632f700f181761726b965134e0c217eb06d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17 08:47:39 +00:00
Steven
7bb27caf62 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>
2018-12-17 08:35:02 +00:00
Jon Loeliger
18f34a86a4 MAP: Encode ht-ratio as f64 for API.
Change-Id: I5f05f112e8002e8b57db5c7a215ca4778ab6f76a
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-12-17 08:23:53 +00:00
Dave Wallace
4659d0e823 docs: clarify vector element alignment description.
Change-Id: I6da153779010263e6fc4b51c64b01444aaadca17
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-12-17 00:10:16 +00:00
Klement Sekera
4ee633e84a VPP-1523: harden reassembly
Change-Id: I00d7b38bd99e81e3921ce08cce50d613f11de36e
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-16 01:01:12 +00:00
Neale Ranns
ae8098350c IP6-MFIB: replace the radix tree with bihash (VPP-1526)
Change-Id: I7a48890c075826fbd8c75436dfdc5ffff230a693
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-16 01:00:32 +00:00
Neale Ranns
7e70ff52c1 VOM: fixes for stats
Change-Id: I62582123361e091e79bbcc6d71794c6f76216b25
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-16 00:59:53 +00:00
Ole Troan
884f0aff0e 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>
2018-12-14 22:50:51 +00:00
Dave Barach
c5b6b31980 Revert gerrit 16429 to fix a Debian build-break
Change-Id: I9382bc981c25a29c293f7ddc6ed3d34130678696
Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-14 15:38:07 -05:00
Matus Fabian
a5e73762d5 NAT: counters (VPP-1484)
Change-Id: I5d1852a09712adfe7547c200d161539736aca6f5
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-14 19:47:37 +00:00
juraj.linkes
2eca70db95 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>
2018-12-14 19:46:42 +00:00
Lijian.Zhang
ac475f4bf4 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>
2018-12-14 13:26:46 +00:00
Pavel Kotucek
41b923a175 VPP-1510: add support for punt delete
Change-Id: Ibd7b1b13da0861f67e5e9e73bf6539199b3c82ea
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-14 12:33:44 +00:00
Jon Loeliger
cbee13a13a MAP: Fix inverted 'is_add'/'is_del' flag in map_pre_resolve() call.
Change-Id: I82e95358a4d710f1ddd4c8de584f03798e2b85f1
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-12-13 17:48:21 -06:00
Klement Sekera
400f6d8c1b reassembly: fix internal buffer count accounting
Change-Id: I6af2c8552aeafe0abc8b8c3e5af1a05640e95919
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13 14:42:50 +00:00
Klement Sekera
14d7e90788 VPP-1522: harden reassembly code
Change-Id: Ib5a20bff7d8a340ecf50bcd4a023d6bf36382ba3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13 14:42:50 +00:00
Klement Sekera
69db1a6084 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>
2018-12-13 14:42:14 +00:00
Florin Coras
2e7e6ae11f tcp: drop handshake ack with fin set
Change-Id: I529c34235ad2b0e4c730959bb1b8c9d50a83738c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13 14:41:22 +00:00
Paul Vinciguerra
21bb9af16e 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>
2018-12-13 14:34:15 +00:00
Paul Vinciguerra
1314ec6170 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>
2018-12-13 14:32:10 +00:00
jackiechen1985
e91e6de840 Fix VPP-1530 Classify session creation error
Change-Id: I6f877be6b3a1ef7100607560d430400bb824b6ba
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
2018-12-13 14:30:18 +00:00
Florin Coras
e80b59104f tcp: fix handling of no wscale in syns
Change-Id: I7219a8d315b312812acafd9d2709fba8b4a2a679
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13 13:41:01 +00:00
Florin Coras
05ecfcc08a ldp/vcl: reduce debug verbosity
Also cleanup some ldp debug code.

Change-Id: I23d1b9d744289244f4778f623702fc2b5d6fcd8b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13 13:41:01 +00:00
Florin Coras
4850e3e73c tcp: validate seq for handshake ack
Change-Id: Ifc0584d781efc30904069ea17c0afbb68c49c442
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-13 13:40:45 +00:00
Florin Coras
42ceddb7cd 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>
2018-12-13 13:40:32 +00:00
Ole Troan
413f4a5b21 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>
2018-12-13 12:11:50 +00:00
jdenisco
6f666ad99a docs: Update the requirements
Change-Id: I80ea8a65317805c6542e338a92a21e6090f6c015
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-12-13 08:14:30 +00:00
Zhiyong Yang
b2ecc5d415 ip4_rewrite_inline: fix variable error
Change-Id: I0470b4b13095583fe018f565f100342fab45715e
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2018-12-13 08:12:39 +00:00
Klement Sekera
173e20ceae vapi: code cleanup
Change-Id: If3bdb4369d6055e06a9b29bcba37785dbd32eb71
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2018-12-13 08:03:01 +00:00
Mohsin Kazmi
51edc3ab01 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>
2018-12-13 07:46:02 +00:00
Dave Barach
eb6c799947 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>
2018-12-12 08:30:11 -05:00
Neale Ranns
cf3ecb1a42 VOM: vxlan-tunnel takes egress interface for multicast
Change-Id: I23b44d883fbd7919bf55b96b180f97837fd6dae9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-12 12:05:49 +00:00
Igor Mikhailov (imichail)
11312ef90b 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>
2018-12-12 00:36:14 +00:00
Lijian.Zhang
ca7f53a171 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>
2018-12-12 00:35:27 +00:00
Ole Troan
0bcad32b38 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>
2018-12-12 00:34:43 +00:00
Matthew Smith
41b25cf638 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>
2018-12-12 00:34:27 +00:00
Pierre Pfister
057b3565a0 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>
2018-12-12 00:34:13 +00:00
Khers
bb5d22dafb New api in order to get max entries of connection table is added.
Change-Id: I2f81ec95de55ad2355f82550451ad825c228e5cd
Signed-off-by: Khers <s3m2e1.6star@gmail.com>
2018-12-11 15:13:37 +00:00
juraj.linkes
a409f2729a Fix vat dependencies
Needed for arm machines in CI.

Change-Id: Ib16a8b63e145116c7cb22376243e9026d9545c8a
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-11 12:57:00 +00:00
juraj.linkes
185e6490ee Fix typo in sanity test description
Change-Id: Icd575b8ed62c340c57857ff6576f65557434f3e0
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-11 12:55:41 +00:00
Pierre Pfister
4c422f9a3c 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>
2018-12-11 12:42:09 +00:00
jackiechen1985
240f69aed7 Fix [csit-dev] CSIT IPv6 IPSec transport mode tests are failing
Change-Id: I7893a8fd5b3e15063675597c0e9bd1cd0b49ef0e
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
2018-12-11 12:40:52 +00:00
Jon Loeliger
5a2e278a09 MAP: Add API support for setting parameters.
Change-Id: Ic67073e1f2ebe54bee5cb96a951eb92a28b1de06
Signed-off-by: Jon Loeliger <jdl@netgate.com>
2018-12-11 06:32:21 +00:00