vpp.git
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>
5 years agoIPSEC: API coverity error of unitialised stat_index value 93/17693/2
Neale Ranns [Tue, 19 Feb 2019 16:27:34 +0000 (08:27 -0800)]
IPSEC: API coverity error of unitialised stat_index value

Change-Id: If884a3840f34090e33ce7808d38e50f919290d9f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIPSEC-GRE: no clib_warning in the DP 90/17690/2
Neale Ranns [Tue, 19 Feb 2019 14:33:14 +0000 (06:33 -0800)]
IPSEC-GRE: no clib_warning in the DP

Change-Id: If30c7334de55d32e57554cf1601c529cd807b834
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoMakefile: correct opensuse 15.0 dep naming 98/17698/3
Ed Kern [Tue, 19 Feb 2019 17:27:23 +0000 (10:27 -0700)]
Makefile: correct opensuse 15.0 dep naming

This covers both naming option for opensuse leap15
dep package naming

Change-Id: I2ade004e44e75c08afde0f3af42b33cd97ce0ebc
Signed-off-by: Ed Kern <ejk@cisco.com>
5 years agoldp: return byte count from a successful recvfrom 84/17684/3
Haggai Eran [Tue, 19 Feb 2019 13:04:42 +0000 (15:04 +0200)]
ldp: return byte count from a successful recvfrom

Unless there's an error, recvfrom should return the number of bytes
received. The current code returns zero on success due to
ldp_copy_ep_to_sockaddr returning zero.

Change-Id: Ib843b99a08c44b5ee2d16efe9edab0cf5df65170
Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
5 years agoreassembly: handle ip6 atomic fragments 86/17686/2
Klement Sekera [Tue, 19 Feb 2019 13:47:25 +0000 (14:47 +0100)]
reassembly: handle ip6 atomic fragments

Change-Id: Ide3425f144fb17201dcde7ba89f39e460048100d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoavf: fix feature arc, take two 88/17688/2
Damjan Marion [Tue, 19 Feb 2019 14:15:40 +0000 (15:15 +0100)]
avf: fix feature arc, take two

Change-Id: Ic191850739da82de32d87bbf17947b55cf962f2d
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoreassembly: fix buffer usage counter 78/17678/3
Klement Sekera [Tue, 19 Feb 2019 12:53:43 +0000 (13:53 +0100)]
reassembly: fix buffer usage counter

Change-Id: I713904f8eb2f724cb08dba494c160c14cc8b24a1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoVPP-1504: Remove JVPP 18/16318/6
Michal Cmarada [Thu, 31 Jan 2019 09:57:40 +0000 (10:57 +0100)]
VPP-1504: Remove JVPP

As part of JVPP migration this removes JVPP completely from VPP.

Change-Id: I6b74e7961aa474ae471e63fe43a624cd9fc3659b
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agodpdk: update Cisco VIC port type 77/17677/2
Hyong Youb Kim [Tue, 19 Feb 2019 12:32:55 +0000 (04:32 -0800)]
dpdk: update Cisco VIC port type

Recent VIC models can support 25, 50, and 100Gbps links. Use the
helper (port_type_from_link_speed) to set the port type as it supports
all possible link speeds.

Change-Id: I748d8ac716a6393d116a9db8a599151c70a9000a
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
5 years agodpdk: do not shift PKT_RX_FDIR 80/17680/2
Hyong Youb Kim [Tue, 19 Feb 2019 13:04:49 +0000 (05:04 -0800)]
dpdk: do not shift PKT_RX_FDIR

PKT_RX_FDIR is a bit flag, not a bit position.

Change-Id: Ib31ec9257e906b045522fa7c2b515b7b0c13bb32
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
5 years agoacl-plugin: split the dataplane function into two, save 10sec in compile time 25/17325/2
Andrew Yourtchenko [Tue, 5 Feb 2019 14:15:59 +0000 (15:15 +0100)]
acl-plugin: split the dataplane function into two, save 10sec in compile time

Change-Id: I00618f12dfd5ab4a2baf6c8ec1f53b4c7179aed7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoVPP-1568:when entry src cover change, recursive-loop fib still can not work. 96/17596/3
mu.duojiao [Thu, 14 Feb 2019 08:57:54 +0000 (16:57 +0800)]
VPP-1568:when entry src cover change, recursive-loop fib still can not work.

Change-Id: I90762b59f94175f278380c95776471a30bc94d34
Signed-off-by: mu.duojiao <mu.duojiao@zte.com.cn>
5 years agotap gso: experimental support 52/15052/36
Andrew Yourtchenko [Fri, 12 Oct 2018 14:09:22 +0000 (16:09 +0200)]
tap gso: experimental support

This commit adds a "gso" parameter to existing "create tap..." CLI,
and a "no-gso" parameter for the compatibility with the future,
when/if defaults change.

It makes use of the lowest bit of the "tap_flags" field in the API call
in order to allow creation of GSO interfaces via API as well.

It does the necessary syscalls to enable the GSO
and checksum offload support on the kernel side and sets two flags
on the interface: virtio-specific virtio_if_t.gso_enabled,
and vnet_hw_interface_t.flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO.

The first one, if enabled, triggers the marking of the GSO-encapsulated
packets on ingress with VNET_BUFFER_F_GSO flag, and
setting vnet_buffer2(b)->gso_size to the desired L4 payload size.

VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO determines the egress packet
processing in interface-output for such packets:

When the flag is set, they are sent out almost as usual (just taking
care to set the vnet header for virtio).

When the flag is not enabled (the case for most interfaces),
the egress path performs the re-segmentation such that
the L4 payload of the transmitted packets equals gso_size.

The operations in the datapath are enabled only when there is at least
one GSO-compatible interface in the system - this is done by tracking
the count in interface_main.gso_interface_count. This way the impact
of conditional checks for the setups that do not use GSO is minimized.

"show tap" CLI shows the state of the GSO flag on the interface, and
the total count of GSO-enabled interfaces (which is used to enable
the GSO-related processing in the packet path).

This commit lacks IPv6 extension header traversal support of any kind -
the L4 payload is assumed to follow the IPv6 header. Also it performs
the offloads only for TCP (TSO - TCP segmentation offload).
The UDP fragmentation offload (UFO) is not part of it.

For debug purposes it also adds the debug CLI:

 "set tap gso {<interface> | sw_if_index <sw_idx>} <enable|disable>"

Change-Id: Ifd562db89adcc2208094b3d1032cee8c307aaef9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoVPP-1573 fix crash in ip6 reassembly 74/17674/2
Klement Sekera [Tue, 19 Feb 2019 10:28:47 +0000 (11:28 +0100)]
VPP-1573 fix crash in ip6 reassembly

Change-Id: I3a3076c7d87446b5ec2a02e70d3b6d05f1875875
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoip6-local: fix uninitialized variable error 65/17665/3
Damjan Marion [Tue, 19 Feb 2019 07:55:18 +0000 (08:55 +0100)]
ip6-local: fix uninitialized variable error

Change-Id: I245a8cc8f237242efadcf10d47b76222a6497e89
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoVOM: no assert on interface mac set 69/17669/2
Neale Ranns [Tue, 19 Feb 2019 09:41:59 +0000 (01:41 -0800)]
VOM: no assert on interface mac set

Change-Id: I0210b18dc37e1a425c75c95a2fb98c6a48d8ea7a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: fix feature arc 56/17656/2
Damjan Marion [Mon, 18 Feb 2019 16:29:04 +0000 (17:29 +0100)]
avf: fix feature arc

Change-Id: Ib7d8e8e2e4663daa1307e676c53f7ef8b91e60e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agotls: fix openssl/mbedtls use of app_wrk index 61/17661/2
Florin Coras [Tue, 19 Feb 2019 04:14:20 +0000 (20:14 -0800)]
tls: fix openssl/mbedtls use of app_wrk index

Change-Id: I7ccc948357d815a1bd4279a7079cf4db2949183c
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: move fifo allocation logic to app worker 60/17660/9
Florin Coras [Mon, 18 Feb 2019 21:02:28 +0000 (13:02 -0800)]
session: move fifo allocation logic to app worker

Change-Id: I1662ec4b5503cb64a8a86a2441842311d959b3a6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoNAT: fix: multiple definition of nat64_cleaner_process_event_e 59/17659/4
Neale Ranns [Mon, 18 Feb 2019 20:11:51 +0000 (12:11 -0800)]
NAT: fix: multiple definition of nat64_cleaner_process_event_e

Change-Id: Idcff6108f4f965344afce9ff614018239819dc95
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoResolve vppapigen DeprecationWarning. 42/17542/3
Paul Vinciguerra [Tue, 12 Feb 2019 20:21:01 +0000 (12:21 -0800)]
Resolve vppapigen DeprecationWarning.

/vpp/src/tools/vppapigen/vppapigen:823: DeprecationWarning:
the imp module is deprecated in favour of importlib;
see the module's documentation for alternative uses

Change-Id: If7729778374e9193f6381c8bd2ed34c875db3f1e
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agotcp: harden for high scale scenarios 29/17629/10
Florin Coras [Sun, 17 Feb 2019 04:47:32 +0000 (20:47 -0800)]
tcp: harden for high scale scenarios

- Better handle buffer starvation scenarios
- Handle case when both peers enter recovery due to packet loss.
- Fix passive open establish cleanup

Change-Id: I2f28baa2ff0383bb8f5f6d2452b49aa38ce69bce
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoDHCP: trace flags copied from old to new not vice-versa 49/17649/2
Neale Ranns [Mon, 18 Feb 2019 14:20:46 +0000 (06:20 -0800)]
DHCP: trace flags copied from old to new not vice-versa

Change-Id: I6c13af7e97753da013cdd5b212302d008cbd616d
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT: VPP-1552 code migration from old multiarch scheme 60/17560/4
Filip Varga [Wed, 13 Feb 2019 09:42:59 +0000 (01:42 -0800)]
NAT: VPP-1552 code migration from old multiarch scheme

Change-Id: I88f3df8aaa521e7707ef3335acdbf1ab41e7ee28
Signed-off-by: Filip Varga <fivarga@cisco.com>
5 years agoExplicit dual-loop in ip6-local 52/17652/2
Benoît Ganne [Thu, 14 Feb 2019 14:32:45 +0000 (15:32 +0100)]
Explicit dual-loop in ip6-local

Makes ip6-local node dual-loop explicit. This is only a style change.

Change-Id: Ic8e7cecb3f51e98b8a069b501f5c338156934a6d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
5 years agoIPSEC: move SA counters into the stats segment 31/17631/2
Neale Ranns [Sun, 17 Feb 2019 18:04:27 +0000 (18:04 +0000)]
IPSEC: move SA counters into the stats segment

1) stats are accessed via the stat segment which is more condusive to
   monitoring
2) stats are accurate in the presence of multiple threads. There's no
   guarantee that an SA is access from only one worker.

Change-Id: Id5e217ea253ddfc9480aaedb0d008dea031b1148
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT44: fix snat_get_worker_out2in_cb (VPP-1536) 39/17639/1
Matus Fabian [Mon, 18 Feb 2019 09:54:16 +0000 (01:54 -0800)]
NAT44: fix snat_get_worker_out2in_cb (VPP-1536)

Change-Id: I9c562f8e3407ca60a4412a162015fa505b7590b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agotcp: fix handling of retransmitted syns 28/17628/4
Florin Coras [Sat, 16 Feb 2019 02:20:58 +0000 (18:20 -0800)]
tcp: fix handling of retransmitted syns

Change-Id: I88fdeb0ca56d3a5d9c0f36def13c6de8142f59f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoOptimize ip6-local 23/17623/2
Benoît Ganne [Thu, 14 Feb 2019 14:32:45 +0000 (15:32 +0100)]
Optimize ip6-local

Optimize IPv6 ip6-local node by rewriting the dual/single loop with
prefetch and simpler unrolling.
My local, unrepresentative tests for GRE4 termination over IPv6 show a
performance improvement of ~40% for ip6-local node alone and ~5%
globally.

Change-Id: I11e1e86d3838dd3c081aa6be5e25dae16ed6e2d8
Signed-off-by: Benoît Ganne <bganne@cisco.com>