vpp.git
5 years agosession: remove deprecated binary apis 82/17982/8
Florin Coras [Sat, 2 Mar 2019 18:47:47 +0000 (10:47 -0800)]
session: remove deprecated binary apis

Change-Id: Ia1a628498fa3b639b6b1508f65c6aea1806f73ec
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: notify app of segment removal 77/17977/3
Florin Coras [Sat, 2 Mar 2019 01:12:02 +0000 (17:12 -0800)]
session: notify app of segment removal

Change-Id: I3774f7ffd14be73e9bbbf4cdd6d3b22f24fee730
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: fix unlisten with invalid handles 78/17978/4
Florin Coras [Sat, 2 Mar 2019 03:26:31 +0000 (19:26 -0800)]
session: fix unlisten with invalid handles

Change-Id: I6fbfa06e3df9988254561bf1a770084028117005
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: cleanup/rename functions 75/17975/4
Florin Coras [Fri, 1 Mar 2019 21:00:58 +0000 (13:00 -0800)]
session: cleanup/rename functions

- remove unused functions
- rename old "stream" functions

Change-Id: Icbb03daa9f9f1c58b5be5c38aa8a9cbcf9159b47
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: cleanup session event types 74/17974/3
Florin Coras [Fri, 1 Mar 2019 20:41:21 +0000 (12:41 -0800)]
session: cleanup session event types

Change-Id: I87bdf705341dd760f0be907a663aa64140977d39
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: allow future acks if in window 48/17948/5
Florin Coras [Thu, 28 Feb 2019 20:49:45 +0000 (12:49 -0800)]
tcp: allow future acks if in window

Change-Id: I84ad1830b8db43f6031cf2876cd94f6a71216b83
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoTests: Trivial fox use of 'is'. 73/17973/2
Paul Vinciguerra [Fri, 1 Mar 2019 18:35:55 +0000 (10:35 -0800)]
Tests: Trivial fox use of 'is'.

'is' evaluates diffently depending on the value.

  >>> x=-10
  >>> x is -10
  False

  >>> x=10
  >>> x is 10
  True
  >>>

Change-Id: If72ec7c47e3e95180a4d08a773984253c80154d6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoIPSEC: tunnel-input; don't load the HW interface struct 35/17935/3
Neale Ranns [Thu, 28 Feb 2019 12:03:58 +0000 (12:03 +0000)]
IPSEC: tunnel-input; don't load the HW interface struct

also fix the stats to include all the data in the tunnel.
And don't load the SA.

Change-Id: I7cd2e8d879f19683175fd0de78a606a2836e6da2
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agonsh: fix load failure 14/17914/3
Filip Tehlar [Wed, 27 Feb 2019 16:44:26 +0000 (08:44 -0800)]
nsh: fix load failure

Change-Id: I687ddba41bc80e2fbb39ebc30449ced7254e45f8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agogtpu: migrate old MULTIARCH macros to VLIB_NODE_FN 68/17868/4
Filip Tehlar [Tue, 26 Feb 2019 12:53:38 +0000 (04:53 -0800)]
gtpu: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Id6e82910f8d991e355d3f26222eea4ac3ab091b1
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agodpdk: update mlx[45] linking options 49/17949/2
Matthew Smith [Thu, 28 Feb 2019 16:33:12 +0000 (10:33 -0600)]
dpdk: update mlx[45] linking options

Upstream DPDK changed the names of the options to use dlopen()
with libibverbs and libmlx[45] from RTE_LIBRTE_MLX[45]_DLOPEN_DEPS
to RTE_IBVERBS_LINK_DLOPEN (handles both mlx4 and mlx5).

VPP's build option to enable this configuration when building DPDK
no longer worked starting when VPP moved to DPDK 19.02. Update VPP's
build options to enable the correct option name.

Change-Id: I8e34e1d3fc4ee8aac4fd6f2a7d27177f2b0dea50
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoioam: migrate old MULTIARCH macros to VLIB_NODE_FN 61/17961/3
Filip Tehlar [Fri, 1 Mar 2019 11:18:58 +0000 (03:18 -0800)]
ioam: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: Icb919a053b35ef62f958c60c725d3aae4c32358f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agopppoe: migrate old MULTIARCH macros to VLIB_NODE_FN 36/17936/2
Filip Tehlar [Thu, 28 Feb 2019 13:58:56 +0000 (05:58 -0800)]
pppoe: migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I0af8104f6d35820aa39d22cd23d4f9211d61faa0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoVOM: mprefix and mpath encode fixes 64/17964/1
Neale Ranns [Fri, 1 Mar 2019 15:16:40 +0000 (07:16 -0800)]
VOM: mprefix and mpath encode fixes

Change-Id: Id3c281e680683c7267c9db66cc806fed58c8cfcb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession: refactor local connects 11/17911/21
Florin Coras [Wed, 27 Feb 2019 15:55:46 +0000 (07:55 -0800)]
session: refactor local connects

- Switches local connects to cut-thru transport
- Removes local sessions as a separate session type

Change-Id: I997c6355d8c8e4f2110678f785b0f5d96bba47f7
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVOM: vxlan-tunnel mcast interface fix 59/17959/2
Neale Ranns [Fri, 1 Mar 2019 10:27:46 +0000 (02:27 -0800)]
VOM: vxlan-tunnel mcast interface fix

Change-Id: Ica6a0b4133ccc1997ef0547274982d0cc9761724
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTests: Remove all wildcard imports. 43/17943/3
Paul Vinciguerra [Thu, 28 Feb 2019 17:00:09 +0000 (09:00 -0800)]
Tests: Remove all wildcard imports.

They mask dependencies and confuse third party tools.

Change-Id: I24ee16bfa0d746a8e8cb99891ba8b20523048b69
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoTests: Refactor duplicated code. 52/17952/2
Paul Vinciguerra [Thu, 28 Feb 2019 23:34:00 +0000 (15:34 -0800)]
Tests: Refactor duplicated code.

Naveen suggested earlier today that we should refactor duplicate code.
This commit kicks off the effort.

Change-Id: I855b0f40d41d1f3a2e673f3b254b76b596409656
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoSave signum and faulting address in static variables 51/17951/2
Dave Barach [Thu, 28 Feb 2019 22:52:57 +0000 (17:52 -0500)]
Save signum and faulting address in static variables

Comes in handy when looking at core files from optimized images.

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

5 years agoFix API return code in case of error. 83/17883/2
Igor Mikhailov (imichail) [Tue, 26 Feb 2019 19:53:18 +0000 (11:53 -0800)]
Fix API return code in case of error.

Change-Id: I22f866bacbc9c6e3abb0405f5c5a205910cec17b
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agostats: Add node names in /sys/nodes/names 85/17885/6
Ole Troan [Tue, 26 Feb 2019 21:14:13 +0000 (22:14 +0100)]
stats: Add node names in /sys/nodes/names

Change-Id: I9c92d51cc0e9dccf3c3726c4de8d7f15537778c9
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoMAINTAINERS: Add Paul Vinciguerra to test/ 53/17953/2
Paul Vinciguerra [Fri, 1 Mar 2019 00:37:16 +0000 (16:37 -0800)]
MAINTAINERS: Add Paul Vinciguerra to test/

Change-Id: Id8a48299eb26f62561b54aa4d240d312f47a952d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovpp_papi.py: Change VppEnum from explicit metaclass to metaclass wrapper/decorator. 91/17891/2
Paul Vinciguerra [Wed, 27 Feb 2019 04:39:44 +0000 (20:39 -0800)]
vpp_papi.py: Change VppEnum from explicit metaclass to metaclass wrapper/decorator.

Change-Id: Iab41bb972e3c7ec005a1a13d5a25f654ae8c3932
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotest/vpp_ip_route.py: Trivial. Remove duplicate key. 45/17945/2
Paul Vinciguerra [Thu, 28 Feb 2019 17:06:31 +0000 (09:06 -0800)]
test/vpp_ip_route.py: Trivial. Remove duplicate key.

Change-Id: I2c347daeecd5441b8fe3e3f7527a8e21844668d0
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRemove unused imports from hooks 42/17942/1
Naveen Joy [Thu, 28 Feb 2019 16:46:41 +0000 (08:46 -0800)]
Remove unused imports from hooks

Change-Id: I087b057da526c18f8cce1902dcb594dd5ce0a4b8
Signed-off-by: Naveen Joy <najoy@cisco.com>
5 years agostats: Add interface name to sw_if_index as /if/names 74/17874/8
Ole Troan [Tue, 26 Feb 2019 15:37:03 +0000 (16:37 +0100)]
stats: Add interface name to sw_if_index as /if/names

Expose interface name to sw_if_index table as a directory node in the stats segment.

Change-Id: Ie50e4af01997d141880f02e3a8496bfeb91b9944
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoVOM: child accessors on GBP route domain 23/17923/2
Neale Ranns [Thu, 28 Feb 2019 08:41:26 +0000 (00:41 -0800)]
VOM: child accessors on GBP route domain

Change-Id: I7b74b0b98b2c427bf29bb1d2932044d9924588cb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agol2e: Migrate old MULTIARCH macros to VLIB_NODE_FN 98/17898/4
Filip Tehlar [Tue, 26 Feb 2019 15:28:33 +0000 (07:28 -0800)]
l2e: Migrate old MULTIARCH macros to VLIB_NODE_FN

Change-Id: I55f45d84212e2293e3798dff6850d86d75414d02
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoMPLS: tunnel delete crash 73/17673/3
Neale Ranns [Tue, 19 Feb 2019 10:10:13 +0000 (02:10 -0800)]
MPLS: tunnel delete crash

Change-Id: I4adf713f4a1d596b9c8a78b79b5df2c7eb0c56f0
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTEST: IPSEC NAT-T with UDP header 07/17807/3
Neale Ranns [Mon, 25 Feb 2019 14:32:02 +0000 (14:32 +0000)]
TEST: IPSEC NAT-T with UDP header

Change-Id: I5ef8b3f4be40a7a0b0f1cb90dc0e15a4711e8664
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agosession: refactor local/cut-through listens 98/17798/18
Florin Coras [Fri, 22 Feb 2019 21:11:38 +0000 (13:11 -0800)]
session: refactor local/cut-through listens

Introduce a cut-through transport as replacement to local sessions. This
first patch removes the per app local listener pools and switches local
listeners to sessions with cut-through transport.

Change-Id: I98b20c25bc5df5f4110bf66f76c650a973032618
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix centos build and build documentation 73/17873/4
jdenisco [Tue, 26 Feb 2019 14:19:24 +0000 (09:19 -0500)]
Fix centos build and build documentation

Change-Id: I326204d26b613254e39c6a0ffe9f9491981ba3c3
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agoVPP-1576: fix Coverity issues 15/17915/2
Dave Barach [Wed, 27 Feb 2019 17:36:28 +0000 (12:36 -0500)]
VPP-1576: fix Coverity issues

Change-Id: I8b59b2e1c0525abf4b0492e50a7af57df4cd3ce2
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoDOC ONLY: update bug report section 08/17908/2
Dave Barach [Wed, 27 Feb 2019 15:14:01 +0000 (10:14 -0500)]
DOC ONLY: update bug report section

More detail on why it's important to supply .debs or .rpms which
precisely match core files. Probably won't help, but we can try...

Change-Id: I7842eaea0ef921b934e84b7f18f6a333b1381292
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agostring_test: The dark side of coverity 13/17913/1
Steven Luong [Wed, 27 Feb 2019 16:19:27 +0000 (08:19 -0800)]
string_test: The dark side of coverity

Me: "Mr Coverity, I thought I fixed the dead code warning just few days ago in
this file. Why are you still complaining about the same stuff to me?"

Mr. Coverity: "Duh! But you are supposed to fix all occurences in the same file."

Me: "Mr. Coverity, I didn't see you flag the warning in the other places last
time?"

Mr. Coverity: "Shh! That is the secret of my dark side!"

Change-Id: I565eccd90bf1bb39c9881664d361f83396ca8bcc
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoIKEv2 plugin export fixes 00/17900/2
Neale Ranns [Wed, 27 Feb 2019 10:16:20 +0000 (10:16 +0000)]
IKEv2 plugin export fixes

Change-Id: If6b0edb0dd242e0ef6953c8f4c1826eb80b9e1cc
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT44: active-passive HA (VPP-1571) 80/17880/2
Matus Fabian [Tue, 26 Feb 2019 17:05:23 +0000 (09:05 -0800)]
NAT44: active-passive HA (VPP-1571)

session synchronization so that we can build a plain active-passive HA NAT pair

Change-Id: I21db200491081ca46b7af3e82afc677c1985abf4
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoFix crash in barrier sync when vlib_worker_threads is zero 78/17878/2
Damjan Marion [Tue, 26 Feb 2019 16:15:48 +0000 (17:15 +0100)]
Fix crash in barrier sync when vlib_worker_threads is zero

Change-Id: I6819dd9dbfc15c17740bdb98b51bdd639ef8c4d2
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovmxnet3: RSS support 88/17888/1
Steven Luong [Wed, 27 Feb 2019 00:45:54 +0000 (16:45 -0800)]
vmxnet3: RSS support

Configurable up to 16 RX queues per interface. Default is 1.

Change-Id: If9e2beffeb7e7dc8c2264b4db902132b2fea02c1
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoVPP-1574: minimize RPC barrier sync calls 86/17886/2
Dave Barach [Tue, 26 Feb 2019 22:04:40 +0000 (17:04 -0500)]
VPP-1574: minimize RPC barrier sync calls

Grab the thread barrier across a set of RPCs, to greatly increase
efficiency. Avoids running afoul of the barrier sync holddown
timer.

Change-Id: I782dfdb1bed398b290169c83266681c9edd57a3f
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agonsh: migrate old MUTIARCH macros to VLIB_NODE_FN 59/17859/4
Filip Tehlar [Tue, 26 Feb 2019 10:59:07 +0000 (02:59 -0800)]
nsh: migrate old MUTIARCH macros to VLIB_NODE_FN

Change-Id: Iafe8b3a38f2a7d7571e60db91608d8130bb07cb3
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agostats: buffer gauge callbacks use index instead of name. 65/17865/2
Ole Troan [Tue, 26 Feb 2019 12:10:56 +0000 (13:10 +0100)]
stats: buffer gauge callbacks use index instead of name.

Change-Id: I500b8e72d7e021b9564dad0ffc087cb0e1ceb96f
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovppapigen: Expose "option version" in generated JSON file. 79/17879/1
Ole Troan [Tue, 26 Feb 2019 17:03:16 +0000 (18:03 +0100)]
vppapigen: Expose "option version" in generated JSON file.

Change-Id: Iaa78ee181589584885b0f377eafb89e603718bd4
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agosession: fix local binds 31/17831/2
Florin Coras [Mon, 25 Feb 2019 23:17:28 +0000 (15:17 -0800)]
session: fix local binds

Change-Id: I1d92bec29c718de7a517bbbb335d09c68c221c71
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVPP-1508 Python3 abstract classes 60/16160/10
Paul Vinciguerra [Sun, 25 Nov 2018 05:46:05 +0000 (21:46 -0800)]
VPP-1508 Python3 abstract classes

Update the syntax to support abstract classes in python 2 and python 3.

Depends on: new style classes -- https://gerrit.fd.io/r/16166

Change-Id: Iad2c1240149f38b3faca1b37ab95d3d210e1daee
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agovmxnet3: lro/tso and rx checksum 27/17827/2
Steven Luong [Mon, 25 Feb 2019 20:10:53 +0000 (12:10 -0800)]
vmxnet3: lro/tso and rx checksum

Add lro/tso and rx checksum support. lro/tso is configured via startup.conf
   vmxnet3 { lro }
It is disable by default due to not all versions of ESXi supports it.

Change-Id: Icf224ff528884ecd9e655b4fcf4481194e8c5a63
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoMove pcap rx/tx trace code out of the dpdk plugin 28/17828/2
Dave Barach [Mon, 25 Feb 2019 20:27:28 +0000 (15:27 -0500)]
Move pcap rx/tx trace code out of the dpdk plugin

Moved code to the ethernet input node, and the interface output
path(s). Since we no longer skip ethernet-input, there's no reason
for device drivers to know anything about pcap rx tracing, etc.

Change-Id: I08d32fb1b90cbee1bd4f609837d533e047b36fa4
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix vpp crashing when attempting to run in kubernetes Pod 38/17838/5
Artem Belov [Tue, 26 Feb 2019 01:47:34 +0000 (01:47 +0000)]
Fix vpp crashing when attempting to run in kubernetes Pod

mmap does not fail but writing to mapped memory is causing sigbus.

Change-Id: I5135f32eede67fccb4aaa07a501cd262d254ed8d
Signed-off-by: Artem Belov <artem.belov@xored.com>
5 years agomake test: Stop downloading pip. 34/17734/2
Paul Vinciguerra [Wed, 20 Feb 2019 17:51:54 +0000 (09:51 -0800)]
make test: Stop downloading pip.

Use the installed version of pip.  If a newer version of pip is needed,
it can be specified in requirements.txt.  This is to improve idempotence
by providing some control over upstream changes.

Change-Id: I07b7651f8ddba6005bf85d11fef9e3343ee2dcd2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agomake test: Add exception handling around subprocess. 65/16265/7
Paul Vinciguerra [Wed, 28 Nov 2018 19:34:21 +0000 (11:34 -0800)]
make test: Add exception handling around subprocess.

This cleans up exception catching to identify oserrors.  By raising the
specific exception closer to the offending call, we get additional stack history
and can add clearer error logging to assist in troubleshooting.

Change-Id: I592e4d46844b822a816485bf54910f8daed92088
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoDSLITE: Fix dslite_get_b4_addr_reply message type. 26/17626/3
Jon Loeliger [Fri, 15 Feb 2019 18:06:11 +0000 (12:06 -0600)]
DSLITE: Fix dslite_get_b4_addr_reply message type.

Fix what appears to be a cut-n-past error.

Change-Id: I71ee32c1b0d2dc38ed3df4bd24ec4248005a6008
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agoVPP-1508 python tests: unicode 67/16267/9
Paul Vinciguerra [Mon, 26 Nov 2018 00:09:26 +0000 (16:09 -0800)]
VPP-1508 python tests: unicode

Change unicode references to use text_type

Change-Id: Ia71c16e3235bc509abd3b1c651ae125f892ab108
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoRemove fake MAP domain 0 entry. 08/17808/2
Jon Loeliger [Thu, 21 Feb 2019 19:29:51 +0000 (13:29 -0600)]
Remove fake MAP domain 0 entry.

Problematic:
    - It didn't have its counters initialized, so vpp crashed
      during a "show map stat"
    - Not all the tests for "are there any domains" actually
      accounted for the fake entry at pool slot 0.
    - Dump details happily returned its bogus entry.

Change-Id: I57aaa9f63917686334fd4a9fa7bc80044bf1718c
Signed-off-by: Jon Loeliger <jdl@netgate.com>
5 years agovpp-papi: Only install enum34 for python<=3.4. 39/17839/2
Paul Vinciguerra [Tue, 26 Feb 2019 02:55:28 +0000 (18:55 -0800)]
vpp-papi: Only install enum34 for python<=3.4.

Change-Id: I20d7c8c1a59b3a9aa016bec860289b7aef4ce06b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agoFix broken ASSERT 30/17830/1
Dave Barach [Mon, 25 Feb 2019 21:48:57 +0000 (16:48 -0500)]
Fix broken ASSERT

Fix "make TEST=test_vcl test-debug" ASSERT failures.

Change-Id: I58a67b12806660973c8def0e598ef0c5b296eec5
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoVOM: GBP table IDs in GBP route-domain create 12/17812/2
Neale Ranns [Mon, 25 Feb 2019 17:23:15 +0000 (09:23 -0800)]
VOM: GBP table IDs in GBP route-domain create

Change-Id: I606b28dfb820f8f19e338c7642bfe0e4c116ca58
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoRemote Test: fix serialization (dict, Enum) 51/17751/3
Jakub Grajciar [Thu, 21 Feb 2019 11:01:31 +0000 (12:01 +0100)]
Remote Test: fix serialization (dict, Enum)

Change-Id: Ia3f8616cbf424c7f2d29d16cf7a457be6cd1b33a
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoIKEv2 to plugin 03/17803/3
Neale Ranns [Mon, 25 Feb 2019 10:28:29 +0000 (10:28 +0000)]
IKEv2 to plugin

for easy integration with ptoducts running their own Ike stack.
Without the VPP IKE plugin loaded, the product is free to handle
IKE packets as it pleases.

Change-Id: Id0839f4d58b797f4c2da0382eb499fc08b05f66f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agobuffer chain linearization 66/17566/12
Klement Sekera [Wed, 13 Feb 2019 10:01:32 +0000 (11:01 +0100)]
buffer chain linearization

Rewrite vlib_buffer_chain_linearize function so that it works as intended.
Linearize buffer chains coming out of reassembly to work around some
dpdk-tx issues. Note that this is not a complete workaround
as a sufficiently large packet will still cause the resulting chain to
be too long.

Drop features from reassembly code which relies on knowing which and how
many buffers were freed during linearization, buffer counts and tracing
capabilities for these cases.

Change-Id: Ic65de53ecb5c78cd96b178033f6a576ab4060ed1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agovhoat: potential crash in map_guest_mem using debug image 35/17035/4
Steven Luong [Thu, 24 Jan 2019 06:20:19 +0000 (22:20 -0800)]
vhoat: potential crash in map_guest_mem using debug image

map_guest_mem may be called from worker-thread/dataplane. It has a call
to vlib_log and may crash inside vlib_log's ASSERT statement

  /* make sure we are running on the main thread to avoid use in dataplane
     code, for dataplane logging consider use of event-logger */
  ASSERT (vlib_get_thread_index () == 0);

The fix is to convert the vlib_log call in map_guest_map to event logger

Change-Id: Iaaf6d86782aa8a18d25e0209f22dc31f04668d56
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoAdd support for 19.01 02/17702/3
jdenisco [Tue, 19 Feb 2019 21:25:05 +0000 (16:25 -0500)]
Add support for 19.01

Change-Id: I8583f6f6432d8d7c449f43d62d8707a1718f3240
Signed-off-by: jdenisco <jdenisco@cisco.com>
5 years agosession: separate local session logic 96/17796/4
Florin Coras [Fri, 22 Feb 2019 21:11:38 +0000 (13:11 -0800)]
session: separate local session logic

Move local session to separate header and source files. First step to
refactoring local sessions.

Change-Id: I280fdfef20ba8a0977d15c1c8ce030ea2fb72dde
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: keep snd sack block free list 91/17791/3
Florin Coras [Fri, 22 Feb 2019 17:07:20 +0000 (09:07 -0800)]
tcp: keep snd sack block free list

Instead of constantly reallocating the new sack block list, keep the old
one as a reusable free list.

Change-Id: Iad79a72204f97b96352c1c6eea66c2839a35cfe6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMakefile: fix missing help instruction 95/17795/2
Steven Luong [Fri, 22 Feb 2019 19:11:14 +0000 (11:11 -0800)]
Makefile: fix missing help instruction

make pkg-deb-debug and make vom-pkg-deb-debug were missing in the help
instruction

Change-Id: Ic49a7c29b3394ee9fc259bd40ecf0611470125c6
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agostats: add buffer gauges 81/17781/4
Filip Tehlar [Fri, 22 Feb 2019 13:05:53 +0000 (05:05 -0800)]
stats: add buffer gauges

Change-Id: I7f7a459f25d64ea5fa36e30d7dccc667bc19c5a9
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
5 years agoVOM: GBP use singular instance if shared-ptr is set 94/17794/2
Neale Ranns [Fri, 22 Feb 2019 18:33:21 +0000 (10:33 -0800)]
VOM: GBP use singular instance if shared-ptr is set

Change-Id: I845e0aa0b657b7a4745c158c4c510f604f4502bb
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC: header exports 68/17768/2
Neale Ranns [Fri, 22 Feb 2019 07:34:59 +0000 (23:34 -0800)]
IPSEC: header exports

Change-Id: I7d48a4e236c6e7b11b0c9750a30fb68e829d64a5
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoCallback functions must have the correct signature 77/17777/2
Neale Ranns [Fri, 22 Feb 2019 12:40:53 +0000 (12:40 +0000)]
Callback functions must have the correct signature

Change-Id: I642823bdc3c7006a0b719ec1e3a9cd75b2b37253
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMaintainers list update 82/17782/2
Marco Varlese [Fri, 22 Feb 2019 13:18:48 +0000 (14:18 +0100)]
Maintainers list update

Change-Id: I133ad79bac79c50caefed01c638f26ec9b3cd6c3
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoavf: fix eat own tail issue on tx 89/17789/2
Damjan Marion [Fri, 22 Feb 2019 16:25:00 +0000 (17:25 +0100)]
avf: fix eat own tail issue on tx

Change-Id: Ie14ca18bab47ac6765ff0799475d0c2a4d936f90
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVOM: mroute dump debug level fix 86/17786/2
Neale Ranns [Fri, 22 Feb 2019 14:15:57 +0000 (06:15 -0800)]
VOM: mroute dump debug level fix

Change-Id: Ice8c3e76857ee35c079d72d6697e6a3fbc99b7aa
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: De-template the ACL code. 85/17785/2
Neale Ranns [Fri, 22 Feb 2019 08:44:40 +0000 (00:44 -0800)]
VOM: De-template the ACL code.

there's something going wrong with the dependency ordering.
i have added hacks in the past, but these are not reliable
across compiler versions.

Change-Id: I34b4aae4c7ed7beaa424cd692ff34cba21ba802a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: include sclass in format EPG 78/17778/2
Neale Ranns [Fri, 22 Feb 2019 12:56:14 +0000 (12:56 +0000)]
GBP: include sclass in format EPG

Change-Id: I6cbc7dafcc59aa67d79c718d88f67d71ee97b4b6
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVOM: fix tests and namespacify l2_vtr 75/17775/2
Neale Ranns [Fri, 22 Feb 2019 10:48:25 +0000 (02:48 -0800)]
VOM: fix tests and namespacify l2_vtr

Change-Id: Ie59220a622c3a5195485cd6857b45f57d6eeaf95
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: remove testing asserts 67/17767/2
Neale Ranns [Fri, 22 Feb 2019 07:25:17 +0000 (23:25 -0800)]
GBP: remove testing asserts

Change-Id: I27ba13b3501debd4dcbda5df05afdcfc497f608f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotcp: send enough dupacks to cover all sack holes 62/17762/9
Florin Coras [Fri, 22 Feb 2019 00:46:24 +0000 (16:46 -0800)]
tcp: send enough dupacks to cover all sack holes

Make sure we send enough dupacks to cover all the holes created in the
last frame received. Also make sure we send all the blocks, not just the
first.

Change-Id: I9597a34ac14473d1cc3ad07d65bc37043e3d0582
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession/vcl: fix coverity warnings 66/17766/2
Florin Coras [Fri, 22 Feb 2019 04:04:15 +0000 (20:04 -0800)]
session/vcl: fix coverity warnings

Change-Id: I9b0e6d65255e516cf5bf18757d4769176ef76e92
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotapv2: coverity strikes back 60/17760/2
Steven Luong [Thu, 21 Feb 2019 22:55:52 +0000 (14:55 -0800)]
tapv2: coverity strikes back

while https://gerrit.fd.io/r/#/c/16590/ fixed the leaked fd which coverity
reported at that time, new coverity run reports simailar leaked fd in a
different goto punt path. It would be nice if coverity reported both of them
at the same time. Or perhaps it did and I just missed it. Anyway, the new fix
is to put the close (fd) statement prior to the return of tap_create_if routine
which should catch all goto's.

Change-Id: I0a51ed3710e32d5d74c9cd9b5066a667153e2f9d
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoAdd no-append flag to vlib_frame_t 31/17731/6
Damjan Marion [Thu, 21 Feb 2019 19:24:54 +0000 (20:24 +0100)]
Add no-append flag to vlib_frame_t

Change-Id: I01c4f5755d579282773ac227b0bc24f8ddbb2bd1
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovhost: VPP stalls with vhost performing control plane actions 46/17246/5
Steven Luong [Fri, 1 Feb 2019 18:23:56 +0000 (10:23 -0800)]
vhost: VPP stalls with vhost performing control plane actions

Symptom
-------
With NDR traffic blasting at VPP, bringing up a new VM with vhost
connection to VPP causes packet drops. I am able to recreate this
problem easily using a simple setup like this.

TREX-------------- switch ---- VPP
    |---------------|  |-------|

Cause
-----
The reason for the packet drops is due to vhost holding onto the worker
barrier lock for too long in vhost_user_socket_read(). There are quite a
few of system calls inside the routine. At the end of the routine, it
unconditionally calls vhost_user_update_iface_state() for all message
types. vhost_user_update_iface_state() also unconditionally calls
vhost_user_rx_thread_placement() and vhost_user_tx_thread_placement().
vhost_user_rx_thread_placement scraps out all existing cpu/queue mappings
for the interface and creates brand new cpu/queue mappings for the
interface. This process is very disruptive and very expensive. In my
opinion, this area of code needs a makeover.

Fixes
-----
* vhost_user_socket_read() is rewritten that it should not hold
  onto the worker barrier lock for system calls, or at least minimize the
  need for doing it.
* Remove the call to vhost_user_update_iface_state as a default route at
  the end of vhost_user_socket_read(). There is only a couple of message
  types which really need to call vhost_user_update_iface_state(). We put
  the call to those message types which need it.
* Remove vhost_user_rx_thread_placement() and
  vhost_user_tx_thread_placement from vhost_user_update_iface_state().
  There is no need to repetatively change the cpu/queue mappings.
* vhost_user_rx_thread_placement() is actually quite expensive. It should
  be called only once per queue for the interface. There is no need to
  scrap the existing cpu/queue mappings and create new cpu/queue mappings
  when the additional queues becomes active/enable.
* Change to create the cpu/queue mappings for the first RX when the
  interface is created. Dont remove the cpu/queue mapping when the
  interface is disconnected. Remove the cpu/queue mapping only when the
  interface is deleted.

The create vhost user interface CLI also has some very expensive system
calls if the command is entered with the optional keyword "server"

As a bonus, This patch makes the create vhost user interface binary-api and
CLI thread safe. Do the protection for the small amount of code which is
thread unsafe.

Change-Id: I4a19cbf7e9cc37ea01286169882e5603e6d7eb77
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agostring_test: Coverity woe 59/17759/1
Steven Luong [Thu, 21 Feb 2019 19:58:14 +0000 (11:58 -0800)]
string_test: Coverity woe

Coverity complains about dead code as shown below and it is right.
The fix is to simply remove the dead code.

503  if (v_indicator != indicator)

CID 190173 (#3 of 3): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return -1;.
504    return -1;

Change-Id: Ibca9e10451a4459db099bef5ecc6939474bdb903
Signed-off-by: Steven Luong <sluong@cisco.com>
5 years agoRevert "bond: problem switching from l2 to l3" 93/17593/5
Peter Mikus [Thu, 14 Feb 2019 07:44:14 +0000 (07:44 +0000)]
Revert "bond: problem switching from l2 to l3"

During CSIT testing we discovered that LACP tests were failing and
producing coredumps. Reverting this patch fix the problem with VPP
crashing.

This reverts commit f23890138e02d4218c828c427f687f8ecdb0e165.

Change-Id: Icf97053ce1473350add885cbebe591f7f3efcbea
Signed-off-by: Peter Mikus <pmikus@cisco.com>
5 years agophysmem: keep physmem VA in 39-bit address space on x86_64 54/17754/3
Damjan Marion [Thu, 21 Feb 2019 13:44:59 +0000 (14:44 +0100)]
physmem: keep physmem VA in 39-bit address space on x86_64

Some x86 CPUs have IOMMU capable dealing only with 39-bit address space
This patch also adds option to specify physmem base address from
startup.conf

Change-Id: I9e8abd26efb60e9c4ad54c035fb1751a4a61f4dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoAPI: client does not set root permissions on shm segment 67/17667/3
Neale Ranns [Tue, 19 Feb 2019 08:41:22 +0000 (00:41 -0800)]
API: client does not set root permissions on shm segment

Change-Id: I4ba099832b646392c1b6fa34236ca3377c9f786c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoGBP: BD index not BD ID 55/17755/2
Neale Ranns [Thu, 21 Feb 2019 13:28:11 +0000 (05:28 -0800)]
GBP: BD index not BD ID

Change-Id: I6da1ea25d688011b7aead1f639dd6a234ca4f20a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl/session: send unlisten over message queue 36/17736/4
Florin Coras [Thu, 21 Feb 2019 03:48:31 +0000 (19:48 -0800)]
vcl/session: send unlisten over message queue

Change-Id: I68cd6c0e6be3e8088792df3885ae190bb00462b0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: drop outstanding data when entering closing state 37/17737/4
Florin Coras [Thu, 21 Feb 2019 03:48:31 +0000 (19:48 -0800)]
tcp: drop outstanding data when entering closing state

Change-Id: I92a009b9630b0d882ea3c5c99aad88ed6f5109a0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosvm: fix mem ordering for enqueue nocopy 38/17738/2
Florin Coras [Thu, 21 Feb 2019 07:13:43 +0000 (23:13 -0800)]
svm: fix mem ordering for enqueue nocopy

Change-Id: Ibc852f88747125a895415570349975d3b379a6f4
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoTESTS: refactor framework send_and_expect. 32/17732/2
Paul Vinciguerra [Wed, 20 Feb 2019 17:01:14 +0000 (09:01 -0800)]
TESTS: refactor framework send_and_expect.

Create a common pg_send method for cases when results are just discarded.

Change-Id: I786960d2d7bbb96dcb407f6e59aa96951b7b19e7
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agopg: fix payload hex-string bug 46/17546/2
Kingwel Xie [Wed, 13 Feb 2019 07:03:33 +0000 (02:03 -0500)]
pg: fix payload hex-string bug

Change-Id: I0ea98bf9c203398d9cf85d22994a10217bb511d2
Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
5 years agoRemove autotools leftovers from gitignore 18/17718/2
Benoît Ganne [Wed, 20 Feb 2019 09:36:37 +0000 (10:36 +0100)]
Remove autotools leftovers from gitignore

Some tracked files were ignored due to gitignore rules that date back to
autotools based buildsystem. Update gitignore accordingly.

~# git ls-files -i --exclude-standard
Makefile
build-root/Makefile
build/external/Makefile
build/external/deb/debian/dkms/Makefile
doxygen/Makefile
extras/rpm/Makefile
src/vnet/config.h
test/Makefile
test/doc/Makefile
test/ext/Makefile

Change-Id: I3326c932cd174434211b744bf5e26bc4da450339
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agopg: fix tracing when device-input feature arc is used 27/17727/2
Damjan Marion [Wed, 20 Feb 2019 14:34:00 +0000 (15:34 +0100)]
pg: fix tracing when device-input feature arc is used

Change-Id: I82240b43d3a5f3f33ac9ab2de106b3ec0ea31780
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agopg: fix crash when multiple streams are enqueuing to the same next 23/17723/2
Damjan Marion [Wed, 20 Feb 2019 13:11:51 +0000 (14:11 +0100)]
pg: fix crash when multiple streams are enqueuing to the same next

Only with debug image and when next node is not ethernet-input...

Change-Id: Iaa404b5d35d5c04996ff48cd16877858092b78d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agopg: remove no-recycle option 26/17726/2
Damjan Marion [Wed, 20 Feb 2019 13:15:25 +0000 (14:15 +0100)]
pg: remove no-recycle option

Change-Id: Ic47bde2d08b2719b5c6c87cb2e9a8af0d2160e6e
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agocalculate per-thread time offset 03/17703/4
Dave Barach [Tue, 19 Feb 2019 22:05:30 +0000 (17:05 -0500)]
calculate per-thread time offset

The main thread squirrels away vlib_time_now (&vlib_global_main),
worker threads use it to calculate an offset in f64 seconds from their
own vlib_time_now(vm) value. We use that offset until the next barrier
sync.

Thanks to Damjan for the suggestion.

Change-Id: If56cdfe68e5ad8ac3b0d0fc885dc3ba556cd1215
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agosession: fix local sessions disconnects 04/17704/4
Florin Coras [Wed, 20 Feb 2019 04:57:06 +0000 (20:57 -0800)]
session: fix local sessions disconnects

Change-Id: Ib4ca472aa2413ced7f82d87e4fee65ca86ab1f2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovom: Fix the versioning issue [vpp-1555] 59/17459/4
Mohsin Kazmi [Wed, 20 Feb 2019 10:07:27 +0000 (11:07 +0100)]
vom: Fix the versioning issue [vpp-1555]

vom library was missing version apended to libvom.so
This patch fixes this issue.

Change-Id: I99a6c282d651e1882574af999f04610d7a2c4d44
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agodocs: use python3 for make docs. 87/17587/3
Paul Vinciguerra [Thu, 14 Feb 2019 04:59:30 +0000 (20:59 -0800)]
docs: use python3 for make docs.

Change-Id: If62b5ef563523b400fb5160d0343210407905094
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agomake test-doc: Clean up import errors. 71/17571/2
Paul Vinciguerra [Wed, 13 Feb 2019 15:44:52 +0000 (07:44 -0800)]
make test-doc: Clean up import errors.

Mock additional 3rd party modules and replace wildcard imports that
were confusing sphinx.

Change-Id: Ia9e599901a2a3fad854d3631dd0991183ae6d715
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotls: add vcl test 63/17663/6
Florin Coras [Tue, 19 Feb 2019 06:39:39 +0000 (22:39 -0800)]
tls: add vcl test

Change-Id: If4c7efaf6506a827e7a95a56c2f6b6060df03fa1
Signed-off-by: Florin Coras <fcoras@cisco.com>