5647 Commits

Author SHA1 Message Date
Stephen Hemminger
6fbef23228 vlib: support Hyper-v/Azure VMBus
This patch adds support for VMBus to the VPP infrastructure.
Since the only device that matters is the netvsc Poll Mode Driver
in DPDK, the infrastructure is much simpler than PCI.

Change-Id: Ie96c897ad9c426716c2398e4528688ce2217419b
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-12-19 08:34:39 +01:00
jdenisco
b0b9dadc5c Allow the user to select master or release during the install
Change-Id: Ifef937c4347ba40bde55958f93f2d1720996539f
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-12-19 07:25:12 +00:00
Dave Barach
4d3739dddb dpdk plugin: blacklist PCI devices by type
Change-Id: I89695c1ad47131ed830f35c677937ce12025a40d
Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-19 07:24:56 +00:00
Florin Coras
a9d5bea69f tcp/session: drop connections if message queue is full
Also cleanup session table when transport closes and app didn't reply to
the close notification.

Change-Id: Ie3d518e3afff73437561561b46dbf695c24632ad
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-18 22:42:37 +00:00
Paul Vinciguerra
65eb77231c VPP-1508: Have test/Makefile honor PYTHON= envvar.
Change-Id: Iff71a5982b73c97e3f546beb1cf52935a267f5f5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-18 20:33:14 +00:00
Matus Fabian
b686508c4e NAT44: nat44_add_del_lb_static_mapping enhancements (VPP-1514)
Change-Id: I5419e06592b0402e911e132796368800321f355a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-18 13:36:39 +00:00
Ole Troan
003d5da298 VAPI/VOM: Removing legacy stats tests, add string type.
Fix misc VAPI/VOM generation and test cases.

Change-Id: I1abf9ecdb6f8a2129f11e0a9ed1c0fe04cdf5c47
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 13:30:40 +00:00
Ole Troan
91bfa6e266 MAP: Add longest matching prefix (LPM) data structures
In preparation for adding input feature MAP support, as opposed to
going via the FIB, add MAP's own LPM data structures.

Change-Id: Ie363f0961b0ac9dde2a0fb76cb0c58c904876974
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 13:02:45 +00:00
Neale Ranns
9e829a856f MFIB: recurse resolution through an MFIB entry
Change-Id: I8dc261e40b8398c5c8ab6bb69ecebbd0176055d9
Signed-off-by: Neale Ranns <nranns@cisco.com>
2018-12-18 12:52:56 +00:00
Paul Vinciguerra
05b5d1b3a6 make wipe: Clean up *.api.json files.
Change-Id: I0cb1a1b5bf9003d7b5231452e85d535c9cb2b6ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-12-18 12:44:26 +00:00
Thomas F Herbert
6eb61639de Build changes required for Fedora and CentOS
VPP-1511

cmake is the dep for Fedora but cmake3 is for CentOS 7.
Centos: explicitly install epel-release on Centos.
Epel requirement is now explicit for cmake3, and ninja-build.
Remove references to Fedora 25 which is EOL.

Change-Id: I1548ddf2e5421097ac0ddc2d99abce7582d0d593
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
2018-12-18 12:43:33 +00:00
Ole Troan
8006c6aa42 PAPI: Add MACAddress object wrapper for vl_api_mac_address_t
Change the definition of vl_api_mac_address_t to an aliased type.

Change-Id: I1434f316d0fad6a099592f39bceeb8faeaf1d134
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 11:54:24 +00:00
Ole Troan
02782d6ebd MAP: Remove dual loop in MAP-T in preparation for refactor.
Change-Id: I3c77cadaa7b677073af00407f368bd48d703fdac
Signed-off-by: Ole Troan <ot@cisco.com>
2018-12-18 11:54:08 +00:00
Florin Coras
e78ac9debb tcp: cleanup connections if handshake fails
Change-Id: If109d6772cbd58f4f2a56ae7ec593639d1fa1b96
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-18 09:41:48 +00:00
Mauro Sardara
ec0cc2cf05 Remove autotools files from extras/libmemif
Change-Id: I6c5f7ab5bb6c0022746d3feedd71b5981f31c7fb
Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
2018-12-18 09:35:08 +00:00
Pavel Kotucek
9edb83a37c punt: additional tests for multi clients
Change-Id: I0e25c23fc7b44b465f1b0d05a881fbe9816a0264
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
2018-12-18 08:52:52 +00:00
Matus Fabian
b0055c8157 STATS: add vlib_set_simple_counter (VPP-1484)
Change-Id: Iacaa75c7e1c974642c1dc1e0c3cf5c36c78450d7
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2018-12-18 07:45:33 +00:00
Dave Barach
bef3619d25 Improve perfmon json table picker
Built a tool to chew up https://download.01.org/perfmon/mapfile.csv,
and output a table in this format:

typedef struct {
  u8 model;
  u8 stepping;
  u8 has_stepping;
  char *filename;
} file_by_model_and_stepping_t;

static const file_by_model_and_stepping_t fms_table [] =
{
 /* model, stepping, stepping valid, file */
  { 0x2E, 0x0, 0, "NehalemEX_core_V2.json" },
  { 0x1E, 0x0, 0, "NehalemEP_core_V2.json" },
<snip>
  { 0x55, 0x5, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x6, 1, "cascadelakex_core_v1.00.json" },
  { 0x55, 0x7, 1, "cascadelakex_core_v1.00.json" },
<snip>

Change-Id: Ie0e8a7e851799e9d060b966047745039c066ec7b
Signed-off-by: Dave Barach <dave@barachs.net>
2018-12-17 23:12:54 +00:00
jdenisco
82b22f75b9 docs: Add vmxmet3 driver
Change-Id: I96425804c310a1ac1b7f5f12bb636e591c7bd429
Signed-off-by: jdenisco <jdenisco@cisco.com>
2018-12-17 21:35:27 +00:00
Florin Coras
8124cb7840 tcp: fix handling of broken syn options
Change-Id: Ia8b2a077ba4897ddd15cf33221b191cd7a3f1d33
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17 18:51:19 +00:00
Florin Coras
91236ce011 tcp: accept rst that fail paws
Change-Id: I945d1644a23b6a3d50c9beaffc732d2b6facd974
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17 17:22:35 +00:00
Florin Coras
05ce4b8b79 vcl: handle reset while reading/writing data
Change-Id: I73d1dde5b78bbb7835f3a4f0d35fc0d5e46ec103
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-12-17 17:22:22 +00:00
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