vpp.git
5 years agoip: add container proxy dump API (VPP-1364) 16/15116/5
Matus Fabian [Wed, 3 Oct 2018 06:27:21 +0000 (23:27 -0700)]
ip: add container proxy dump API (VPP-1364)

Change-Id: I3cb89dbfb7174b9913a8c4ad9b3b1dc9f6ed6326
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agodpdk: support passing log-level 54/15254/2
Stephen Hemminger [Thu, 11 Oct 2018 17:01:04 +0000 (10:01 -0700)]
dpdk: support passing log-level

Since DPDK 17.05, DPDK logging supports per subsystem dynamic logging.
Allow passing this as log-level on EAL command line.

dpdk {
log-level pmd.net.virtio.*:debug
...
}

Change-Id: If9576c11aba390a5cd2740fc1c9da5768689bd74
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
5 years agoAdd parallel test run info to test/doc 36/15236/2
juraj.linkes [Thu, 11 Oct 2018 08:06:44 +0000 (10:06 +0200)]
Add parallel test run info to test/doc

An overview of parallel test runs, describing the library used, results
gathering, stdout and stderr handling and how to execute a parallel run.

Change-Id: Ic83cd689751ee46914e3b858b0b24a74b083f99f
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoNAT44: identity NAT fix (VPP-1441) 47/15247/2
Matus Fabian [Thu, 11 Oct 2018 11:28:48 +0000 (04:28 -0700)]
NAT44: identity NAT fix (VPP-1441)

Change-Id: Ic4affc54d15d08b9b730f6ec6146ee053b28b4b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoStats: Include stat_segment.h in packages. 57/15257/2
Ole Troan [Thu, 11 Oct 2018 20:08:50 +0000 (22:08 +0200)]
Stats: Include stat_segment.h in packages.

Change-Id: I976c0aba8397badf64763c4dbddce67009a4fb23
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoFix vpp-ext-deps package version in stable branch 55/15255/2
Damjan Marion [Thu, 11 Oct 2018 16:18:26 +0000 (09:18 -0700)]
Fix vpp-ext-deps package version in stable branch

Change-Id: Ifb33622b50113501f1d23ab94ba9da708678d6be
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 5551e41f78249b72715203ecd93586f48acccbf4)

5 years agobfd:fix handling session creation batch 44/15244/3
Eyal Bari [Thu, 11 Oct 2018 11:09:58 +0000 (14:09 +0300)]
bfd:fix handling session creation batch

when multiple session creating script is ran (via exec) only the first
one actually starts

Change-Id: I0fc36f65795c8921cf180e0b555c446e5a80be45
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agoL2: BM traffic does not use UU-FWD (VPP-1445) 27/15227/2
Neale Ranns [Wed, 10 Oct 2018 15:55:01 +0000 (15:55 +0000)]
L2: BM traffic does not use UU-FWD (VPP-1445)

Change-Id: I5495c37da2fb8ff48c4af14ccba021d64eac52b6
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovppinfra: introduce clib_mem_vm_ext_free() to avoid fd leaks 09/15209/2
Haiyang Tan [Wed, 10 Oct 2018 02:09:45 +0000 (19:09 -0700)]
vppinfra: introduce clib_mem_vm_ext_free() to avoid fd leaks

Change-Id: I8691a10493d159a97574550c111f07722960a7cd
Signed-off-by: Haiyang Tan <haiyangtan@tencent.com>
5 years agoreassembly: get number of workers instead of threads (VPP-1435) 16/15216/2
Juraj Sloboda [Wed, 10 Oct 2018 08:15:54 +0000 (10:15 +0200)]
reassembly: get number of workers instead of threads (VPP-1435)

Change-Id: If3abeab2b304e2df41139707a4c8d045fab6ef99
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agovmxnet3: better error handling 11/15211/2
Steven [Wed, 10 Oct 2018 04:12:25 +0000 (21:12 -0700)]
vmxnet3: better error handling

try harder on output - if there is no descriptor space available, try to free
up some and check again.
make sure we free the buffer if error is encoutered on input.

Change-Id: I41a45213e29de71935afe707889e515037cd081f
Signed-off-by: Steven <sluong@cisco.com>
5 years agoSetup, teardown, DEBUG=core, FAILFAST fixes 30/14930/9
juraj.linkes [Fri, 21 Sep 2018 11:55:16 +0000 (13:55 +0200)]
Setup, teardown, DEBUG=core, FAILFAST fixes

- Fixed a bug when an error occuring in tearDownClass would not result in
test being marked as failed
- Improved test results reporting in cases when an error occurs in setUpClass
and tearDownClass
- Fixed DEBUG=core when the core is produced in setUpClass or
tearDownClass
- Reworked DEBUG=core to always be handled after all tests have been
executed
- Fixed FAILFAST=1 for parallel test runs

Change-Id: I3e9cd3b97ba6fa802fa0aa2dd7678ff82eee09ec
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
5 years agoInteger underflow and out-of-bounds read (VPP-1442) 20/15220/2
Neale Ranns [Wed, 10 Oct 2018 13:27:00 +0000 (13:27 +0000)]
Integer underflow and out-of-bounds read (VPP-1442)

Change-Id: Ife2a83b9d7f733f36e0e786ef79edcd394d7c0f9
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoL2-flood: no clone for 1 replication 00/15100/3
Neale Ranns [Tue, 2 Oct 2018 14:27:02 +0000 (07:27 -0700)]
L2-flood: no clone for 1 replication

Change-Id: If178dd38e7920f35588f5d821ff097168b078026
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoTest FW: Use unittest temp dir as unix runtime dir 90/15190/3
Jakub Grajciar [Tue, 9 Oct 2018 10:28:21 +0000 (12:28 +0200)]
Test FW: Use unittest temp dir as unix runtime dir

Change-Id: I5273d5f3f59cc3c43da0a15bb0c4a4056098adcf
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoacl-plugin: reduce the syslog level for debug messages 14/15214/1
Andrew Yourtchenko [Wed, 10 Oct 2018 08:39:36 +0000 (10:39 +0200)]
acl-plugin: reduce the syslog level for debug messages

Change-Id: Ie8380cb39424548bf64cb19aee59ec20e29d1e39
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agovppinfra: Fix extendto_high aarch64 NEON api. 96/15196/1 v19.01-rc0
Sirshak Das [Tue, 9 Oct 2018 16:28:44 +0000 (11:28 -0500)]
vppinfra: Fix extendto_high aarch64 NEON api.

This fixes the l2BD and ip4 test case failures.
Fixes VPP-1432, VPP-1428, VPP-1430

Change-Id: I48b5c961bab60cc3b39fcd6db47e098c81579480
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
5 years agomemif: coverity fix 86/15186/2
Jakub Grajciar [Tue, 9 Oct 2018 08:02:46 +0000 (10:02 +0200)]
memif: coverity fix

Change-Id: I2b14e2a035a37b04816aac1e610146be58ad1e92
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoAPI: Spurious timeouts from timeout thread. 76/15176/2
Ole Troan [Mon, 8 Oct 2018 09:24:22 +0000 (11:24 +0200)]
API: Spurious timeouts from timeout thread.

Change-Id: I1be1101ba4d82688a32b5ae2c39ca5d92dc244b7
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovnet: ethernet-input incorrectly sets l3_hdr_offset in some cases 61/15161/7
Andrew Yourtchenko [Fri, 5 Oct 2018 18:36:03 +0000 (20:36 +0200)]
vnet: ethernet-input incorrectly sets l3_hdr_offset in some cases

The issue surfaced when developing the tap GSO code, with
an iteration where output path is reliant on
vnet_buffer (b0)->l3_hdr_offset being set correctly in
the input path, during performance testing.

Adding a workaround in the TX path shows that
the issue surfaces only for relatively few packets
during the test (about 100 out of 600000).

Analysis shows the issue arises if the ethernet-input
is handling two untagged packets with different sw_if_index
values - then the accelerated path punts to slow path,
before the setting of the l2.l2_len values is done,
thus resulting in them being 0, and l3_hdr_offset being
the same as l2_hdr_offset, wreaking havoc on TX path.

The solution is to move the l2_hdr_offset calculation
into a place where it is done for all the packets,
and move the l3_hdr_offset calculation into
the determine_next_node() function - as that function is
also the one setting the special-case l2.l2_len value for
tagged packets and moving the current_data for the L2 case.

Change-Id: If728c7715e011930c1887691188c98055bddde67
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agomemif: socket filename add/del bugfix 79/15179/2
Jakub Grajciar [Mon, 8 Oct 2018 11:35:32 +0000 (13:35 +0200)]
memif: socket filename add/del bugfix

Check access rights using effective user/group IDs

Change-Id: I3683258c24bcd7817024bffbd56b54b2f596fdd7
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
5 years agoAdding Multipath support for exclusive DPO based fib path entries via rpath 60/15160/3
Vijayabhaskar Katamreddy [Fri, 5 Oct 2018 18:24:56 +0000 (11:24 -0700)]
Adding Multipath support for exclusive DPO based fib path entries via rpath

Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338
Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
5 years agoFix coverity issue for NSH plugin 70/15170/3
Hongjun Ni [Mon, 8 Oct 2018 10:28:37 +0000 (18:28 +0800)]
Fix coverity issue for NSH plugin

Change-Id: Ie99ff9aebe3c896e3e104a5a7bebd84f7766e713
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
5 years agoStats: prometheus export coverity errors. 74/15174/4
Ole Troan [Mon, 8 Oct 2018 07:16:44 +0000 (09:16 +0200)]
Stats: prometheus export coverity errors.

Change-Id: Ibc0a25dcf7d734215e0cffe789b5726f23e1c3d7
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoNAT44: do not create session record for identity mapping (VPP-1439) 71/15171/2
Matus Fabian [Mon, 8 Oct 2018 04:28:23 +0000 (21:28 -0700)]
NAT44: do not create session record for identity mapping (VPP-1439)

Change-Id: I39a3146a4e4ba8eadf50af7113b9ae6b1c1d688f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoreplicate trace fix 72/15172/2
Neale Ranns [Mon, 8 Oct 2018 06:08:59 +0000 (06:08 +0000)]
replicate trace fix

Change-Id: I785ecadbf30812a500629870aa717e64f4cf0cdd
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agovcl: cleanup and fixes for vcl test code 54/15154/9
Florin Coras [Fri, 5 Oct 2018 07:50:30 +0000 (00:50 -0700)]
vcl: cleanup and fixes for vcl test code

- better approximate time when test finishes
- move common vcl and sock test code to vcl_test.h
- overall refactor of variable names

Change-Id: I8e6b43fc017cd05a0ddaa3891767a44fb300c09e
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovcl: use want_tx_evt for ct sessions 67/15167/3
Florin Coras [Sat, 6 Oct 2018 20:49:16 +0000 (13:49 -0700)]
vcl: use want_tx_evt for ct sessions

Change-Id: Id46c651c41b1c633326081583ee3383e27ef475d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: active-backup mode is using the wrong load balance algo 68/15168/1
Steven [Sun, 7 Oct 2018 05:30:50 +0000 (22:30 -0700)]
bond: active-backup mode is using the wrong load balance algo

active-backup mode is using l2 load balance algo. It should be using
active-backup. Also notice that the output is missing a character.

vpp# create bond mode active-backup
create bond mode active-backup
vpp# sh bond
sh bond
interface name   sw_if_index  mode         load balance  active slaves  slaves
BondEthernet0    6            xor          l34           2              2
BondEthernet1    9            xor          l34           1              1
BondEthernet2    10           active-backu l2            0              0
vpp#

Change-Id: If5ed0cc6c25f6c2ddabec15ff6188b34923d38e3
Signed-off-by: Steven <sluong@cisco.com>
5 years agovfio: don't display error if no pci devices are assigned to container 59/15159/2
Damjan Marion [Fri, 5 Oct 2018 14:46:00 +0000 (16:46 +0200)]
vfio: don't display error if no pci devices are assigned to container

Change-Id: I21429ce084cfd39af6a9997b4c1e459f5a6ef672
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agobond: tx perf improvement, part trois 86/14986/3
Damjan Marion [Wed, 26 Sep 2018 08:15:41 +0000 (10:15 +0200)]
bond: tx perf improvement, part trois

Introduce bond_tx_inline which takes lb as a constant for gcc to do the optimization

The number appears a tad better for 256 bytes frame.

with the patch
--------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4836e6, out 1.6967e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             141054        36109824               0          2.51e1          256.00
BondEthernet0-tx                 active             141054        36109824               0          2.55e1          256.00
TenGigabitEthernet6/0/0-output   active             141054        18055469               0          9.43e0          128.00
TenGigabitEthernet6/0/0-tx       active             141054        18055469               0          6.97e1          128.00
TenGigabitEthernet6/0/1-output   active             141054        18054355               0          9.54e0          127.99
TenGigabitEthernet6/0/1-tx       active             141054        18054355               0          7.05e1          127.99
bond-input                       active             141054        36109824               0          1.76e1          256.00
dpdk-input                       polling             70527        36109824               0          5.03e1          512.00
ethernet-input                   active             141054        36109824               0          6.12e1          256.00
ip4-input                        active             141054        36109824               0          3.26e1          256.00
ip4-lookup                       active             141054        36109824               0          2.94e1          256.00
ip4-rewrite                      active             141054        36109824               0          3.27e1          256.00

without the patch
-----------------
Thread 2 vpp_wk_1 (lcore 3)
Time 4.3, average vectors/node 224.00, last 128 main loops 40.00 per node 222.61
  vector rates in 8.4443e6, out 1.6889e7, drop 0.0000e0, punt 0.0000e0
             Name                 State         Calls          Vectors        Suspends         Clocks       Vectors/Call
BondEthernet0-output             active             142744        36542464               0          2.51e1          256.00
BondEthernet0-tx                 active             142744        36542464               0          2.67e1          256.00
TenGigabitEthernet6/0/0-output   active             142744        18270813               0          9.19e0          127.99
TenGigabitEthernet6/0/0-tx       active             142744        18270813               0          6.98e1          127.99
TenGigabitEthernet6/0/1-output   active             142744        18271651               0          9.43e0          128.00
TenGigabitEthernet6/0/1-tx       active             142744        18271651               0          7.02e1          128.00
bond-input                       active             142744        36542464               0          1.76e1          256.00
dpdk-input                       polling             71372        36542464               0          5.08e1          512.00
ethernet-input                   active             142744        36542464               0          6.15e1          256.00
ip4-input                        active             142744        36542464               0          3.23e1          256.00
ip4-lookup                       active             142744        36542464               0          2.96e1          256.00
ip4-rewrite                      active             142744        36542464               0          3.28e1          256.00

Change-Id: I9fd43eda3c735cbff680ac6d2f01ecdae81f0eda
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoSource VRF Select tests 01/15101/5
Neale Ranns [Tue, 2 Oct 2018 14:28:16 +0000 (07:28 -0700)]
Source VRF Select tests

Change-Id: Id6c16462fccf890eaa0e526ad048e032c9da8800
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoDOC ONLY: clean up plugin documentation 52/15152/2
Dave Barach [Thu, 4 Oct 2018 21:12:26 +0000 (17:12 -0400)]
DOC ONLY: clean up plugin documentation

The old "sample_plugin" page was stuffed with superceded autotools
build information, so it morphed into an "add a new plugin" page based
on the emacs-lisp plugin generator.

Before sending hate mail about emacs, please *look* at the new
document: you'll find running the plugin generator hard to tell from
running a shell script.

Change-Id: I84da45675e838c05faeca05c8f7be45d8c7bff13
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agodocs: add contiv vpp 88/15088/3
Scott Keeler [Mon, 1 Oct 2018 18:50:57 +0000 (14:50 -0400)]
docs: add contiv vpp

Change-Id: I92227fc4968fc6a478beb7f38707b91e9f0635ec
Signed-off-by: Scott Keeler <skeeler@cisco.com>
5 years agoNAT: convert remaining clib_warning to nat_log_* 57/15157/3
Juraj Sloboda [Fri, 5 Oct 2018 11:06:36 +0000 (13:06 +0200)]
NAT: convert remaining clib_warning to nat_log_*

Change-Id: Ie999ab852cc3775ec90820624d97be746d2590a4
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agonode_cli: Give the user a hint as to the problem. 78/14978/4
Paul Vinciguerra [Tue, 25 Sep 2018 17:02:07 +0000 (10:02 -0700)]
node_cli: Give the user a hint as to the problem.

tested with:
DBGvpp# show node foo
show node: unknown node name: 'foo'

DBGvpp# show node error-drop
node error-drop, type internal, state active, index 543
node function variants:
    ...

DBGvpp# show node error-drop bar
show node: unknown input 'bar'

Change-Id: I896cee9e60028a189dce83666fa4d32a14983a7b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agosession: fix local session tagging and cleanup 53/15153/3
Florin Coras [Fri, 5 Oct 2018 02:03:05 +0000 (19:03 -0700)]
session: fix local session tagging and cleanup

Change-Id: I0d42a0c71fea7dd669fb1fe5ded7e6e944245c7d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovhost_user: Add test for interface states and events 41/15141/2
Juraj Sloboda [Thu, 4 Oct 2018 13:15:16 +0000 (15:15 +0200)]
vhost_user: Add test for interface states and events

Change-Id: I2c330945bb0b07f649f574a055bfbea455e5d0b3
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoOn interface deletion - make sure any vlan qinq table is cleared 51/15151/2
John Lo [Thu, 4 Oct 2018 20:22:21 +0000 (16:22 -0400)]
On interface deletion - make sure any vlan qinq table is cleared

Change-Id: Ie9bb1cfce2369b448ca55a21b2f8b8bbbb81c59c
Signed-off-by: John Lo <loj@cisco.com>
5 years agoImprove ip_mroute_add_del documentation 50/15150/2
Ian Wells [Thu, 4 Oct 2018 19:31:11 +0000 (12:31 -0700)]
Improve ip_mroute_add_del documentation

Change-Id: Ieb882cc67c37bf591b6c737234263c7c35416e6d
Signed-Off-By: Ian Wells <iawells@cisco.com>
5 years agovxlan:ip4 decap:remove access to tunnel object 98/15098/5
Eyal Bari [Tue, 2 Oct 2018 09:23:06 +0000 (12:23 +0300)]
vxlan:ip4 decap:remove access to tunnel object

store local/remote addresses + vrf + vni in hash key
store complete decap info in hash value (sw_if_index + next_index +
error)

this removes the need to access the tunnel object when matching both
unicast and mcast.

however for mcast handling it requires 3 hash lookups:
* one failed unicast lookup (by src+dst addrs)
* lookup by mcast(dst) addr .
* unicast lookup (tunnel local ip as dst + pkt's src addr)

where previously it needed 2:
* lookup by src to find unicast tunnel + compare dst to local addr
(failing for mcast)
* lookup by mcast to find the mcast tunnel

Change-Id: I7a3485d130a54194b8f7e2df0431258db36eceeb
Signed-off-by: Eyal Bari <ebari@cisco.com>
5 years agovcl: fix test throughput computation 49/15149/2
Florin Coras [Thu, 4 Oct 2018 17:07:22 +0000 (10:07 -0700)]
vcl: fix test throughput computation

Change-Id: I78260cd1a412e93a5d6686888b6ea17f52245a4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoSupport reassembly for fragments coming to ip4-local node 70/15070/5
Juraj Sloboda [Tue, 2 Oct 2018 09:13:53 +0000 (11:13 +0200)]
Support reassembly for fragments coming to ip4-local node

Change-Id: I3aa4708c1c3cdda344f282d56b617677080eaaa1
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoacl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VPP-1352 42/15142/2
Andrew Yourtchenko [Thu, 4 Oct 2018 13:11:01 +0000 (15:11 +0200)]
acl-plugin: tuplemerge: avoid batch-resize of the applied entries vector - VPP-1352

If the number of rules within a given partition exceeds the limit,
the split_partition() might get called, in which we calculate
the relaxed mask, create a new partition with that mask and
attempt to reallocate some entries from the overcrowded partition.

The non-TM code was pre-expanding the vector with rules by
the number of rules in the new ACL being applied - which
caused the split_partition() to iterate over the rules
filled with zeroes. Most of the time it is benign, but
if a newly created relaxed partition is such that these
entries can be "relocated", then the code attempts to
do so, which does not end well.

Change-Id: I2dbf3ccd29ff97277b21cdb11c4424ff0915c3b7
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoudp_echo: fix cut-through server mode 28/15128/9
Florin Coras [Wed, 3 Oct 2018 21:29:10 +0000 (14:29 -0700)]
udp_echo: fix cut-through server mode

Change-Id: I20dd2071c936eb2c1870d45860553007c8e20587
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoMFIB-API: when programming an (S,G) fix the grp-len 46/15146/2
Neale Ranns [Thu, 4 Oct 2018 15:36:56 +0000 (08:36 -0700)]
MFIB-API: when programming an (S,G) fix the grp-len

Change-Id: I97052d29080501de53fe95499c860faf0765e81d
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agoclib_count_equal_*: don't read of the end of a small array and init data only if... 25/15125/2
Neale Ranns [Wed, 3 Oct 2018 18:13:27 +0000 (14:13 -0400)]
clib_count_equal_*: don't read of the end of a small array and init data only if used (VPP-1429)

Change-Id: I8afa57ecca590698d3430746968aa0a5b0070469
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoVPP-1430: remove unnecessary padding 34/15134/3
Marco Varlese [Thu, 4 Oct 2018 09:52:44 +0000 (11:52 +0200)]
VPP-1430: remove unnecessary padding

A copy/paste mistake caused to add padding to the buffer used to send
data.

Change-Id: I04d8dfec4ae195927be1675c5ce8b30230d5b376
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoFix handling of mpls_tunnel_add_del API 27/15127/2
John Lo [Wed, 3 Oct 2018 20:32:44 +0000 (16:32 -0400)]
Fix handling of mpls_tunnel_add_del API

Handles next_hop_weight, next_hop_preference and next_hop_table_id
properly in vl_api_mpls_tunnel_add_del_t_handler(). Also updated
vpp_api_test and custom_dump handling of related APIs.

Change-Id: I89e211bfa3b9d8ead396b24b3c46b7c7f6511f44
Signed-off-by: John Lo <loj@cisco.com>
5 years agovmxnet3: coverity woe 30/15130/3
Steven [Wed, 3 Oct 2018 22:25:13 +0000 (15:25 -0700)]
vmxnet3: coverity woe

Coverity complains that hb might be null when !prev_b0 is true. It may be right, but not likely.
To make the code more explicit when it parses a complete packet, set got_packet = 1 and test
got_packet instead of prev_b0 which is somewhat obscure.

Use vlib_buffer_free_one rather than vlib_buffer_free_no_next in output.c which takes care of
chain buffers.

Change-Id: I6e0587605fdc622c3f55fedd74c474666631ed91
Signed-off-by: Steven <sluong@cisco.com>
5 years agoLISP ONLY: maintain the make-plugin.sh script 29/15129/1
Dave Barach [Wed, 3 Oct 2018 21:41:29 +0000 (17:41 -0400)]
LISP ONLY: maintain the make-plugin.sh script

Make sure it's invoked in .../src/plugins

Change-Id: I85a05dbd863f3254c017962f635d505482548979
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoLISP ONLY: maintain the emacs lisp plugin generator 26/15126/1
Dave Barach [Wed, 3 Oct 2018 20:10:04 +0000 (16:10 -0400)]
LISP ONLY: maintain the emacs lisp plugin generator

Add a generator for CMakeLists.txt, remove autotools input generator.

Add missing extern declarations for node registrations in <plugin-name>.h.

Remove extern from the <plugin-name>_main_t declaration in
<plugin-name>.c, so it won't come up undefined at runtime.

Reposition forward node declaration relative to CLIB_MARCH_VARIANT
conditional, to avoid multiple definition / "<plugin-name>_node
changed size from X to Y" warnings.

Change-Id: I8cc00bca5c40fa3ea00549411a3a9027f97a4826
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agotest framework: add shell-style wildcard matching to filenames 19/15119/4
Andrew Yourtchenko [Wed, 3 Oct 2018 09:38:31 +0000 (11:38 +0200)]
test framework: add shell-style wildcard matching to filenames

Currently, one can either use "*" to denote all filenames,
or to give the specific file name to run the tests in.
This commit adds the possibility to run all tests
matching the shell wildcard, e.g. TEST="test_acl_plugin*"
will execute all ACL plugin testcases.

Change-Id: I9048a601958947c7b757c3dfd57b19cdd8a1e3c0
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
5 years agoipsec: add missing ipv6 ah code & ipv6 tests 69/15069/6
Klement Sekera [Wed, 26 Sep 2018 09:19:00 +0000 (11:19 +0200)]
ipsec: add missing ipv6 ah code & ipv6 tests

Change-Id: I89e90193ded1beb6cb0950c15737f9467efac1c3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
5 years agosession: fix first segment manager cleanup 17/15117/2
Florin Coras [Wed, 3 Oct 2018 08:00:57 +0000 (01:00 -0700)]
session: fix first segment manager cleanup

Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agomemif: include interface name in logs 22/15122/2
Juraj Sloboda [Wed, 3 Oct 2018 14:00:21 +0000 (16:00 +0200)]
memif: include interface name in logs

Change-Id: I67f58aa93c721dbd518cc2ddcea330006693662f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoVPP-1440: clean up coverity warnings 24/15124/3
Dave Barach [Wed, 3 Oct 2018 15:45:06 +0000 (11:45 -0400)]
VPP-1440: clean up coverity warnings

Change-Id: Ie315d4e83c0575d82aee0369ef50e8dd2dad6a2a
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoVPP-1426: CLI crash on 'set int feature' 15/15115/5
Paul Vinciguerra [Wed, 3 Oct 2018 02:02:16 +0000 (19:02 -0700)]
VPP-1426: CLI crash on 'set int feature'

Change-Id: Ib2221a43347c66940b6b5f71914a451ca4627d2f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agosock api: fix registrations and client reads 14/15114/5
Florin Coras [Wed, 3 Oct 2018 01:29:25 +0000 (18:29 -0700)]
sock api: fix registrations and client reads

- When clients connect, instead of returing registration indicies return
handles. By convention socket registrations will have the MSB set to 1.
This makes it easy to distinguish them from shm registrations.
- Fix client reads to allow for messages larger than 4kB (needed for the
creat reply wherein the message table is provided).

Change-Id: I7bc0a072d066dffbf2e3ad9ba3ed50291231af9d
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agostat_client.c coverity error. 20/15120/2
Ole Troan [Wed, 3 Oct 2018 10:46:54 +0000 (12:46 +0200)]
stat_client.c coverity error.

Change-Id: Ic072beb8882981425f436936f239e8c8bf229a99
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovmxnet3: error handling 11/15111/3
Steven [Tue, 2 Oct 2018 21:36:13 +0000 (14:36 -0700)]
vmxnet3: error handling

outbound -- if we have to drop the packet due to no descriptor space is available, drop the
whole packet, not fragments.
inbound -- check and drop error packets

Change-Id: Ida1d32e61521bafd67f714d729ad53cd7c487dc6
Signed-off-by: Steven <sluong@cisco.com>
5 years agofix format error in show logging config output 10/15110/3
Jerome Tollet [Tue, 2 Oct 2018 20:54:30 +0000 (22:54 +0200)]
fix format error in show logging config output

Change-Id: Idc41a219db185b524f497b096eb71892b5f9ebf8
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
5 years agojvppgen: update headers 12/15112/1
Bernhard M. Wiedemann [Tue, 2 Oct 2018 23:16:19 +0000 (01:16 +0200)]
jvppgen: update headers

headers of generated files should correctly tell
about where it cames from to not confuse readers.

Change-Id: If667fa4aab188978156982adf3fa13474bd93e9e
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
5 years agoEnabled untagged vs default functionality 86/15086/3
Mike Bly [Mon, 24 Sep 2018 17:13:06 +0000 (10:13 -0700)]
Enabled untagged vs default functionality
Removed 0-tags attribute for default-sub-if config
Moved default-sub-if check before untagged

Change-Id: I68043445aa2f79846e0743567b9015257fd87f8d
Signed-off-by: Mike Bly <mbly@ciena.com>
5 years agoVPP-1440: clean up coverity warnings 09/15109/2
Dave Barach [Tue, 2 Oct 2018 20:33:56 +0000 (16:33 -0400)]
VPP-1440: clean up coverity warnings

Change-Id: Ic6823fb617ecae547a5f0e28b1e037848e40f682
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoStats: vpp_prometheus_export fixes. 08/15108/3
Ole Troan [Tue, 2 Oct 2018 20:00:29 +0000 (22:00 +0200)]
Stats: vpp_prometheus_export fixes.

- Crash on /sys/nodes if per-node-counters off
- Require patterns parameters.

Change-Id: If4fddefb17504a92ba462c7af91e373601b66a5c
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoPAPI: Use UNIX domain sockets instead of shared memory 10/13910/9
Ole Troan [Thu, 2 Aug 2018 09:58:12 +0000 (11:58 +0200)]
PAPI: Use UNIX domain sockets instead of shared memory

Adds support for running the API purely across Unix domain sockets.
Usage: vpp = VPP(use_socket=True)

Change-Id: Iafc1301e03dd3edc3f4d702dd6c0b98d3b50b69e
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agovcl: fix coverity warning 03/15103/2
Florin Coras [Tue, 2 Oct 2018 15:42:06 +0000 (08:42 -0700)]
vcl: fix coverity warning

Change-Id: I08b0244ba8b0e8a463224b39e1f7b878ba8e4e6f
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoip4-local: classify protos that skip csum and src check 90/15090/3
Florin Coras [Tue, 2 Oct 2018 04:59:18 +0000 (21:59 -0700)]
ip4-local: classify protos that skip csum and src check

Makes it easy to add protocols that skip L4 checks.

Change-Id: I80ff95685bfa17e29c5800d9c96153cdc7739be2
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agovhost-user: add support for vlib_log API 95/15095/2
Jerome Tollet [Tue, 2 Oct 2018 09:41:11 +0000 (11:41 +0200)]
vhost-user: add support for vlib_log API

Change-Id: I0af68f6b41d0024aa64b93a8b18e2d179bf939b0
Signed-off-by: Jerome Tollet <jtollet@cisco.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
5 years agoFix JVPP enum _host_to_net_ translation (VPP-1438) 76/15076/3
Michal Cmarada [Mon, 1 Oct 2018 14:26:31 +0000 (16:26 +0200)]
Fix JVPP enum _host_to_net_ translation (VPP-1438)

- use ordinal value of enumeration instead of accessing
  its value directly.

Change-Id: I6327a8f7668852846907a92c2713de9ff90c1c75
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
5 years agoBFD: add get echo source API (VPP-1367) 96/15096/2
Matus Fabian [Tue, 2 Oct 2018 10:22:18 +0000 (03:22 -0700)]
BFD: add get echo source API (VPP-1367)

Change-Id: I45f540128e038ddb17ba96ce30965e8f7c732067
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agoIPsec: add API for SPDs dump (VPP-1363) 92/15092/2
Matus Fabian [Tue, 2 Oct 2018 08:13:25 +0000 (01:13 -0700)]
IPsec: add API for SPDs dump (VPP-1363)

Change-Id: I36e6878712c394de629a9182d2af24c53a8f811d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 years agovhost-user: Interface state updates 72/15072/2
Juraj Sloboda [Mon, 1 Oct 2018 10:42:07 +0000 (12:42 +0200)]
vhost-user: Interface state updates

Fix inconsistencies between admin and link interface states
Admin down should imply link down:
  link_up = admin_up && link_ready

Change-Id: I4d668d82d035b5d2ae508727f34f1722a0c3e677
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agovhost_user: Fix setting MTU using uninitialized variable 71/15071/2
Juraj Sloboda [Fri, 28 Sep 2018 10:04:26 +0000 (12:04 +0200)]
vhost_user: Fix setting MTU using uninitialized variable

Change-Id: I0caa5fd584e3785f237d08f3d3be23e9bfee7605
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agoUpdate code to compute checksum for buffer chains 15/15015/2
Juraj Sloboda [Wed, 26 Sep 2018 12:25:32 +0000 (14:25 +0200)]
Update code to compute checksum for buffer chains

Compute ICMP checksum for buffer chains
Fix checksum function for buffer chains

Change-Id: I39b845b94a63c3ab5fc9f6f9ab36cadbc67c104f
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
5 years agotls: fix disconnects for sessions with pending data 64/15064/5
Florin Coras [Sat, 29 Sep 2018 17:23:06 +0000 (10:23 -0700)]
tls: fix disconnects for sessions with pending data

TLS can enqueue events to itself when app session queue cannot be
entirely drained. If a pending disconnect is handled before any such
event, session layer may try to dequeue data on deallocated sessions.

Change-Id: I5bfc4d53ce95bc16b6a01e1b0e644aafa1ca311b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: fix close wait timeout with no fin 79/15079/3
Florin Coras [Mon, 1 Oct 2018 15:32:04 +0000 (08:32 -0700)]
tcp: fix close wait timeout with no fin

Change-Id: Icba9b0dc6dcb4b72288f966728201812d8d12144
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agotcp: accept fins if in recovery 89/15089/2
Florin Coras [Tue, 2 Oct 2018 01:31:02 +0000 (18:31 -0700)]
tcp: accept fins if in recovery

Change-Id: I0c9c055fcc3d681c4032228a90cc81f484e200f0
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agoFix documentation about sw_interface_set_l2_bridge 87/15087/1
Yichen Wang [Mon, 1 Oct 2018 18:15:25 +0000 (11:15 -0700)]
Fix documentation about sw_interface_set_l2_bridge

Change-Id: I53e0e7d2cf1e3c52794830b33fa93d1582b74769
Signed-off-by: Yichen Wang <yicwang@cisco.com>
5 years agoSource VRF Select 77/15077/2
Neale Ranns [Mon, 1 Oct 2018 08:42:13 +0000 (01:42 -0700)]
Source VRF Select

match against a packet's source address to determine
the VRF for the subsequent destination address lookup.

Change-Id: I48ee0ef54dcb891f0ec7f879e4d3b925a0ed0081
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoRename device class from PPPPOE to PPPoE 81/15081/2
Paul Vinciguerra [Mon, 1 Oct 2018 15:36:26 +0000 (08:36 -0700)]
Rename device class from PPPPOE to PPPoE

Change-Id: Ia20eee6cef360b1acd768101df0713f0005a7d14
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
5 years agodpdk: updated makefile to enable QAT cryptodev 78/15078/2
Radu Nicolau [Mon, 1 Oct 2018 14:57:31 +0000 (15:57 +0100)]
dpdk: updated makefile to enable QAT cryptodev

Change-Id: I2d70f2f29f3af10b6e43dde235fdf90a4596eb35
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
5 years agoAdd adjacency counters to the stats segment 35/15035/4
Neale Ranns [Fri, 28 Sep 2018 12:00:57 +0000 (05:00 -0700)]
Add adjacency counters to the stats segment

Change-Id: I6b59df939c9daf40e261d73d19f500bd90abe6ff
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
5 years agovat: fix coverity warning for show_threads 82/15082/2
Mohsin Kazmi [Mon, 1 Oct 2018 15:41:08 +0000 (17:41 +0200)]
vat: fix coverity warning for show_threads

Change-Id: I8c226b91cc45f6f345444afd8d168e1292371582
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agoAPI / CLI event-log tracing 73/15073/2
Dave Barach [Mon, 1 Oct 2018 13:25:32 +0000 (09:25 -0400)]
API / CLI event-log tracing

Add an "elog trace [api][cli][barrier]" debug CLI command. Removed the
barrier elog test command. Remove unused reliable multicast code.

Change-Id: Ib3ecde901b7c49fe92b313d0087cd7e776adcdce
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agoFix the path error inside vcl socket_test.sh 12/14912/4
Yalei Wang [Thu, 20 Sep 2018 08:46:29 +0000 (16:46 +0800)]
Fix the path error inside vcl socket_test.sh

Change-Id: I5bcfbd436839e7a6dd82dc57cdb3b7fb6200a69c
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 years agothread: Add show threads api 65/14765/10
Mohsin Kazmi [Tue, 11 Sep 2018 18:27:09 +0000 (20:27 +0200)]
thread: Add show threads api

Change-Id: I3124238ab4d43bcef5590bad33a4ff0b5d8b7d15
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agomroute routers in the stats segment 46/15046/3
Neale Ranns [Fri, 7 Sep 2018 16:37:07 +0000 (09:37 -0700)]
mroute routers in the stats segment

Change-Id: I798e4fb6470ae9e763f8de1c290ff0fc3c0b7f9e
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoIGMP: handle (*,G) report with no source addresses 66/15066/2
Neale Ranns [Wed, 26 Sep 2018 13:51:39 +0000 (06:51 -0700)]
IGMP: handle (*,G) report with no source addresses

Change-Id: I363370b9d4a27b992bad55c48fc930a2fbea2165
Signed-off-by: Neale Ranns <nranns@cisco.com>
5 years agoSCTP: fix overflow issue with timestamp 20/15020/9
Marco Varlese [Thu, 27 Sep 2018 14:43:57 +0000 (16:43 +0200)]
SCTP: fix overflow issue with timestamp

Change-Id: I03bb47a2baa4375b7bf9347d95c4cc8de37fe510
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
5 years agoSupport dynamic dual/quad loop selection on aarch64 05/14905/11
Lijian Zhang [Mon, 10 Sep 2018 09:13:56 +0000 (17:13 +0800)]
Support dynamic dual/quad loop selection on aarch64

Currently, there are three variants available on aarch64, qdf24xx, thunderx2t99, and cortex-a72.
-DCLIB_N_PREFETCHES is passed to source code to select dual/quad implementation.
Besides, different compiler options are applied on these critical functions.

gcc-7.3.0 reports ICE(internal compiler error) with -mtune=thunderx2t99,
so -mtune=thunderx2t99 is enabled only when gcc version is greater than 7.3.0

Cavium ThunderX2, Impermenter 0x43, Part 0x0af
    -march=armv8-a+crc+crypto -mtune=thunderx2t99
Qualcomm Centriq 2400, Impermenter 0x51, Part 0xc00
    -march=armv8.1-a+crc+crypto -mtune=qdf24xx
Cortex-A72, Impermenter 0x41, Part 0xd08
    -march=armv8-a+crc+crypto -mtune=cortex-a72

Change-Id: Id5649c6325c1e642d0fd42535e3908793b13e02a
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
5 years agovlib: barrier sync elog tracing improvements 36/15036/4
Dave Barach [Sun, 30 Sep 2018 19:54:06 +0000 (15:54 -0400)]
vlib: barrier sync elog tracing improvements

Change-Id: I2d3b8d5a7192ff68bee443a99346ecb807b2d833
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Dave Barach <dave@barachs.net>
5 years agovom: Fix the l2 port type in bridge domain 19/15019/2
Mohsin Kazmi [Thu, 27 Sep 2018 13:00:32 +0000 (15:00 +0200)]
vom: Fix the l2 port type in bridge domain

Change-Id: I8aba11142daeacce892ec529c2229ec54ee427e2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
5 years agovcl: handle old events before blocking in epoll 54/15054/2
Florin Coras [Fri, 28 Sep 2018 21:59:37 +0000 (14:59 -0700)]
vcl: handle old events before blocking in epoll

Change-Id: I3e62c787882d93c3bfb398ed0d04ef56b3a60b2b
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agosession: lock msg queues while generating control events 48/15048/4
Florin Coras [Fri, 28 Sep 2018 17:35:45 +0000 (10:35 -0700)]
session: lock msg queues while generating control events

Change-Id: I229ce9c306a97956c87ccb8f7a1c5c9dac94ab31
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agogitignore: build/external/downloads 55/15055/1
Florin Coras [Fri, 28 Sep 2018 22:03:16 +0000 (15:03 -0700)]
gitignore: build/external/downloads

Change-Id: I041764a5546352086aa9803e4bbeb9dff5f8d69a
Signed-off-by: Florin Coras <fcoras@cisco.com>
5 years agobond: tx performance enhancement part deux 29/15029/4
Steven [Fri, 28 Sep 2018 03:06:26 +0000 (20:06 -0700)]
bond: tx performance enhancement part deux

- Reduce per packet cost by buffering the output packet buffer indexes in the queue and
process the queue outside the packet processing loop.
- Move unnecessary variable initialization outside of the while loop.
- There is no need to save the old interface if tracing is not enabled.

Test result for 256 bytes packet comparison. Other packet size shows similar improvement.

With the patch
--------------
BondEthernet0-output             active              52836        13526016               0          1.71e1          256.00
BondEthernet0-tx                 active              52836        13526016               0          2.68e1          256.00
TenGigabitEthernet6/0/0-output   active              52836         6762896               0          9.17e0          127.99
TenGigabitEthernet6/0/0-tx       active              52836         6762896               0          6.97e1          127.99
TenGigabitEthernet6/0/1-output   active              52836         6763120               0          9.40e0          128.00
TenGigabitEthernet6/0/1-tx       active              52836         6763120               0          7.00e1          128.00
bond-input                       active              52836        13526016               0          1.76e1          256.00

Without the patch
-----------------
BondEthernet0-output             active              60858        15579648               0          1.73e1          256.00
BondEthernet0-tx                 active              60858        15579648               0          2.94e1          256.00
TenGigabitEthernet6/0/0-output   active              60858         7789626               0          9.29e0          127.99
TenGigabitEthernet6/0/0-tx       active              60858         7789626               0          7.01e1          127.99
TenGigabitEthernet6/0/1-output   active              60858         7790022               0          9.31e0          128.00
TenGigabitEthernet6/0/1-tx       active              60858         7790022               0          7.10e1          128.00
bond-input                       active              60858        15579648               0          1.77e1          256.00

Change-Id: Ib6d73a63ceeaa2f1397ceaf4c5391c57fd865b04
Signed-off-by: Steven <sluong@cisco.com>
5 years agoMAP: Add check for well known ports. 40/15040/3
Ole Troan [Fri, 28 Sep 2018 12:28:00 +0000 (14:28 +0200)]
MAP: Add check for well known ports.

And more unit-tests.

Change-Id: I4667d82d928b7ba8d96b5a5648d464115b3ed216
Signed-off-by: Ole Troan <ot@cisco.com>
5 years agoIP ttl check in ip4-input missing for single packet path. 39/15039/1
Ole Troan [Fri, 28 Sep 2018 12:27:24 +0000 (14:27 +0200)]
IP ttl check in ip4-input missing for single packet path.

Change-Id: Idc17b2f8794d37cd3242a97395ab56bd633ca575
Signed-off-by: Ole Troan <ot@cisco.com>