vpp.git
5 years agoNAT44: LB NAT - local backends in multiple VRFs (VPP-1345) 79/13579/3
Matus Fabian [Fri, 20 Jul 2018 05:45:25 +0000 (22:45 -0700)]
NAT44: LB NAT - local backends in multiple VRFs (VPP-1345)

Add support for local backends in multiple VRFs for load-balancing NAT rules.

Change-Id: I64e6818bd67a7e69985003498cf1f16f7200c334
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoImprove cpu { coremask-% } configure option 96/13696/3
Yi He [Tue, 17 Jul 2018 06:18:41 +0000 (14:18 +0800)]
Improve cpu { coremask-% } configure option

Accept any sized hexadecimal bitmask specification to
support platforms with hundreds of cores.

Change-Id: Ib881db0cf60f78bdeffa13acfc2fc7fe7e128cc4
Signed-off-by: Yi He <yi.he@arm.com>
5 years agoMove java api to extras/ 61/13861/3
Damjan Marion [Mon, 30 Jul 2018 14:10:14 +0000 (16:10 +0200)]
Move java api to extras/

Change-Id: Ibd5cbbdfb22a235442cddaebc9eae9a3c4e35ec9
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agodocs: change code blocks from "shell" to "console" 74/13874/3
John DeNisco [Wed, 1 Aug 2018 14:38:23 +0000 (10:38 -0400)]
docs: change code blocks from "shell" to "console"

Change-Id: I136fccfc06e07fb68d11df686c59687362fb8827
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agovxlan:optimize cached entry compare 56/13856/2
Eyal Bari [Wed, 1 Aug 2018 07:25:50 +0000 (10:25 +0300)]
vxlan:optimize cached entry compare

the bihash key compare was doing the extra step of loading both keys into
vector regs and comparing those - instead of using the temporary values
created.

Change-Id: Ic557bfa56cd6aa60c71e7f28c880f85e1eb1e6ec
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoStore USE_DLMALLOC in vppinfra/config.h 71/13871/1
Damjan Marion [Wed, 1 Aug 2018 12:38:36 +0000 (14:38 +0200)]
Store USE_DLMALLOC in vppinfra/config.h

Change-Id: Ib596e7f525b83dc7e830bcf6a126cd210216ce86
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoAdd support for shuffle vector intrinsic via Neon in ARM 50/13850/2
Sirshak Das [Fri, 27 Jul 2018 06:13:33 +0000 (01:13 -0500)]
Add support for shuffle vector intrinsic via Neon in ARM

This adds byte_swap (variant of shuffle) and shuffle vector intrinsic
for ARM based on Neon, concuring with same signature as SSE vector
intrinsic.

Change-Id: I386fd2b1dcc83654e4ad9f90a6065d7736e4ce5c
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
5 years agoPoison freed memory objects 47/13847/2
Dave Barach [Tue, 31 Jul 2018 14:39:30 +0000 (10:39 -0400)]
Poison freed memory objects

When compiled w/ -DCLIB_DEBUG=1, paint 0x13 across freed memory
blocks. Should result in a characteristic SIGSEGV if someone
dereferences a pointer in a freed vector element, etc.

Change-Id: I5f78970f4342310bfbe7adeddb56feff21f0de2c
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovxlan:decap.c conform coding style 46/13646/2
Eyal Bari [Tue, 24 Jul 2018 12:15:37 +0000 (15:15 +0300)]
vxlan:decap.c conform coding style

Change-Id: I7bab9800c267dd6ea85288fd3d9ca88dff9f554b
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoFix undefined symbol: fformat_append_cr in vat plugins loading 95/13695/4
Yi He [Mon, 16 Jul 2018 05:52:00 +0000 (13:52 +0800)]
Fix undefined symbol: fformat_append_cr in vat plugins loading

Several test plugins report undefined symbol while being loaded
by load_one_vat_plugin. Fix this by adding VPP_API_TEST_BUILTIN
into CFLAGS for building these plugins.

Change-Id: I908720fd0d01da1ead30ba17027ba10358f6bdf1
Signed-off-by: Yi He <yi.he@arm.com>
5 years agomemif: socket filename fix 42/13842/2
Jakub Grajciar [Tue, 31 Jul 2018 10:25:23 +0000 (12:25 +0200)]
memif: socket filename fix

create runtime dir when adding default socket filename.

Change-Id: Iad7e751fcab7ce773e0907302414a06ea44dd6cd
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoacl-plugin: move the acl epoch calculation into inline function 92/13492/2
Andrew Yourtchenko [Mon, 16 Jul 2018 13:17:18 +0000 (15:17 +0200)]
acl-plugin: move the acl epoch calculation into inline function

Change-Id: Ifc8b3d30d66c7ade1e3584844ce3f82d42d2fb94
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agofix 'sh vxlan tunnels' 21/13821/2
Neale Ranns [Mon, 30 Jul 2018 18:59:22 +0000 (11:59 -0700)]
fix 'sh vxlan tunnels'

this receipe:
  /* Get a line of input. */
  if (!unformat_user (input, unformat_line_input, line_input))
    return 0;
only works if there is more data following the registered command name.
So it is not so good for show commands...

Change-Id: I54249865a44526ade4b40e2d6207138a2d056e40
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agovcl: add read/write udp support 83/13783/8
Florin Coras [Fri, 27 Jul 2018 12:45:06 +0000 (05:45 -0700)]
vcl: add read/write udp support

Change-Id: Ie6171c12055cde6915856de340839f5da1b1b1da
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoUpdate Release Notes for 18.07 Release 23/13823/1
Ed Warnicke [Mon, 30 Jul 2018 18:52:54 +0000 (13:52 -0500)]
Update Release Notes for 18.07 Release

Change-Id: I2b58bca6d360badb4fd17022121e244aee5713b8
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
5 years agoSIXRD: fix post introduction of the directed subnet broadcast 13/13813/2
Neale Ranns [Mon, 30 Jul 2018 15:14:14 +0000 (08:14 -0700)]
SIXRD: fix post introduction of the directed subnet broadcast

Change-Id: I9ce801e9b257eaa6be0cbe2ad3bfe630717f8c67
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoFIB: return entry prefix by const reference to avoid the copy 12/13812/1
Neale Ranns [Mon, 30 Jul 2018 15:04:40 +0000 (08:04 -0700)]
FIB: return entry prefix by const reference to avoid the copy

Change-Id: I09b8406168df4b6b28df3ede24ee839681be0195
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoReverse the logic of flagging malformed packet in fragmentation code to allow padding 52/13752/2
Rajesh Saluja [Thu, 26 Jul 2018 21:13:09 +0000 (14:13 -0700)]
Reverse the logic of flagging malformed packet in fragmentation code to allow padding

Change-Id: I051c137ae18fd436a798a12a56a9d12f8eaa2e08
Signed-off-by: Rajesh Saluja <rajsaluj@cisco.com>
5 years agosession/dlmalloc: coverity fixes 95/13795/1
Florin Coras [Sat, 28 Jul 2018 11:53:30 +0000 (04:53 -0700)]
session/dlmalloc: coverity fixes

Change-Id: I17ffec018f5d2fb06a7a3af6d8bc6128ffee3ae6
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodlmalloc: use static magic constant for debug images 85/13785/1
Florin Coras [Fri, 27 Jul 2018 18:30:46 +0000 (11:30 -0700)]
dlmalloc: use static magic constant for debug images

Avoids crashes on restarts if svm root region backing file was not
cleaned up.

Change-Id: I608cf5711aa8c3f9620900473bdf76bde8b918de
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix build-break when compiling -O0 / TAG=vpp_debug 82/13782/2
Dave Barach [Fri, 27 Jul 2018 16:11:52 +0000 (12:11 -0400)]
Fix build-break when compiling -O0 / TAG=vpp_debug

Without inlining [TAG=vpp_debug], gcc7 (at least) refuses to produce
the indicated vector unit instruction.

Change-Id: I0f0400ad74b1e498dce7963a85c47d33afe0a768
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovcl: use events for epoll/select/read/write 28/13528/36
Florin Coras [Tue, 17 Jul 2018 17:46:29 +0000 (10:46 -0700)]
vcl: use events for epoll/select/read/write

Have vcl poll and wait on the event message queues as opposed to
constantly polling the session fifos. This also adds event signaling to
cut through sessions.

On the downside, because we can't wait on multiple condvars, i.e., when
we have multiple message queues because of cut-through registrations, we
do timed waits.

Change-Id: I29ade95dba449659fe46008bb1af502276a7c5fd
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years ago128-bit SIMD version of vlib_get_buffers 53/13753/3
Damjan Marion [Thu, 26 Jul 2018 23:47:57 +0000 (01:47 +0200)]
128-bit SIMD version of vlib_get_buffers

Change-Id: I1a28ddf535c80ecf4ba4bf31659ff2fead1d8a64
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agomips64: Add timer and longjump support 51/13751/5
Carl Smith [Thu, 26 Jul 2018 03:45:28 +0000 (15:45 +1200)]
mips64: Add timer and longjump support

Also correct types.h for mips64 which could never be hit
as _mips was part of the previous ifdef.

Change-Id: Id0435c8fc960c5d25c43129b9d9f1606e39ba8e3
Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
5 years agovector indicies walk in reverse 60/13760/2
Neale Ranns [Fri, 27 Jul 2018 07:44:52 +0000 (00:44 -0700)]
vector indicies walk in reverse

Change-Id: Iddc8a940601230f8b209c5601e4e5bd04b103c6a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoFix memory leak in processing of ICMPv6 RA event (VPP-1360) 63/13763/1
Juraj Sloboda [Fri, 27 Jul 2018 09:23:14 +0000 (11:23 +0200)]
Fix memory leak in processing of ICMPv6 RA event (VPP-1360)

Change-Id: I7c3e5e91391b1c9b36e8ea8bacee9a107da1ae96
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years ago-DCLIB_DEBUG => turn on extra checks in dlmalloc 49/13749/2
Dave Barach [Thu, 26 Jul 2018 20:16:55 +0000 (16:16 -0400)]
-DCLIB_DEBUG => turn on extra checks in dlmalloc

Also: call os_panic() on a heap botch crash, attempt to generate a
post-mortem API dump, etc.

Add an "ugly" test case to vec_test.c, to cause a configurable block
overrun.

Change-Id: I7b29a7645277f9e485e06ff83335306fedc24b71
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix .gitignore so docs/Makefile is not ignored. Add README and Makefile. Fis gitreview. 50/13750/2
John DeNisco [Thu, 26 Jul 2018 20:21:31 +0000 (16:21 -0400)]
Fix .gitignore so docs/Makefile is not ignored. Add README and Makefile. Fis gitreview.

Change-Id: I3d664d9c881ce127a09b9d68c1181a7098a39074
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agopp2: change default queue size 75/13375/2
Brian Brooks [Wed, 27 Jun 2018 20:53:46 +0000 (15:53 -0500)]
pp2: change default queue size

Reduce default queue size to twice the vlib frame size. This throttles
the PP from transferring more packets than are necessary for the next
round of graph execution on a core. When combined with DMA'ing into L3
cache, Mpps for 64B packets increases 35%.

Change-Id: I0afe426d23560f262fdc56accb6302b099bd0076
Signed-off-by: Brian Brooks <brian.brooks@arm.com>
5 years agoClean up dpdk plugin rx/tx pcap tracing 45/13745/2
Dave Barach [Thu, 26 Jul 2018 16:27:27 +0000 (12:27 -0400)]
Clean up dpdk plugin rx/tx pcap tracing

Needed a spinlock to protect the data vector. Cleaned up debug cli so
the output makes sense, and so that various parameters exist in one
place. Removed a nonsense memset-to-zero which led to ultra-confusing
results.

Change-Id: I91cd14ce7fe84fd2eceab86e016b5ee001993be4
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoImprove the sample plugin node dispatch function 90/13690/6
Dave Barach [Wed, 25 Jul 2018 20:56:38 +0000 (16:56 -0400)]
Improve the sample plugin node dispatch function

Three separate implementations, which vary by nearly a factor of two
in performance. Most of the performance difference is due to swapping
the src/dst mac addresses with an avx2 vector shuffle instruction.

Change-Id: Ieb36546d6074e4ac720d452a99d013c698135c57
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoInitial commit of Sphinx docs 46/13746/2
John DeNisco [Thu, 26 Jul 2018 16:45:10 +0000 (12:45 -0400)]
Initial commit of Sphinx docs

Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agoVPP-API client: timeout thread loop variable 38/13738/1
Neale Ranns [Thu, 26 Jul 2018 15:05:53 +0000 (08:05 -0700)]
VPP-API client: timeout thread loop variable

calling thread cancel on the timeout thread whilst it was
sleep on condwait and then send the cond signal did not reliably
wake up the thread.
instead don;t cancel the thread, use a loop variable to terminate it.

Change-Id: Ibc8ab6f21db7e4a98266bdf88b8b208b887820dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoVPP-1359 Wrong vl_msg_id 09/13709/3
Lukasz Majczak [Wed, 25 Jul 2018 14:58:13 +0000 (16:58 +0200)]
VPP-1359 Wrong vl_msg_id

Wrong vl_msg_id set in vl_api_stats_get_poller_delay_t_handler while reporting stats delay.

Change-Id: I7d6ad14359e41c717b976390c58e254e3602e0ff
Signed-off-by: Lukasz Majczak <lma@semihalf.com>
5 years agoavf: used tx queue should be enabled 14/13714/2
Damjan Marion [Thu, 26 Jul 2018 10:48:39 +0000 (12:48 +0200)]
avf: used tx queue should be enabled

Change-Id: I51cc4522df2dd6682148a13e7e1903850b4b3d08
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovppinfra: add SSE4.2 version of u8x16_shuffle 11/13711/2
Damjan Marion [Thu, 26 Jul 2018 08:25:58 +0000 (10:25 +0200)]
vppinfra: add SSE4.2 version of u8x16_shuffle

Change-Id: I4bf1cfe5a9492092a7362675079c47629b6f0ee8
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoavf: request queues support 87/13387/11
Jakub Grajciar [Mon, 9 Jul 2018 10:05:49 +0000 (12:05 +0200)]
avf: request queues support

Change-Id: I3a4529ff8dae70da99ec95c39ddf788c9498f478
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoL2 Flood: use the buffer clone API rather than buffer recycle 78/13578/7
Neale Ranns [Fri, 20 Jul 2018 08:16:04 +0000 (01:16 -0700)]
L2 Flood: use the buffer clone API rather than buffer recycle

Change-Id: I40e4efd8061369efc535f0d49b2f63668b6d1d15
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoavf: fix interrupt mode 89/13689/2
Damjan Marion [Tue, 24 Jul 2018 22:32:44 +0000 (00:32 +0200)]
avf: fix interrupt mode

- assign rx thread on interface create, not on admin up
- keep interrupts unmasked all the time as they are needed for writeback
- forward interrupt to graph dispatcher only if queue is in the interrupt mode

Change-Id: I5cc5afe24960143bef08f12d59fbd80ae0c6ccf8
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoGenerate vppinfra/config.h from config.in script (same as we do for vlib/config.h) 68/13668/2
Neale Ranns [Mon, 23 Jul 2018 09:05:48 +0000 (05:05 -0400)]
Generate vppinfra/config.h from config.in script (same as we do for vlib/config.h)

Change-Id: I55549b589e34a62d3704f788fce801392de22f46
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1332 memif: add/del socket filename bugfix 67/13667/2
Jakub Grajciar [Wed, 25 Jul 2018 08:49:42 +0000 (10:49 +0200)]
VPP-1332 memif: add/del socket filename bugfix

in case of relative path, create subdirs inside runtime dir.
in case of absolute path, if folder does not exist return error.

Change-Id: I01fe018102c69deb105160cfa18b741541d76c82
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoavf: api fix 44/13644/3
Jakub Grajciar [Tue, 24 Jul 2018 12:00:41 +0000 (14:00 +0200)]
avf: api fix

avf_create_reply returns software index for the new interface

Change-Id: I8a6b1a1985b072efafa24eb258b1f2cb1bea1110
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agomake_test: Add equal-cost multi-path routing tests 66/13466/4
Jan Gelety [Fri, 13 Jul 2018 14:38:04 +0000 (16:38 +0200)]
make_test: Add equal-cost multi-path routing tests

Jira: CSIT-1181

Change-Id: I78f85cf58696369070314bdf05ae8b3acf2ca84c
Signed-off-by: Jan Gelety <jgelety@cisco.com>
5 years agoCreate a unit-test plugin 28/13628/3
Dave Barach [Mon, 23 Jul 2018 22:00:54 +0000 (18:00 -0400)]
Create a unit-test plugin

Move the tcp unit test to the plugin
Add a bihash unit test and a "make test" program to call it
Adjust framework.py to load the plugin, which is disabled by default

Change-Id: Ic229d386a56a9d28dbd54974f231149053ca8f93
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotest frame work pump thread exit: set flag then wake 13/13613/2
Neale Ranns [Mon, 23 Jul 2018 09:35:56 +0000 (05:35 -0400)]
test frame work pump thread exit: set flag then wake

Change-Id: Id95b8a7ad1bf550f615c50d77b16a530cc8fc2c4
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agotls: avoid possible async handler duplication 08/13608/5
Ping Yu [Mon, 23 Jul 2018 14:33:49 +0000 (10:33 -0400)]
tls: avoid possible async handler duplication

One handler is good enough when engine sends out a retry status
Thus this patch will just go one branch

Change-Id: Id81cb3fa67d2b322b0fe1b2f62cd866cf3491eb4
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agosession: send rx events only if session ready 00/13600/3
Florin Coras [Sun, 22 Jul 2018 19:59:30 +0000 (12:59 -0700)]
session: send rx events only if session ready

Change-Id: I8d631121b104fb40c20701d4c1b428f2b71e5785
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoL2 EFP: byteswap sw_if_index, enable flag can be u8 on .api 14/13614/3
Neale Ranns [Mon, 23 Jul 2018 09:47:09 +0000 (05:47 -0400)]
L2 EFP: byteswap sw_if_index, enable flag can be u8 on .api

Change-Id: Ib99d02e84e468726feae4c386733da405b298e4f
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoNAT44: fix forwarding feature bug (VPP-1349) 02/13602/2
Matus Fabian [Mon, 23 Jul 2018 07:05:22 +0000 (00:05 -0700)]
NAT44: fix forwarding feature bug (VPP-1349)

Change-Id: I5009fcfde5c627d59dea3edda15486b9392134a2
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoBuffer clone: copy opaque2 12/13612/2
Neale Ranns [Mon, 23 Jul 2018 09:30:12 +0000 (05:30 -0400)]
Buffer clone: copy opaque2

Change-Id: I06e1dbfa0782bc03f2d0e77295b38b4fde7df35e
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoUpdate pipeline.h: use vlib_get_buffers 20/13620/2
Dave Barach [Mon, 23 Jul 2018 16:20:09 +0000 (12:20 -0400)]
Update pipeline.h: use vlib_get_buffers

It's not clear that fine-graind pipelining will ever produce optimal
performance. That having been written, it's an easier coding model for
folks interesting in decent results without having to manually
implement 2 or 4 way fine-grained parallelism.

Change-Id: Ida877292832eaf759ffbb6d2e16012f8fbd427e5
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agofix vector index range checks 98/13598/2
Eyal Bari [Sun, 22 Jul 2018 09:45:15 +0000 (12:45 +0300)]
fix vector index range checks

Change-Id: I63c36644c9d93f2c3ec6606ca0205b407499de4e
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agomake test-ext: a new test target that builds VOM (existing one no longer do) 85/13485/2
Neale Ranns [Mon, 16 Jul 2018 12:22:37 +0000 (08:22 -0400)]
make test-ext: a new test target that builds VOM (existing one no longer do)

Change-Id: If590e90b2a1c3b884863ec15a92ea4353ac9eb7c
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoLoopback tx: support multiple tx intfcs per frame 96/13596/2
Dave Barach [Sat, 21 Jul 2018 13:25:00 +0000 (09:25 -0400)]
Loopback tx: support multiple tx intfcs per frame

Can happen if code bypasses the per-interface output node, and
dispatches packets directly to the tx node.

Switch to vlib_get_buffers(...) ... vlib_buffer_enqueue_to_next (...),
quad/single loop coding pattern.

Change-Id: Ic0e5d3b9748230f4e545a54186e6e64e7a782bb1
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agofix IP directed broadcast node declarations 93/13593/2
Matthew Smith [Fri, 20 Jul 2018 16:52:05 +0000 (11:52 -0500)]
fix IP directed broadcast node declarations

The dev build ('make build') was failing because
ip4_rewrite_bcast() and ip6_rewrite_bcast() are declared static
and were not referenced.

The node functions that were set for directed broadcast rewrite:

ip4_rewrite_bcast_node - ip4_rewrite()
ip6_rewrite_bcast_node - ip6_rewrite()

Changed to:

ip4_rewrite_bcast_node - ip4_rewrite_bcast()
ip6_rewrite_bcast_node - ip6_rewrite_bcast()

The release build ('make build-release') succeeds because there is
a VLIB_NODE_FUNCTION_MULTIARCH() call referencing the function. That
macro is empty for dev builds.

Change-Id: I2a05f00ca43d0eae8ff2e3026991e69917003fe1
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agobihash: give hint to CPU that we are spinlocking 94/13594/1
Damjan Marion [Fri, 20 Jul 2018 19:48:59 +0000 (21:48 +0200)]
bihash: give hint to CPU that we are spinlocking

Change-Id: I78c0a6da5d8fc63c1ced43589c42abc15ab12b16
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoAdd congestion drop in interface handoff 92/13592/1
Damjan Marion [Fri, 20 Jul 2018 16:47:05 +0000 (18:47 +0200)]
Add congestion drop in interface handoff

This prevents deadlock in case when worker A sends to B and worker B
sends to A

Change-Id: Id9436960f932c58325fe4f5ef8ec67b50031aeda
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFine-grained add / delete locking 59/13559/7
Dave Barach [Thu, 19 Jul 2018 16:11:16 +0000 (12:11 -0400)]
Fine-grained add / delete locking

Add a bucket-level lock bit. Use a spinlock only when actually
allocating, freeing, or splitting a bucket. Should improve
multi-thread add/del performance.

Change-Id: I3e40e2a8371685457f340d6584dea14e3207f2b0
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agophysmem: fix alloc when dlmaloc is used 88/13588/3
Damjan Marion [Fri, 20 Jul 2018 13:33:17 +0000 (15:33 +0200)]
physmem: fix alloc when dlmaloc is used

Change-Id: I4b6cdf95ac694c8408eb6cf3259b335a8148b5aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agofix issue with missing sample_main in sample plugin 89/13589/2
Damjan Marion [Fri, 20 Jul 2018 14:01:02 +0000 (16:01 +0200)]
fix issue with missing sample_main in sample plugin

Change-Id: Ia17511e3997cdcf1d0991e62e8e2d3fb8812d133
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoQOS: mark/record fix feature ordering c-n-p error 84/13584/2
Neale Ranns [Fri, 20 Jul 2018 11:23:43 +0000 (04:23 -0700)]
QOS: mark/record fix feature ordering c-n-p error

vnet_feature_arc_init:215: feature node 'mpls-qos-mark' not found (after 'vlan-mpls-qos-record', arc 'mpls-input')
vnet_feature_arc_init:215: feature node 'ip6-qos-mark' not found (after 'vlan-ip6-qos-record', arc 'ip6-multicast')
...etc...

Change-Id: I22cb98d57e2480f5978fff315b77b9cbb6a9f9dd
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoIP directed broadcast 61/13561/3
Neale Ranns [Wed, 11 Jul 2018 17:31:26 +0000 (10:31 -0700)]
IP directed broadcast

with ip direct broadcast enable a packet to the interface's
subnet broadcast address with be sent L2 broadcast on the
interface. dissabled, it will be dropped. it is disabled by
default, which preserves current behaviour

Change-Id: If154cb92e64834e97a541b32624354348a0eafb3
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: don't enable interrupts before interface is admin up 82/13582/1
Damjan Marion [Fri, 20 Jul 2018 11:06:08 +0000 (13:06 +0200)]
avf: don't enable interrupts before interface is admin up

Change-Id: I0fc19dd109e569f2c407a85e8fa32758e06676b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoNAT44: in+out interface in STN setup improvement (VPP-1344) 30/13530/2
Matus Fabian [Wed, 18 Jul 2018 07:28:52 +0000 (00:28 -0700)]
NAT44: in+out interface in STN setup improvement (VPP-1344)

Change-Id: Iad7e0337a577ef8a0dfb7bde1968cc115d176043
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoQoS: marking and recording for MPLS and VLAN 79/13479/3
Neale Ranns [Mon, 16 Jul 2018 11:14:21 +0000 (04:14 -0700)]
QoS: marking and recording for MPLS and VLAN

Change-Id: Icec79aa9039d5d7835d311fde0b7c1a0c76c9eb1
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoavf: Support interrupt mode 66/13566/2
Steven [Thu, 19 Jul 2018 23:25:47 +0000 (16:25 -0700)]
avf: Support interrupt mode

DBGvpp# set interface rx-mode AVF0/4/2/0 interrupt
set interface rx-mode AVF0/4/2/0 interrupt
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# sh int addr
sh int addr
AVF0/4/2/0 (up):
  L3 133.1.1.10/24
FortyGigabitEthernet6/0/0 (dn):
VirtualEthernet0/0/0 (up):
  L3 192.168.42.1/24
DBGvpp# clear run
clear run
DBGvpp# clear interfaces
clear interfaces
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (interrupt)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.6237 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp# sh int
sh int
              Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          Count
AVF0/4/2/0                        5      up          9000/0/0/0     rx packets                     1
                                                                    rx bytes                      98
                                                                    tx packets                     1
                                                                    tx bytes                      98
                                                                    drops                          1
                                                                    ip4                            1
FortyGigabitEthernet6/0/0         1     down         9000/0/0/0
VirtualEthernet0/0/0              2      up          9000/0/0/0
local0                            0     down         9000/0/0/0
DBGvpp# sh run
sh run
Time 41.9, average vectors/node 1.00, last 128 main loops 0.00 per node 0.00
  vector rates in 2.3858e-2, out 2.3858e-2, drop 2.3858e-2, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
AVF0/4/2/0-output                active                  1               1               0          1.24e4            1.00
AVF0/4/2/0-tx                    active                  1               1               0          4.28e4            1.00
api-rx-from-ring                any wait                 0               0               2          6.94e4            0.00
avf-input                     interrupt wa               1               1               0          1.09e4            1.00
avf-process                     any wait                 0               0              47          1.01e4            0.00
...
DBGvpp#
DBGvpp# set interface rx-mode AVF0/4/2/0 polling
set interface rx-mode AVF0/4/2/0 polling
DBGvpp# sh int rx
sh int rx
Thread 0 (vpp_main):
  node dpdk-input:
    FortyGigabitEthernet6/0/0 queue 0 (polling)
  node avf-input:
    AVF0/4/2/0 queue 0 (polling)
DBGvpp# ping 133.1.1.3 repeat 1
ping 133.1.1.3 repeat 1
64 bytes from 133.1.1.3: icmp_seq=1 ttl=64 time=.2038 ms

Statistics: 1 sent, 1 received, 0% packet loss
DBGvpp#

Change-Id: Ib7d2b505ae4bb74a052263af766ca37d9df7bfe4
Signed-off-by: Steven <sluong@cisco.com>
5 years agoFix coverity warning / legitimate minor bug 60/13560/2
Dave Barach [Thu, 19 Jul 2018 16:29:45 +0000 (12:29 -0400)]
Fix coverity warning / legitimate minor bug

Of the form "if ((foo & 0x10) == 1)", as opposed to
"if (foo & 0x10)"

Change-Id: I6a6d276aeed4af7c1c6c78546ee68d598d54d7db
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodpdk: eliminate vpp-dpdk-devel RPM conflict 56/13556/2
Matthew Smith [Thu, 19 Jul 2018 13:37:03 +0000 (08:37 -0500)]
dpdk: eliminate vpp-dpdk-devel RPM conflict

Both vpp-devel and vpp-dpdk-devel have /usr/include/dpdk
in their files list. CentOS 7 won't allow them to both be
installed at the same time as a result.

Change vpp-dpdk-devel to /usr/include/dpdk/* so both can
be installed. It is useful to have both installed on a
development system.

Change-Id: I94b6cca299dfbd991638e43c41006db0d8f7ee8b
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agodpdk: fix Mellanox Connect-X3 VF ID 57/13557/2
Matthew Smith [Thu, 19 Jul 2018 14:01:40 +0000 (14:01 +0000)]
dpdk: fix Mellanox Connect-X3 VF ID

Fix a typo from previous patch. Change 0x104 to 0x1004.

Change-Id: I82230a8a0ec01567eb1d4bc12ac02062c2a98347
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agotest_jvpp: improve error message when JVpp JARS are missing 29/13529/6
Marek Gradzki [Wed, 18 Jul 2018 08:32:23 +0000 (10:32 +0200)]
test_jvpp: improve error message when JVpp JARS are missing

The java command fails with missing class error,
when some of the JARs given by -cp are missing,
which may be missleading.

This patch fixes that by adding os.path.isfile check to test_jvpp.py.

Change-Id: I3a0b6ef338c7f70cfd0ba78ee0888efe0b0957b3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
5 years agoRemove unused argument to vlib_feature_next 64/13564/2
Damjan Marion [Thu, 19 Jul 2018 18:42:08 +0000 (20:42 +0200)]
Remove unused argument to vlib_feature_next

Change-Id: Ieb8b53977fc8484c19780941e232ee072b667de3
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agosession: coverity warnings 24/13524/4
Florin Coras [Tue, 17 Jul 2018 12:35:47 +0000 (05:35 -0700)]
session: coverity warnings

Change-Id: I4505954c737e8c6a3d4177c6833f2b12099e6dd4
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAdd a new communication channel between VPP and openssl engine 47/13547/2
Ping Yu [Thu, 19 Jul 2018 14:51:09 +0000 (10:51 -0400)]
Add a new communication channel between VPP and openssl engine
Thus when engine buffer is full during a burst in performance
tesing, this code will help VPP handle retry machansim.

Change-Id: I0f9fc05d3dba8a54d34dca4c6137700d6c80f714
Signed-off-by: Ping Yu <ping.yu@intel.com>
5 years agoCleanup of handoff code 53/13553/4
Damjan Marion [Thu, 19 Jul 2018 15:52:31 +0000 (17:52 +0200)]
Cleanup of handoff code

- removed handoff-dispatch node
- removed some unused buffer metadata fields
- enqueue to thread logic moved to inline function

Change-Id: I7361e1d88f8cce74cd4fcec90d172eade1855cbd
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoqos record:fix disable on interface delete 49/13549/3
Eyal Bari [Thu, 19 Jul 2018 11:12:40 +0000 (14:12 +0300)]
qos record:fix disable on interface delete

handle the case where qos record was enabled more than once

Change-Id: Ic901b2f5b400751e82d57655983d10457ec62243
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoip4-input and ip4-input-no-checksum should be siblings 14/13514/4
Neale Ranns [Tue, 17 Jul 2018 14:15:05 +0000 (07:15 -0700)]
ip4-input and ip4-input-no-checksum should be siblings

each edge/arc from these nodes must be the same.

Change-Id: Id5dace61bca0af71ad1df98583425226e81fd0de
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoSet default STARTUP_DIR to be toplevel dir 52/13552/2
Damjan Marion [Thu, 19 Jul 2018 12:39:40 +0000 (14:39 +0200)]
Set default STARTUP_DIR to be toplevel dir

Change-Id: I5ccc5f1770ab1f8fb9c4824395f4ee6d48346410
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFix IPv6 csum calculation in GTP-U encapsulation 11/13511/4
Andreas Schultz [Tue, 17 Jul 2018 09:43:23 +0000 (11:43 +0200)]
Fix IPv6 csum calculation in GTP-U encapsulation

The length field is included in the checksum. Therefor, we need
to update it before calculating the checksum.

Change-Id: Id23234efb80ea3747a0f8a5c7bf8621748d27635
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
5 years agodpdk: set log write fd to non-blocking 21/13521/4
Matthew Smith [Tue, 17 Jul 2018 16:40:04 +0000 (11:40 -0500)]
dpdk: set log write fd to non-blocking

If a PMD writes too many log messages using rte_vlog(), the
pipe for logging can fill and then rte_vlog() will block
on fflush() while it waits for something to read from the other
side of the pipe. That will never happen since the process node
that would read the other side of the pipe runs in the
same thread.

Set the write fd to non-blocking before the call to
rte_openlog_stream(). If the pipe is full, calls to write() or
fflush() will fail but execution will continue.

Change-Id: I0e5d710629633acda5617ff29897d6582c255d57
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agodpdk: add device IDs for Mellanox ConnectX-3 39/13539/2
Matthew Smith [Wed, 18 Jul 2018 17:44:34 +0000 (12:44 -0500)]
dpdk: add device IDs for Mellanox ConnectX-3

Recognize the PF and VF device IDs for the Mellanox adapter
used on Azure.

Change-Id: Ic7b36b37ac93db2b696354ffe6fa2b6d62ee3801
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoPAPI: Remove logging calls from pack/unpack 38/13538/3
Ole Troan [Wed, 18 Jul 2018 18:31:48 +0000 (20:31 +0200)]
PAPI: Remove logging calls from pack/unpack

This slowed down the decoder. Improved from 16s to 13s for 1000 dump/details
messages.

Change-Id: Iae78136b020cdd9344f3b2170ce426d0f074b6e6
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agogbp: Add support for ACL 28/11628/18
Mohsin Kazmi [Tue, 17 Apr 2018 17:35:42 +0000 (19:35 +0200)]
gbp: Add support for ACL

Change-Id: I7513c41307e62068ab5d9739cac393675c6066f8
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoqos mark/record: fix disable-sw_if_index range check 36/13536/4
Eyal Bari [Wed, 18 Jul 2018 14:15:26 +0000 (17:15 +0300)]
qos mark/record: fix disable-sw_if_index range check

Change-Id: I2abb3ceebae3a32cee9aa2a999bd47c37719d3ac
Signed-off-by: Eyal Bari <ebari@cisco.com>
Signed-off-by: Igor Mikhailov (imichail) <imichail@cisco.com>
5 years agoDPDK: coverity scan warnings 49/13449/2
Marco Varlese [Thu, 12 Jul 2018 12:58:44 +0000 (14:58 +0200)]
DPDK: coverity scan warnings

This patch addresses the coverity scan warnings reported for the DPDK
plugin.

Change-Id: Ie7ac7ffcf4a6c63245eae0f9910a193ab1e318a8
Signed-off-by: Marco Varlese <marco.varlese@suse.de>
5 years agosvm: make message queue more compact 43/13443/4
Florin Coras [Wed, 11 Jul 2018 23:35:38 +0000 (16:35 -0700)]
svm: make message queue more compact

Change-Id: Id45957163c2b95a2300a8ac9104fc92b9cc928ed
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoChange configure.ac to match the release tag on master 35/13535/1
Ed Warnicke [Wed, 18 Jul 2018 12:53:08 +0000 (07:53 -0500)]
Change configure.ac to match the release tag on master

Change-Id: I7e53b563fb801dd8508af47452ad44d4837cb68d
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
5 years agoAdd config option to use dlmalloc instead of mheap 56/13356/20
Dave Barach [Wed, 4 Jul 2018 14:56:23 +0000 (10:56 -0400)]
Add config option to use dlmalloc instead of mheap

Configure w/ --enable-dlmalloc, see .../build-data/platforms/vpp.mk

src/vppinfra/dlmalloc.[ch] are slightly modified versions of the
well-known Doug Lea malloc. Main advantage: dlmalloc mspaces have no
inherent size limit.

Change-Id: I19b3f43f3c65bcfb82c1a265a97922d01912446e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agomake_test: dhcp - add lease time test and wrong XID in OFFER test 83/13283/4
Jan Gelety [Wed, 27 Jun 2018 08:56:17 +0000 (10:56 +0200)]
make_test: dhcp - add lease time test and wrong XID in OFFER test

- negative test with wrong XID in OFFER not implemented as issue
  reported in Jira ticket VPP-99 still not fixed

Jira: CSIT-1147

Change-Id: I4ebc622bd81fed421919bc0397a12e32cb26fa1d
Signed-off-by: Jan Gelety <jgelety@cisco.com>
5 years agovpp-api: improve naming for easier debugging 69/13369/2
Klement Sekera [Fri, 6 Jul 2018 09:07:21 +0000 (11:07 +0200)]
vpp-api: improve naming for easier debugging

Change-Id: I487ccf2adabfbd22dac9f492ecff679d38046724
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agoVPP crash when run "lb set interface nat4 in <intc>" VPP-1343 27/13527/2
Hongjun Ni [Tue, 17 Jul 2018 16:17:44 +0000 (00:17 +0800)]
VPP crash when run "lb set interface nat4 in <intc>" VPP-1343

Change-Id: I23be9c29227e7dd1bb11b5b7fa910bb61c2be6c9
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit b4b2488202ff4282cc4a7bd779cc33934286c5cd)

5 years agoFix GTP-U length header field in encoding 10/13510/3
Andreas Schultz [Tue, 17 Jul 2018 09:34:20 +0000 (11:34 +0200)]
Fix GTP-U length header field in encoding

The length in the GTPU header does not specify the length of the
payload. It does specify the number of bytes following the fixed
part (the first 8 bytes) of the GTPU header (see 3GPP TS 29.060,
Sect. 9.3.1).

Change-Id: I8ce73df015e1cf1f38d306666962c0058756111c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
5 years agoFix GTP-U header in 4x IPv4 vector encapsulation 09/13509/2
Andreas Schultz [Tue, 17 Jul 2018 09:10:16 +0000 (11:10 +0200)]
Fix GTP-U header in 4x IPv4 vector encapsulation

The fourth GTP-U packet had a wrong reference, leading to data
corruption.

Change-Id: Id82f87368183d5e8b7047133c5ea799f2a9cb43c
Signed-off-by: Andreas Schultz <andreas.schultz@travelping.com>
5 years agovppinfra: increase max bihash arena size to 512GB 25/13525/3
Damjan Marion [Tue, 17 Jul 2018 21:01:49 +0000 (23:01 +0200)]
vppinfra: increase max bihash arena size to 512GB

Change-Id: Ic636297df4c03303fdcb176669f0268d80e22123
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agomemif: vectorized buffer enqueue in input node 06/13406/4
Damjan Marion [Tue, 10 Jul 2018 12:15:35 +0000 (14:15 +0200)]
memif: vectorized buffer enqueue in input node

Change-Id: If6970788396c85415634f12304f49eed0d812281
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoBump the VPP version in configure.ac 22/13522/2
Neale Ranns [Tue, 17 Jul 2018 18:17:22 +0000 (11:17 -0700)]
Bump the VPP version in configure.ac

How many engineers does it take to change a lightbulb?

Change-Id: I28a34e0ae49ce4f95b12a342c4664198a20f4574
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoloopback:fix delete to check interface class 94/13494/2
Eyal Bari [Mon, 16 Jul 2018 16:18:56 +0000 (19:18 +0300)]
loopback:fix delete to check interface class

Change-Id: Ia563b279e85b5da93f79db5a2a4d9b8c04f5be99
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agosession: send ctrl msg over mq 58/13458/8
Florin Coras [Thu, 12 Jul 2018 21:48:06 +0000 (14:48 -0700)]
session: send ctrl msg over mq

Change-Id: I242056bc46ddb671064665916b2687860292dcb2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: use msg queue for events 58/13358/24
Florin Coras [Wed, 4 Jul 2018 11:15:05 +0000 (04:15 -0700)]
session: use msg queue for events

Change-Id: I3c58367eec2243fe19b75be78a175c5261863e9e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: make sure segment sizes are page aligned 52/13452/4
Florin Coras [Thu, 12 Jul 2018 08:45:13 +0000 (01:45 -0700)]
session: make sure segment sizes are page aligned

Change-Id: Ibbba75d069ca1bbf9e5a1b8bd2f405d32021c656
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoVOM: support for pipes 83/13483/4
Neale Ranns [Wed, 11 Apr 2018 15:08:30 +0000 (08:08 -0700)]
VOM: support for pipes

Change-Id: I5c381dfe2f926f94a34ee8ed8f1b9ec6038d5fe2
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>