vpp.git
5 years agoUse IP address types on UDP encap API 53/14053/6
Neale Ranns [Wed, 8 Aug 2018 08:06:40 +0000 (01:06 -0700)]
Use IP address types on UDP encap API

Change-Id: I3c714c519b6d0009329b50947ce250c18ee2a85a
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoAdd test of the IP unnumbered dump 86/14086/2
Neale Ranns [Wed, 8 Aug 2018 13:37:33 +0000 (06:37 -0700)]
Add test of the IP unnumbered dump

Change-Id: Ic3e978faf58b43adb8a9fd0dea36eb4513fe0c64
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoUse the bihash walk function 10/14010/3
Neale Ranns [Tue, 7 Aug 2018 09:54:31 +0000 (02:54 -0700)]
Use the bihash walk function

... rather than re-implementing the loop

Change-Id: I20bede8403c804cbec654db9b7020a4d01e5bc18
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoDOCS: General cleanup (did not move any sections) 15/14115/3
andrew [Thu, 9 Aug 2018 17:23:59 +0000 (13:23 -0400)]
DOCS: General cleanup (did not move any sections)

Change-Id: I67cc42769661c10d2793f8c6cdb3b232b803d145
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
5 years agoDOCS: modified writing docs section 14/14114/2
javierfernandezvalles [Thu, 9 Aug 2018 15:54:55 +0000 (08:54 -0700)]
DOCS: modified writing docs section

Change-Id: Ic3ec16dba1a6374785f25f622b2cdc9b6415a13b
Signed-off-by: javierfernandezvalles <JaviervallesF@gmail.com>
5 years agoDOCS: Restructure Events 73/14073/2
John DeNisco [Wed, 8 Aug 2018 11:36:50 +0000 (07:36 -0400)]
DOCS: Restructure Events

Change-Id: I135ced20b58cdb72fbd0784015af037bb6e7ad28
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agoFix L2 flooding to BVI with error return not working 12/14112/2
John Lo [Thu, 9 Aug 2018 15:03:21 +0000 (11:03 -0400)]
Fix L2 flooding to BVI with error return not working

Change-Id: Id0b0e9bf1a7ba02144ec75783378352423f7a4b9
Signed-off-by: John Lo <loj@cisco.com>
5 years agoThread-safe ARP / ND throttling 92/14092/3
Dave Barach [Wed, 8 Aug 2018 21:59:03 +0000 (17:59 -0400)]
Thread-safe ARP / ND throttling

Change-Id: I810d834c407bd404d5f0544cdec0674f0bb92d31
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Dave Barach <dbarach@cisco.com>
5 years agoacl-plugin: fix failures in some of IPv4 test-debug testcases 08/14108/2
Andrew Yourtchenko [Thu, 9 Aug 2018 13:30:57 +0000 (15:30 +0200)]
acl-plugin: fix failures in some of IPv4 test-debug testcases

Commit 1c7bf5d41737984907e8bad1dc832eb6cb1d6288 added the poisoning
of the newly freed memory in debug builds, exposing a logic
error in mask assignment code - it passed a pointer to
within a pool to a function which might potentially expand the pool.

This resulted in a failure of the test in the debug version.

Fix that by making a local copy of the value before passing
a pointer to it.

Change-Id: I73f3670672c3d86778aad0f944d052d0480cc593
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoFix the fifo-size limitation in tcp_echo 93/14093/3
Yalei Wang [Thu, 9 Aug 2018 02:09:38 +0000 (10:09 +0800)]
Fix the fifo-size limitation in tcp_echo

Correct the size verification when send_test_chuck, tcp send process
will not be broken when avalable fifo queue size less then the
min_chuck.

Change-Id: Ide13169283c0311cf2fb18d2606bc869065a2a1b
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
5 years agoPAPI: Python 3.7 uses async keyword. 05/14105/2
Ole Troan [Thu, 9 Aug 2018 10:50:55 +0000 (12:50 +0200)]
PAPI: Python 3.7 uses async keyword.

Change-Id: I01e99c85598a7cb5bc1a506c7fd1fc3f6789d72e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoNAT44: delete user with zero sessions (VPP-1282) 84/14084/2
Matus Fabian [Wed, 8 Aug 2018 12:52:47 +0000 (05:52 -0700)]
NAT44: delete user with zero sessions (VPP-1282)

Change-Id: I756e3ad3de9ffe1494221ef95c1943c8591f8f50
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agobfd:fix NULL session free/put 04/14104/2
Eyal Bari [Thu, 9 Aug 2018 09:50:08 +0000 (12:50 +0300)]
bfd:fix NULL session free/put

Change-Id: If9f1f8c16c098c453bb53591e50a4cbd7cb192e4
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoFix "Old Style VLA" build warnings 07/13007/8
Juraj Sloboda [Tue, 12 Jun 2018 12:20:49 +0000 (14:20 +0200)]
Fix "Old Style VLA" build warnings

Change-Id: I8d42f6ed58ec34298d41edcb3d783e7e9ded3eec
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agofix typo in bitmap.h 61/14061/2
Korian Edeline [Wed, 8 Aug 2018 09:30:30 +0000 (11:30 +0200)]
fix typo in bitmap.h

Change-Id: I11587fc382a529cfd9c0971cc2ad59cd97dd6a13
Signed-off-by: Korian Edeline <korian.edeline@ulg.ac.be>
5 years agoRemove unnecessary routes during vrf-multi-instances tests 74/14074/2
Neale Ranns [Wed, 8 Aug 2018 11:48:10 +0000 (04:48 -0700)]
Remove unnecessary routes during vrf-multi-instances tests

Change-Id: I0a7fd0df90eff522366cb55ad224fe24a3121e56
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoDOC ONLY: Add a new doc for integrating a plugin with VPP 56/13956/5
andrew [Mon, 6 Aug 2018 01:18:45 +0000 (21:18 -0400)]
DOC ONLY: Add a new doc for integrating a plugin with VPP

Convert doxygen docs (vpp api module and binary api support) to .rst

Added a brief explanation of binary api message numbering for plugins

Change-Id: If7d37f29aa65a884b51f3d27957f80d1357ed29b
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodocs: Cleaned up a little removed instructions for mac. 89/13989/5
andrew [Mon, 6 Aug 2018 21:40:31 +0000 (17:40 -0400)]
docs: Cleaned up a little removed instructions for mac.

docs: Updated section on using git-review

Change-Id: I180f67e3478b57b1de03df95fc67a0cfdd44dfb5
Signed-off-by: andrew <andrew.olechtchouk@gmail.com>
5 years agoDOC ONLY: document bihash table walker rules 31/14031/1
Dave Barach [Tue, 7 Aug 2018 19:26:08 +0000 (15:26 -0400)]
DOC ONLY: document bihash table walker rules

Change-Id: I0c48e0f4b87065d8f42009e2cc9709c6b7f5e851
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix dangling reference in l2fib_scan(...) 28/14028/2
Dave Barach [Tue, 7 Aug 2018 16:46:18 +0000 (12:46 -0400)]
Fix dangling reference in l2fib_scan(...)

Deleting a bihash kvp frees the bucket's backing storage when the
bucket reference count reaches zero. l2fib_scan MUST check for that
condition, and stop scanning the bucket if it occurs. One of the L2
FIB extended "make test" vectors caused this issue 100% of the time.

Change-Id: I250bcc4c1518e16042120fbc4032227a759a602e
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoapi: compute msg table for private registrations 93/13993/2
Florin Coras [Mon, 6 Aug 2018 19:19:29 +0000 (12:19 -0700)]
api: compute msg table for private registrations

Change-Id: Ibaa236c09c2eeea72ee8a8cc603d407217b4af23
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoPAPI: Move unit tests to fix packaging issues. 05/14005/2
Ole Troan [Tue, 7 Aug 2018 07:27:26 +0000 (09:27 +0200)]
PAPI: Move unit tests to fix packaging issues.

Change-Id: I67a0f168254367c657eb11d4413f9dc0c5356b3c
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agodlmalloc compiles errors with clang 79/13979/2
Neale Ranns [Mon, 6 Aug 2018 12:16:29 +0000 (08:16 -0400)]
dlmalloc compiles errors with clang

of the form:
/home/nranns/Src/vpp/build-data/../src/vppinfra/dlmalloc.c:4327:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
  if (!(ms)->magic == mparams.magic) {
/home/nranns/Src/vpp/build-data/../src/vppinfra/dlmalloc.c:4696:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
  if (((ms)->magic == mparams.magic)) {

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

$ clang --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Change-Id: If6d70a87420bd54c8e1b8be1d9e9031f6c699c45
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agore-indent UDP encap documentation 80/13980/3
Neale Ranns [Mon, 6 Aug 2018 13:09:24 +0000 (09:09 -0400)]
re-indent UDP encap documentation

Change-Id: Ieb53860769f511205bcd3f1605e76a80e65d4939
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agodpdk-flow:fix raw item init 54/13954/2
Eyal Bari [Sun, 5 Aug 2018 09:58:42 +0000 (12:58 +0300)]
dpdk-flow:fix raw item init

dpdk raw item match string changed from flexible array member to a
pointer member

Change-Id: I930f05112ce04b0cdb3feb985d755e730b102084
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agofix dangling reference in foreach_key_value_pair 78/13978/1
Dave Barach [Mon, 6 Aug 2018 12:43:47 +0000 (08:43 -0400)]
fix dangling reference in foreach_key_value_pair

When the user deletes the last entry in a bihash bucket, the bihash
infra frees the bucket's backing storage. If this happens under
clib_bihash_foreach_key_value_pair - and the freed bucket happens to
be the bucket being traversed - the resulting dangling reference can
easily make the wheels fall off.

Simple fix: if (bucket-is-now-empty) double-break.

Change-Id: Idc44247a82ed5d0ba548507b4a53d4c8503ba8bb
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agosocket api: multiple fds in one msg 50/13950/3
Florin Coras [Fri, 3 Aug 2018 09:50:43 +0000 (02:50 -0700)]
socket api: multiple fds in one msg

Change-Id: I77a6e092a42290eed7201ad4a62e0d00ef997d2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoAPI: Remove legacy vlibsocket code. 12/13912/4
Ole Troan [Thu, 2 Aug 2018 18:37:13 +0000 (20:37 +0200)]
API: Remove legacy vlibsocket code.

The API implementation now supports Unix domain sockets.
The vlibsocket code has not been included in builds for
a long time and is superfluous.

Change-Id: I67a773d0e86e2318eacecf33f82d075553146ee9
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoAdded missing file 49/13949/3
John DeNisco [Fri, 3 Aug 2018 15:02:24 +0000 (11:02 -0400)]
Added missing file

docs: Incorporate Javier's progressive VPP tutorial

Change-Id: Iecee041039c7ed81713bc0530fc536e989c71497
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agoPAPI: Union pad at the end of short fields instead of at head. 11/13911/6
Ole Troan [Thu, 2 Aug 2018 17:19:21 +0000 (19:19 +0200)]
PAPI: Union pad at the end of short fields instead of at head.

Hopefully that's going to be consistent across platforms, compilers and ABI.

Change-Id: I0b82565288d88fd046278d4d8288ec1488273ba5
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFix typo in trace trajectory init 42/13942/2
Dave Barach [Fri, 3 Aug 2018 13:28:47 +0000 (09:28 -0400)]
Fix typo in trace trajectory init

plugin won't compile if VLIB_BUFFER_TRACE_TRAJECTORY is set. The
quad loop was OK, bug in single loop only.

Change-Id: I11262bf6a223680eeac7ed23238ceda425a02c1b
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoavf: add avf_create_reply_handler to avf_test 39/13839/2
Jakub Grajciar [Tue, 31 Jul 2018 08:05:04 +0000 (10:05 +0200)]
avf: add avf_create_reply_handler to avf_test

Change-Id: I2f376a777081da131110227e760ca0069438c918
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoipsec: add udp-encap option to debug cli commands 27/13927/2
Radu Nicolau [Fri, 3 Aug 2018 09:37:24 +0000 (10:37 +0100)]
ipsec: add udp-encap option to debug cli commands

Change-Id: I3195afd952f6783da87224d7ceb9df13ddd39459
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
5 years agoloop counter to prevent infiinte number of look ups per-packet 77/13877/3
Neale Ranns [Wed, 1 Aug 2018 19:53:17 +0000 (12:53 -0700)]
loop counter to prevent infiinte number of look ups per-packet

Change-Id: I59235d11baac18785a4c90cdaf14e8f3ddf06dab
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agovlib: avoid double process dispatch 88/13888/4
Florin Coras [Wed, 1 Aug 2018 23:25:45 +0000 (16:25 -0700)]
vlib: avoid double process dispatch

Change-Id: I46467b1f149be9dfbd00e3ea6d60681d19acf235
Signed-off-by: Florin Coras <fcoras@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agosvm: add support for eventfd signaling to queue 80/13880/8
Florin Coras [Wed, 1 Aug 2018 14:53:18 +0000 (07:53 -0700)]
svm: add support for eventfd signaling to queue

Support the use of eventfds to signal queue updates between consumer
and producer pairs.

Change-Id: Idb6133be2b731fff78ed520daf9d2e0399642aab
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agodocs: Incororate Scott's overall review 13/13913/2
John DeNisco [Thu, 2 Aug 2018 19:03:15 +0000 (15:03 -0400)]
docs: Incororate Scott's overall review

Change-Id: Ic70a62e17891fa9291a5274400ae89f1d6194b6e
Signed-off-by: John DeNisco <jdenisco@cisco.com>
5 years agoDocumentation fix on "set interface ip[6] table" 21/13921/2
Yichen Wang [Fri, 3 Aug 2018 00:12:01 +0000 (17:12 -0700)]
Documentation fix on "set interface ip[6] table"

Change-Id: I8dc6230b65e57ddc07f974bf6726393d8dbfd4a2
Signed-off-by: Yichen Wang <yicwang@cisco.com>
5 years agoacl-plugin: fill in the 5tuple structure all at once, avoid short writes 93/13493/3
Andrew Yourtchenko [Mon, 16 Jul 2018 13:28:47 +0000 (15:28 +0200)]
acl-plugin: fill in the 5tuple structure all at once, avoid short writes

This change avoids the long-read-after-short-write, resulting
in a small performance improvement.

Change-Id: Ic01d1fd19182e96100ccaf441d7ab5e5898b9734
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoTemporrary disable japi packaging for opensuse 17/13917/5
Damjan Marion [Thu, 2 Aug 2018 20:19:21 +0000 (22:19 +0200)]
Temporrary disable japi packaging for opensuse

To unbreak verify job, caused by following message:

19:06:58 RPM build errors:
19:06:58     File not found: /w/workspace/vpp-verify-master-osleap15/build-root/rpmbuild/BUILDROOT/vpp-18.10-rc0~105_g0578e3f9~b1992.x86_64/usr/share/java/*
19:06:58 make[2]: *** [Makefile:50: RPM] Error 1
19:06:58 make[2]: Leaving directory '/w/workspace/vpp-verify-master-osleap15/extras/rpm'
19:06:58 make[1]: *** [Makefile:476: pkg-rpm] Error 2
19:06:58 make[1]: Leaving directory '/w/workspace/vpp-verify-master-osleap15'
19:06:58 make: *** [Makefile:541: verify] Error 2
19:06:58 Build step 'Execute shell' marked build as failure

Change-Id: Ie1300cbf70bedb9dd861a3f31feeddf1eb810eaf
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agovcl: fix debug messages output before heap cfg 91/13891/4
Florin Coras [Thu, 2 Aug 2018 00:24:08 +0000 (17:24 -0700)]
vcl: fix debug messages output before heap cfg

Change-Id: Ifaef7ab2bc2fd4f5b4822d894facbcae01849031
Signed-off-by: Florin Coras <fcoras@cisco.com>
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>