vpp.git
5 years agobonding: support custom interface IDs 65/16465/8
Alexander Chernavin [Thu, 13 Dec 2018 14:08:09 +0000 (09:08 -0500)]
bonding: support custom interface IDs

Change-Id: I78fe58144fa3ba2e1c7135897a13a2541f235c91
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
5 years agodpdk: show hardware may display the wrong information for rss active 66/16766/2
Steven [Fri, 11 Jan 2019 16:29:41 +0000 (08:29 -0800)]
dpdk: show hardware may display the wrong information for rss active

Some dpdk driver does not support rte_eth_dev_rss_hash_conf_get. When that
happens, we display whatever that was in the stack variable for rss_hf which
is confusing.

The fix is to clear rss_hf prior to the call.

Before the fix
--------------
DBGvpp# sh hard
              Name                Idx   Link  Hardware
format_dpdk_device:599: rte_eth_dev_rss_hash_conf_get returned -95
GigabitEthernet13/0/0              2     up   GigabitEthernet13/0/0
  Link speed: 10 Gbps
  Ethernet address 00:0c:29:c4:8c:eb
  VMware VMXNET3
  ...
    rss avail:         ipv4 ipv4-tcp ipv6 ipv6-tcp
    rss active:        ipv4 ipv4-frag ipv4-tcp ipv4-udp ipv4-other

After the fix
-------------
DBGvpp# sh hard
              Name                Idx   Link  Hardware
format_dpdk_device:600: rte_eth_dev_rss_hash_conf_get returned -95
GigabitEthernet13/0/0              2     up   GigabitEthernet13/0/0
  Link speed: 10 Gbps
  Ethernet address 00:0c:29:c4:8c:eb
  VMware VMXNET3
  ..
    rss avail:         ipv4 ipv4-tcp ipv6 ipv6-tcp
    rss active:        none

Change-Id: If8f8327f0012eecc8d23cd7f3f9cc581ca025654
Signed-off-by: Steven <sluong@cisco.com>
5 years agosession: generate wrong thread errors instead of crashing 58/16758/4
Florin Coras [Thu, 10 Jan 2019 20:42:47 +0000 (12:42 -0800)]
session: generate wrong thread errors instead of crashing

Change-Id: I7e59ae718d2722c49d42b22a0874e1645a191e89
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix custom-dump for gre_add_del_tunnel: src and dst IPs 67/16767/2
Igor Mikhailov (imichail) [Fri, 11 Jan 2019 21:59:04 +0000 (13:59 -0800)]
Fix custom-dump for gre_add_del_tunnel: src and dst IPs

Change-Id: I747ca01dc8df9fb5e11168ec46979c4a1f1baa7c
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agoFix 'show interface span' field length 68/16768/1
Igor Mikhailov (imichail) [Fri, 11 Jan 2019 22:03:53 +0000 (14:03 -0800)]
Fix 'show interface span' field length

Allow to display longer interface names, e.g. VirtualEthernet0/0/0.102
The field length (32) is now the same as for 'show interface'.

Change-Id: I1cb1efd459acb800bfaeeec40b672c8b17cd8c3d
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agoFix interactive tests 49/16749/4
juraj.linkes [Thu, 10 Jan 2019 11:13:07 +0000 (12:13 +0100)]
Fix interactive tests

When running tests interactively (i.e. not using child process) the
tests are split into small suites each containing tests from a
VPPTestCase, but only the first suite is run. Fix this by creatin a new
suite with all of these small suites in it and running that suite.

Change-Id: I0236f4a980d01765eb993f41d54d98640bb2cd39
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agogbp2: Fix typo in condition 15/16715/6
Mohsin Kazmi [Mon, 7 Jan 2019 14:33:13 +0000 (15:33 +0100)]
gbp2: Fix typo in condition

Change-Id: I1b327309586c9234a22cda011953a1940d31e1ba
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agostrncpy_s_inline copies more bytes than necessary 23/16723/2
Steven [Tue, 8 Jan 2019 04:32:01 +0000 (20:32 -0800)]
strncpy_s_inline copies more bytes than necessary

Given n equals to the maximum number of bytes to copy from src in the API,
or the rough estimate strlen of src, strncpy_s_inline should not copy more
than the number of bytes, computed by strlen(src), to dst if n is greater than
strlen(src). The number of bytes to copy is computed by strnlen(src,n), not n.

Change-Id: I088b46125d9776962750e121f1fbf441952efc2b
Signed-off-by: Steven <sluong@cisco.com>
5 years agovpp_config: Rework for Python2/3 compatibility. 55/16555/7
Paul Vinciguerra [Wed, 19 Dec 2018 10:05:25 +0000 (02:05 -0800)]
vpp_config: Rework for Python2/3 compatibility.

On ubuntu:
   $cd <basedir>/extras/vpp_config
   $./scripts/clean.sh
   $./scripts/cp-data.sh
   $sudo apt-get install python3-pip python3-setuptools
   $python3 -m pip install .
   $vpp-config

Changes:
   * Convert to print() function.
   * raw_input changes.
   * floor division changes.
   * replace vpp-config.py with a setuptools 'vpp-config' entry_point.
   * replace netaddr with ipaddress from the standard library and backport.
   * .decode() subprocess.Popen's stdout because in python3 they are bytes.

Change-Id: Id98894ee54e0c31a0ba0304134b159caef415705
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoVOM: IP route ECMP support 53/16753/2
Neale Ranns [Thu, 10 Jan 2019 16:56:38 +0000 (08:56 -0800)]
VOM: IP route ECMP support

Change-Id: Iede0c30aacfe7289f428062bb9540410097c40e2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession/vcl: improve fifo tx notifications 44/16744/4
Florin Coras [Thu, 10 Jan 2019 04:04:38 +0000 (20:04 -0800)]
session/vcl: improve fifo tx notifications

Change-Id: Ied476c417c8ba5b4d7c615125c36eecd9ca64fbc
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoARP/ND: copy opaque2 persistent fields to new packet 34/16734/2
Neale Ranns [Wed, 9 Jan 2019 08:04:04 +0000 (00:04 -0800)]
ARP/ND: copy opaque2 persistent fields to new packet

Change-Id: Ic65f686aaccaf8450732d88d7471b587faccaa9d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoEnable random reassembly test for ARM 69/16569/5
juraj.linkes [Thu, 20 Dec 2018 13:53:27 +0000 (14:53 +0100)]
Enable random reassembly test for ARM

The underlying failure has been fixed and now the test can be
re-enabled.

Change-Id: I75251f6150ef1771dc23ea079799229690cf87d9
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoEnable GBP tests for ARM 81/16581/3
juraj.linkes [Fri, 21 Dec 2018 09:17:03 +0000 (10:17 +0100)]
Enable GBP tests for ARM

The underlying failure has been fixed.

Change-Id: If2ca92a17cfed1c2d7253e46ab161f301f847f29
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoUse the official libpcap file type 42/16742/1
Dave Barach [Wed, 9 Jan 2019 15:22:24 +0000 (10:22 -0500)]
Use the official libpcap file type

Change-Id: Ia34a4278eedc8cf450688b1fa0291e1f976868d3
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotest/vpp_papi_provider.py: Fix simple copy/paste error. 31/16731/2
Paul Vinciguerra [Wed, 9 Jan 2019 04:57:30 +0000 (20:57 -0800)]
test/vpp_papi_provider.py: Fix simple copy/paste error.

Change-Id: I8993132bdd0931c96ba8bc879ec3b4ae938a46c5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotest framework. Remove unused code. 21/16721/3
Paul Vinciguerra [Tue, 8 Jan 2019 00:29:26 +0000 (16:29 -0800)]
test framework.  Remove unused code.

Change-Id: I1bd14d5aff4918b58aef18fa0a9264e033989f6e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agogbp: Fix coverity warnings 16/16716/3
Mohsin Kazmi [Mon, 7 Jan 2019 18:54:20 +0000 (19:54 +0100)]
gbp: Fix coverity warnings

Change-Id: Iea64d246008b298edeeae338d781b79362f42046
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoVXLAN: Prevent duplicate bypass graph nodes. 82/16682/5
Jon Loeliger [Thu, 3 Jan 2019 18:56:02 +0000 (12:56 -0600)]
VXLAN: Prevent duplicate bypass graph nodes.

Change-Id: I68cc509b594b09751ff5e0e09bbca187a4a88edd
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoFix name of ipv6-n-tuple 35/16635/3
Hongjun Ni [Fri, 28 Dec 2018 10:27:04 +0000 (18:27 +0800)]
Fix name of ipv6-n-tuple

Change-Id: Ia95a75295e4865b4720573f164ccba8bcc7679ae
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agovirtio: fix kick race issue 56/16556/4
Damjan Marion [Thu, 20 Dec 2018 09:44:47 +0000 (10:44 +0100)]
virtio: fix kick race issue

Change-Id: I25b2a28513821bc5eab9ac6890a3964d412b0399
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl/ldp: select cleanup/improvements 22/16722/8
Florin Coras [Tue, 8 Jan 2019 01:49:17 +0000 (17:49 -0800)]
vcl/ldp: select cleanup/improvements

Change-Id: I640e69388f2ab0f66ad60c5165c749f5a5a9f525
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agostring_test: coverity woe 00/16700/2
Steven [Sun, 6 Jan 2019 19:23:24 +0000 (11:23 -0800)]
string_test: coverity woe

Remove the needless tests and checks which coverity complains about in
string_test.c

Change-Id: I971650cada77136f06528a65625ef99bd3d7e915
Signed-off-by: Steven <sluong@cisco.com>
5 years agotapv2: add "tap_flags" field to the TAPv2 interface API 19/16719/3
Andrew Yourtchenko [Mon, 7 Jan 2019 19:56:46 +0000 (20:56 +0100)]
tapv2: add "tap_flags" field to the TAPv2 interface API

Change-Id: I26f99d95f52c9fe107d17dcbbf5c6185523beade
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoavf: allocate descriptor memory from local numa 17/16717/2
Damjan Marion [Mon, 7 Jan 2019 19:56:04 +0000 (20:56 +0100)]
avf: allocate descriptor memory from local numa

Change-Id: Ic56ee4ce83b282a5f0f5aed500721fe639b941b3
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVOM: mroutes 13/16713/3
Neale Ranns [Thu, 27 Dec 2018 11:21:28 +0000 (03:21 -0800)]
VOM: mroutes

- fixes in ip.api for dumping mroute path flags

Change-Id: I13b0cfb15d374250ed71bd4e13dda9b798c18204
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2 BD API to flush all IP-MAC entries in the specified BD 18/16718/3
John Lo [Mon, 7 Jan 2019 20:16:33 +0000 (15:16 -0500)]
L2 BD API to flush all IP-MAC entries in the specified BD

Implement API/CLI to clear IP-MAC tables used for ARP-termination
in the specified bridge domain.
The CLI to flush MAC IP tables for a BD is:
 set bridge-domain arp entry <bd-id> del-all
The API added is bd_ip_mac_flush.

Change-Id: I34ceb87c0f480c7102f6559312c24081ed485af8
Signed-off-by: John Lo <loj@cisco.com>
5 years agoMAP: Prevent duplicate MAP-E/T graph nodes. 83/16683/5
Jon Loeliger [Thu, 3 Jan 2019 23:12:59 +0000 (17:12 -0600)]
MAP: Prevent duplicate MAP-E/T graph nodes.

Change-Id: I6031f3f9cfa048a901a8424d33d47679115c2eb3
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoChange vpp code to align with openssl interface change 09/16709/3
Ping Yu [Mon, 7 Jan 2019 21:03:07 +0000 (16:03 -0500)]
Change vpp code to align with openssl interface change

PR in openssl community is almost done, and need to change some code in VPP
to align with the openssl interface.

Change-Id: Ic7da53e507b67b53958760d07738dd774b1c526d
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agoHandle buffer alloc failure in vlib_buffer_add_data 10/16710/2
Dave Barach [Mon, 7 Jan 2019 14:15:47 +0000 (09:15 -0500)]
Handle buffer alloc failure in vlib_buffer_add_data

It's not OK to crash due to a transient buffer allocation failure.

Return 1 if the requested operation failed, otherwise 0.

Buffer index parameter change to a value-result, so the caller can
differentiate between partial and complete allocation failure: callers
which request an initial allocation (inbound bi = ~0) need to check
the (out) value to decide whether or not to call vlib_buffer_free(...).

Change-Id: I03029d7f2714c17dca4630dfd95a1eb578b68384
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix TCP checksum. 02/16702/4
Andrej Kozemcak [Mon, 7 Jan 2019 07:39:22 +0000 (08:39 +0100)]
Fix TCP checksum.

Set TCP checksum to zero, before calculate the TCP checksum.

Change-Id: Id96743334481804b8ebb74afef2f1dbfed29e0cb
Signed-off-by: Andrej Kozemcak <andrej.kozemcak@pantheon.tech>
5 years agovcl/ldp: add locked sessions shim layer 95/16695/29
Florin Coras [Sat, 5 Jan 2019 01:05:43 +0000 (17:05 -0800)]
vcl/ldp: add locked sessions shim layer

Moves LDP logic that allows sharing of sessions between multi-process
app workers into a separate VCL shim layer. Also refactors LDP to use
the new layer.

Change-Id: I8198b51eae7d099a8c486e36b29e3a0cb8cee8e9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoUpdate tcpdump / wireshark packet format writeup 01/16701/2
Dave Barach [Sun, 6 Jan 2019 20:06:06 +0000 (15:06 -0500)]
Update tcpdump / wireshark packet format writeup

Change-Id: I8195bae1421f68a823b86e12373840f5292ac0df
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agogbp: Fix typo in condition 11/16711/1
Mohsin Kazmi [Mon, 7 Jan 2019 14:33:13 +0000 (15:33 +0100)]
gbp: Fix typo in condition

Change-Id: Ib474e2af98d98d54c9fc4070fab56799555c0f31
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agovpp-api: Add context to VPPStatsIOError. 99/16699/2
Paul Vinciguerra [Sun, 6 Jan 2019 03:37:27 +0000 (19:37 -0800)]
vpp-api: Add context to VPPStatsIOError.

* Provide context information and return meaningful information.
VPPStatsIOError: Stat segment client connection returned: -2 Stat client socket open but couldn't connect.

Change-Id: I14ea35c58452a2cb7598a7efd136f0c7e1f5743a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agopktgen: support mixed multi/single chunk pcap replay 98/16698/2
Dave Barach [Sat, 5 Jan 2019 21:51:41 +0000 (16:51 -0500)]
pktgen: support mixed multi/single chunk pcap replay

Change-Id: I3d387b5e2b17f89ed688ea6cfee3fb6d782fe326
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovcl/session: add api for changing session app worker 76/16676/11
Florin Coras [Thu, 3 Jan 2019 03:31:22 +0000 (19:31 -0800)]
vcl/session: add api for changing session app worker

In case of multi process apps, after forking, the parent may decide to
close part or all of the sessions it shares with the child. Because the
sessions have fifos allocated in the parent's segment manager, they must
be moved to the child's segment manager.

Change-Id: I85b4c8c8545005724023ee14043647719cef61dd
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosocket API: Use pool index instead of handle in sock_delete handler 97/16697/2
Ole Troan [Sat, 5 Jan 2019 10:27:54 +0000 (11:27 +0100)]
socket API: Use pool index instead of handle in sock_delete handler

The socket API used the socket index handle directly in the sock_delete handler,
resulting in "unknown client id" warnings, and a failure in return for socket clients.

Change-Id: Ia69f740ce0f834cd9b62b7157243a1f42bcad765
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVPP-1508: Python3: Support simultaneous p2/p3 venvs. 63/16563/3
Paul Vinciguerra [Wed, 19 Dec 2018 22:34:45 +0000 (14:34 -0800)]
VPP-1508: Python3: Support simultaneous p2/p3 venvs.

Change-Id: I24cf3e390f6f0b98be939ef717048742d3f183d6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp: fix reset in syn-sent 94/16694/2
Florin Coras [Fri, 4 Jan 2019 16:45:22 +0000 (08:45 -0800)]
tcp: fix reset in syn-sent

Change-Id: I6732adc06fbb3d4b427e671ddcfe6eabc08d4a1b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAdd TLS support for VCL 06/16306/7
Ping Yu [Sat, 1 Dec 2018 00:16:17 +0000 (19:16 -0500)]
Add TLS support for VCL

Ater this patch, vcl_test_client and vcl_test_server can work happily with
TLS connection.
"-S" is to indicate TLS connection.

Change-Id: I761894b0b5929912691625f0fe63604725b55978
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agolibmemif: fix incorrect write leading to memory corruption 65/16665/2
Koichiro Den [Wed, 2 Jan 2019 15:22:24 +0000 (00:22 +0900)]
libmemif: fix incorrect write leading to memory corruption

in the worst case scenario this leads to segfault in a hard-to-debug way.

Change-Id: I165adae0bd2dee26af777a2665c8c124d3a49808
Signed-off-by: Koichiro Den <den@klaipeden.com>
5 years agoVPP-1525: additional fixes for strings in Japi 77/16477/4
Michal Cmarada [Fri, 4 Jan 2019 12:29:25 +0000 (13:29 +0100)]
VPP-1525: additional fixes for strings in Japi

Change-Id: Ic5aa09fdc360cdded16d3c4693f0d4b2067f66d6
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agotcp: add more closing state arcs 74/16674/3
Florin Coras [Wed, 2 Jan 2019 18:10:08 +0000 (10:10 -0800)]
tcp: add more closing state arcs

Change-Id: If6f4d6404753b2d6b96e17f5414079bcdb9edde8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: better randomize iss 75/16675/3
Florin Coras [Wed, 2 Jan 2019 20:22:02 +0000 (12:22 -0800)]
tcp: better randomize iss

Change-Id: I3638221e59024d6b7d82499d57e25b8e609f73cb
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix used-before-set in vl_api_bridge_flags_t_handler 80/16680/1
Dave Barach [Thu, 3 Jan 2019 14:30:00 +0000 (09:30 -0500)]
Fix used-before-set in vl_api_bridge_flags_t_handler

The aarch64 cross-compiler complains about this when building an
optimized image. So we fix it...

Change-Id: Ib2b2089c0534753d7d470311012fa0073ab27d1d
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix an issue in tls.c 21/16621/4
Ping Yu [Wed, 26 Dec 2018 10:42:38 +0000 (05:42 -0500)]
Fix an issue in tls.c

Curernt code will overwrite parent_app_api_context, and defer the
setting after this value is used in callback.

Change-Id: Ie16e432fd0f4214e6deff3aa3b58b3be824b0331
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agoRevert "add ipsecmb plugin" 72/16672/2
Florin Coras [Wed, 2 Jan 2019 17:43:01 +0000 (17:43 +0000)]
Revert "add ipsecmb plugin"

This reverts commit be16020c5034bc69df25a8ecd7081aec9898d93c.

The arm verify job actually failed but the result was overwritten by an x86 ubuntu retry.

Change-Id: Idcae7691fc575053563b8ff8bcad661c15891668
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFixes for buliding for 32bit targets: 97/16497/6
David Johnson [Fri, 14 Dec 2018 19:53:41 +0000 (14:53 -0500)]
Fixes for buliding for 32bit targets:
  * u32/u64/uword mismatches
  * pointer-to-int fixes
  * printf formatting issues
  * issues with incorrect "ULL" and related suffixes
  * structure alignment and padding issues

Change-Id: I70b989007758755fe8211c074f651150680f60b4
Signed-off-by: David Johnson <davijoh3@cisco.com>
5 years agoAdd microarch details to 'show cpu'. 47/16647/2
Paul Vinciguerra [Sun, 30 Dec 2018 19:07:36 +0000 (11:07 -0800)]
Add microarch details to 'show cpu'.

Change-Id: I31a3ff9e8f70468196c091027592a3aed2d09ac3
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoipsec: fix support check when using AES-GCM 89/16589/2
Matthew Smith [Fri, 21 Dec 2018 17:53:16 +0000 (11:53 -0600)]
ipsec: fix support check when using AES-GCM

When adding an IPsec SA, ipsec_check_support_cb() is called. This
invokes a callback for AH and a callback for ESP to check if the
algorithms are supported.

When using AES-GCM on an ESP SA with the DPDK IPsec backend selected,
the AH callback fails. The DPDK IPsec backend has no AH support,
so the callback for the default OpenSSL backend is invoked. This
checks whether the crypto algorithm is AES-GCM and returns failure.

Only invoke the callback to check support for the IPsec protocol
of the SA - either AH or ESP rather than doing both.

Change-Id: Ic10be6a17b580d06ffb7e82ef5866e53a4f8b525
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoadd ipsecmb plugin 09/14909/33
Klement Sekera [Thu, 8 Nov 2018 12:25:49 +0000 (13:25 +0100)]
add ipsecmb plugin

Change-Id: I99c0737dfeeec2db267773625ddc9b55324fd237
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoldp/vcl: epoll and shutdown cleanup 56/16656/7
Florin Coras [Mon, 31 Dec 2018 01:11:31 +0000 (17:11 -0800)]
ldp/vcl: epoll and shutdown cleanup

Change-Id: I882b4c495426551fad63372dc106496c5e8c141e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDefault huge page size to the regular page size 57/16657/2
Dave Barach [Tue, 1 Jan 2019 14:45:08 +0000 (09:45 -0500)]
Default huge page size to the regular page size

With this simple tweak, vpp is OK for "make test" or non-dpdk driver
operation over a kernel which doesn't support hugepages at all.

Tested on a Raspberry-pi 3B+ running the Ubuntu 18.04 64-bit server
beta image. It's amazing that such a minimal system will not only
self-compile vpp, but also run the unit tests. It's slow, but what do
you expect for that amount of money?

Change-Id: I7f080f871c828cc4b44be13809495278fadbd717
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agobuffers: remove unused code 46/16646/4
Damjan Marion [Sun, 30 Dec 2018 17:09:59 +0000 (18:09 +0100)]
buffers: remove unused code

Change-Id: If2bbfbc52994f5de0879763e0b7a7864498debb6
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl/ldp: add write msg function and fine tuning 34/16634/11
Florin Coras [Thu, 27 Dec 2018 22:51:46 +0000 (14:51 -0800)]
vcl/ldp: add write msg function and fine tuning

Allows app to push data. Additionally, ensure reset/close replies are
not sent unless vcl closes the session.

Change-Id: Icbbf933cf57b55cfbcc7b802af0f83919a066f65
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobinary api clients: wait for vpp to start 32/16632/3
Dave Barach [Thu, 27 Dec 2018 18:57:41 +0000 (13:57 -0500)]
binary api clients: wait for vpp to start

Change-Id: I740a7423327b724e88fdfa35d90cb1285e9f9746
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoavf: tx dequeue optimizations 37/16637/2
Damjan Marion [Fri, 28 Dec 2018 16:43:22 +0000 (17:43 +0100)]
avf: tx dequeue optimizations

Change-Id: I9d8fcf930132e832941e5678a9278a029e104dc3
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: chained buffers rx support 22/16622/5
Damjan Marion [Thu, 27 Dec 2018 15:18:55 +0000 (16:18 +0100)]
avf: chained buffers rx support

Change-Id: I76ba11441f0ab3d150cdd080919cda91eac60b01
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: chained buffers tx support 29/16629/4
Damjan Marion [Thu, 27 Dec 2018 10:35:40 +0000 (11:35 +0100)]
avf: chained buffers tx support

Change-Id: Ib573d45def80b4123d5623fda920e6cda1247638
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: add simple ring implementation 36/16636/2
Damjan Marion [Fri, 28 Dec 2018 14:46:10 +0000 (15:46 +0100)]
vppinfra: add simple ring implementation

Change-Id: I188e2dfd187d7b2ab7e0fbb11461f3db052f3224
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: free session after transport and app confirm 33/16633/4
Florin Coras [Thu, 27 Dec 2018 19:53:11 +0000 (11:53 -0800)]
session: free session after transport and app confirm

In addition to that, a bit of refactoring.

Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: handle invalid sessions in epoll 27/16627/3
Florin Coras [Thu, 27 Dec 2018 00:29:06 +0000 (16:29 -0800)]
vcl: handle invalid sessions in epoll

Change-Id: I62d37f3c05451e5667863a2c6c551872d5dac1ea
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovpp_papi: MACAddress equals fails in unittest. 26/16626/4
Paul Vinciguerra [Wed, 26 Dec 2018 23:27:10 +0000 (15:27 -0800)]
vpp_papi:  MACAddress equals fails in unittest.

Before:
    EqualsAssertionError:  :: MACAddress(11:22:33:44:55:66) != MACAddress(11:22:33:44:55:66)
    ----------------------------------------------------------------------
    Ran 1 test in 0.002s
    FAILED (failures=1)
    MACAddress(11:22:33:44:55:66) != MACAddress(11:22:33:44:55:66)

After:

    ----------------------------------------------------------------------
    Ran 1 test in 0.001s
    OK

Change-Id: I89896a823b8f8a861813dabf23e7c9207e4fabb6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoMAP: Install lpm.h as map.h references it. 24/16624/2
Jon Loeliger [Wed, 26 Dec 2018 21:13:21 +0000 (15:13 -0600)]
MAP: Install lpm.h as map.h references it.

Change-Id: I97c6475920b7f7028c2bb1117ff9e5f629a54b44
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoinstall-dep: force osleap boost dep install 31/16631/2
Florin Coras [Thu, 27 Dec 2018 17:07:32 +0000 (09:07 -0800)]
install-dep: force osleap boost dep install

Change-Id: I4a053f41eef138fc0e6db7e2650860c0ac999552
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp: add more last-ack arcs 18/16618/3
Florin Coras [Tue, 25 Dec 2018 18:55:01 +0000 (10:55 -0800)]
tcp: add more last-ack arcs

Change-Id: If538bb9d6fb489906099b727a7bfdb9d9af29402
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: separate active and passive establish timers 15/16615/7
Florin Coras [Tue, 25 Dec 2018 00:54:34 +0000 (16:54 -0800)]
tcp: separate active and passive establish timers

Change-Id: Ia2241e963cf45765d8d17c65eea781edbf74d4f9
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoavf: optimize RX function 05/16605/3
Damjan Marion [Tue, 25 Dec 2018 08:41:17 +0000 (09:41 +0100)]
avf: optimize RX function

Change-Id: Icd1e9638cdb288e94196391a2c85f2eaaf65387e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotcp: add fin-wait-1 dispatch arcs 08/16608/2
Florin Coras [Mon, 24 Dec 2018 07:36:36 +0000 (23:36 -0800)]
tcp: add fin-wait-1 dispatch arcs

Change-Id: Ie4cb08f5d9f7fd025f1a8ae610cebb0b0c315d9f
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: fix dump and VOM populate 14/16614/2
Neale Ranns [Mon, 24 Dec 2018 15:26:47 +0000 (07:26 -0800)]
GBP: fix dump and VOM populate

Change-Id: I5440d80333190ebac46d22eac43183939805a24b
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agocrypto-input: bug fix check-op 06/16606/2
Kingwel Xie [Mon, 24 Dec 2018 04:54:19 +0000 (23:54 -0500)]
crypto-input: bug fix check-op

fix a copy-paste bug, and a typo of function name

Change-Id: Ib408522d2bb6fde7a7492de6f5d5369b461d77c9
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoFIB: adj src assert fix part 2 11/16611/2
Neale Ranns [Sun, 23 Dec 2018 16:57:27 +0000 (08:57 -0800)]
FIB: adj src assert fix part 2

Change-Id: Ic112180e53a55993b06ba18102202d6ac5854def
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: compute seq_end in tcp_input 99/16599/8
Florin Coras [Sat, 22 Dec 2018 19:39:33 +0000 (11:39 -0800)]
tcp: compute seq_end in tcp_input

syn/fin are no longer added to seq_end so they must be considered
individually in each state.

Change-Id: I5e3047194101c4fca2db9f9ad29a4a6468c397ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoavf: optimize rx ring refill 02/16602/3
Damjan Marion [Sun, 23 Dec 2018 12:59:20 +0000 (13:59 +0100)]
avf: optimize rx ring refill

Change-Id: Id35089d6c73b35cd25fd01e07966a2c7e2ea367e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFIB: remove assert from adj src 04/16604/2
Neale Ranns [Sun, 23 Dec 2018 14:49:11 +0000 (06:49 -0800)]
FIB: remove assert from adj src

this is the case when the ADJ fib is in the non-forwarding trie

Change-Id: I7bcda475b3b1e142d16363147dba3a1e2c5a07f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: stats 03/16603/2
Neale Ranns [Sun, 23 Dec 2018 14:38:39 +0000 (06:38 -0800)]
VOM: stats

- onnly read when connected. use bool for state
- operator<< for counter_t
- only publish stats for interfaces that have them available

Change-Id: I66a8a336a05912592851c88e3af69155d840a573
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: new ethernet-input support 01/16601/1
Damjan Marion [Sun, 23 Dec 2018 11:26:52 +0000 (12:26 +0100)]
avf: new ethernet-input support

Change-Id: I5511823f38ad56161b6a538f2d9e63459eded1eb
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: add option to specify interface name 00/16600/2
Damjan Marion [Sun, 23 Dec 2018 10:19:30 +0000 (11:19 +0100)]
avf: add option to specify interface name

Change-Id: I94591d5b103280f8df157819d423fef7ee89d4c8
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl: fix coverity warnings 94/16594/6
Florin Coras [Sat, 22 Dec 2018 03:28:34 +0000 (19:28 -0800)]
vcl: fix coverity warnings

Change-Id: I24445b08a46041c370094ebba4243422e2342a26
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: improve waitclose in closing states 91/16591/4
Florin Coras [Fri, 21 Dec 2018 21:54:09 +0000 (13:54 -0800)]
tcp: improve waitclose in closing states

Change-Id: I90056176194cb2a144d49a3cb283653d8d30f051
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoethernet-input tagged packets optimizations 73/16173/18
Damjan Marion [Sun, 25 Nov 2018 20:19:13 +0000 (21:19 +0100)]
ethernet-input tagged packets optimizations

Change-Id: I21bdd8982d5f357590af8a2a0219bdebbaee4e74
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodpdk: switch to in-memory mode, deprecate use of socket-mem 43/16543/2
Damjan Marion [Wed, 19 Dec 2018 11:45:18 +0000 (12:45 +0100)]
dpdk: switch to in-memory mode, deprecate use of socket-mem

Change-Id: I3896bf9d71dc300520c53dbe3c2fd8fcd1470881
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotapv2: coverity woe 90/16590/2
Steven [Fri, 21 Dec 2018 20:42:34 +0000 (12:42 -0800)]
tapv2: coverity woe

coverity complains about fd leaking inside the if statement because there is
a goto which bypasses the statement close (fd).

The fix is to close (fd) immediately after it is no longer used.

Change-Id: Ic5035b07ec1f179ff3db77744843e47aa8067a3c
Signed-off-by: Steven <sluong@cisco.com>
5 years agocrypto-input impprovement: 95/16595/2
Kingwel Xie [Sat, 22 Dec 2018 08:17:15 +0000 (03:17 -0500)]
crypto-input impprovement:

1. multi-loop, and new style with vlib_buffer_enqueue_to_next
2. add error counter for AUTH-FAILURE
3. buffer trace changed. now it supports 'trace add dpdk-crypto-input 10'
   just like the other input nodes

Actual measurement shows >10 clocks per packets are saved, under QAT
or openssl PMD case

Change-Id: I6ea34e4ae3b08c381219ff6bc8adda2d927fbfd5
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agobapi/vat: fix socket transport for vat 92/16592/3
Florin Coras [Sat, 22 Dec 2018 00:23:09 +0000 (16:23 -0800)]
bapi/vat: fix socket transport for vat

Change-Id: I8e39df129f80c8d3d73181fc5d3ac60ae382a6b6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agohttp server: improvements 72/16572/11
Florin Coras [Thu, 20 Dec 2018 17:50:50 +0000 (09:50 -0800)]
http server: improvements

- use http sessions to track communication with peer (as opposed to
using the raw sessions)
- for static server send ok message prior to sending data
- static server can now handle GET requests spread over multiple
packets. Good for testing http/tcp implementation.

Change-Id: I767a790de9a42e7087db5ce8eefd8efaf598c695
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: add allowed ethertypes to contracts 75/16575/6
Neale Ranns [Thu, 20 Dec 2018 20:03:59 +0000 (12:03 -0800)]
GBP: add allowed ethertypes to contracts

Change-Id: I74782d3b9b71a071bb500c34866a017b8ee15767
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMAP: Convert from DPO to input feature. 76/16576/5
Jon Loeliger [Thu, 20 Dec 2018 17:47:30 +0000 (11:47 -0600)]
MAP: Convert from DPO to input feature.

Change-Id: I25c86aea23dff19656449b23133db27b1f062ac0
Signed-off-by: Jon Loeliger <jdl@netgate.com>
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoRevert "tests: Rework vpp config generation." 88/16588/2
Ole Troan [Fri, 21 Dec 2018 15:04:22 +0000 (16:04 +0100)]
Revert "tests: Rework vpp config generation."

This reverts commit 919efad2671993d4c6d5a0dba8eeb99d5c60edf1.

Change-Id: I5ec4fa08a03f508dac684dc1ddbd7e6b85c49b97
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMFIB: coverity fixes 85/16585/2
Neale Ranns [Fri, 21 Dec 2018 15:00:56 +0000 (07:00 -0800)]
MFIB: coverity fixes

Change-Id: I5c1bc498f7299e175070eb288e40f8d037c9be3a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT: fix coverity error 190176 (VPP-1474) 84/16584/1
Matus Fabian [Fri, 21 Dec 2018 12:01:00 +0000 (04:01 -0800)]
NAT: fix coverity error 190176 (VPP-1474)

Change-Id: I0ee80c7bec59d3e9c69e92e6cf0af1a6864a4ec4
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoPython Tests: Make VppTestCase unit testable. 99/16499/2
Paul Vinciguerra [Sat, 15 Dec 2018 16:03:09 +0000 (08:03 -0800)]
Python Tests: Make VppTestCase unit testable.

* This allows for VppTestCase to instantiated with an empty constructor.

Change-Id: Ib71d3bfb4529e113f9b73c39de9b95f12ee9cfb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotests: Rework vpp config generation. 19/16519/3
Paul Vinciguerra [Tue, 18 Dec 2018 05:43:43 +0000 (21:43 -0800)]
tests: Rework vpp config generation.

* Allows test cases to configure the VPP runtime config
  during fixture setup.

* Sample use in a TestCase:
    @classmethod
    def setUpConstants(cls):
        tempdir = cls.tempdir
        cls.config.add('punt', 'socket', '%s/socket_punt' % cls.tempdir)
        super(TestPuntSocket, cls).setUpConstants()
        # enable/disabe a plugin via:
        #cls.config.add_plugin('dpdk_plugin.so', 'disable')

* Supports the following config stanzas:
'unix',
        'acl-plugin'
        'api-queue'
        'api-trace'
        'api-segment'
        'cj'
        'cpu'
        'dns'
        'dpdk
        # currently don't support dynamic keys
        # 'heapsize'
        'l2learn'
        'l2tp'
        'mactime'
        'mc'
        'nat'
        'oam'
        'plugins'
        'punt'
        'session'
        'socksvr'
        'statseg'
        'tapcli'
        'tcp'
        'tuntap'
        'vhost-user'

Change-Id: I44f276487267d26eaa46f87e730bdd861003b234
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRevert "Build issue after https://gerrit.fd.io/r/#/c/16508/." 79/16579/2
Ole Trøan [Fri, 21 Dec 2018 06:33:36 +0000 (06:33 +0000)]
Revert "Build issue after https://gerrit.fd.io/r/#/c/16508/."

This reverts commit 57f170bdf9967e3f8ea6e937a70c7f86187f95a2.

Change-Id: I1cab5be8b04ac881b712e67fd72ed202657fedf4
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agotcp: fix fin_wait_1 condition to send fin 77/16577/3
Florin Coras [Fri, 21 Dec 2018 02:24:49 +0000 (18:24 -0800)]
tcp: fix fin_wait_1 condition to send fin

Also add the closed-waiting session state wherein the session still
allows the transport to send oustanding data.

Change-Id: Ic47807379906ef2010934381ff0b9e53c7e631d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoGBP: test case hardening against timing races 70/16570/2
Neale Ranns [Thu, 20 Dec 2018 14:12:19 +0000 (06:12 -0800)]
GBP: test case hardening against timing races

Change-Id: I3b5d369a37233c7bb2113ce31479371c610977ef
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: fix syn-sent reset 74/16574/1
Florin Coras [Thu, 20 Dec 2018 18:16:01 +0000 (10:16 -0800)]
tcp: fix syn-sent reset

Change-Id: I4a811672b27c70bf0e9652c175c7f4168ec40ed7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoNAT: total users and sessions gauges (VPP-1484) 22/16522/3
Matus Fabian [Tue, 18 Dec 2018 09:08:51 +0000 (01:08 -0800)]
NAT: total users and sessions gauges (VPP-1484)

Change-Id: I41a82e21571d5c64d01af72cd88c3983afac26ed
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoFIB: encode the label stack in the FIB path during table dump 67/16567/2
Neale Ranns [Thu, 20 Dec 2018 11:01:49 +0000 (03:01 -0800)]
FIB: encode the label stack in the FIB path during table dump

Change-Id: I28e8a99b980ad343a4209e673201791b91ceab4e
Signed-off-by: Neale Ranns <nranns@cisco.com>