vpp.git
4 years agoip: trivial typos in docs 25/22825/2
Paul Vinciguerra [Fri, 18 Oct 2019 01:08:17 +0000 (21:08 -0400)]
ip: trivial typos in docs

Type: style

Change-Id: I620f15b96ee5401e0145a139f06d343d7c4fadb4
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
4 years agoipsec: make tests support python3 20/22820/2
Ole Troan [Thu, 17 Oct 2019 19:40:36 +0000 (21:40 +0200)]
ipsec: make tests support python3

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

4 years agotests: python3 changes for span and aclplugin test 97/22797/3
snaramre [Wed, 16 Oct 2019 22:15:43 +0000 (22:15 +0000)]
tests: python3 changes for span and aclplugin test

Type: fix
Change-Id: Ia9f74f951f831cc5c9b5af863db1bb3f7a1a81ff
Signed-off-by: snaramre <snaramre@cisco.com>
4 years agosession: unify buffer tx dispatching 04/22804/4
Florin Coras [Thu, 17 Oct 2019 05:35:18 +0000 (22:35 -0700)]
session: unify buffer tx dispatching

Type: refactor

Use pending tx buffer vector to postpone dispatching of all buffers,
i.e., either generated as a result of tx events or custom tx event.

Change-Id: Ic5894c4653c338cfb04555d20857f954b245ee83
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agohttp_static: pass http request type to builtin handlers 21/22821/2
Dave Barach [Thu, 17 Oct 2019 19:53:08 +0000 (15:53 -0400)]
http_static: pass http request type to builtin handlers

Makes it easy to tell GETs from POSTs, etc., in case one wants to
register the same handler for multiple request types.

Return interface stats as a json array, makes .js code a lot simpler.

Type: refactor

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

4 years agoclassify: make tests support python3 16/22816/2
Ole Troan [Thu, 17 Oct 2019 18:44:25 +0000 (20:44 +0200)]
classify: make tests support python3

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

4 years agosession tcp: infra for transports to send buffers 03/22803/6
Florin Coras [Thu, 17 Oct 2019 05:06:08 +0000 (22:06 -0700)]
session tcp: infra for transports to send buffers

Type: feature

Add infra that allows transpors to enqueue pending buffers without the
need to build and manage their own pending frames. An important benefit
is the fact that buffer wire/tx ordering is ensured by session layer.

Change-Id: I764fd1693d610b321a1d0c84b648a314f14583db
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotests: python3 fixes for reassembly tests 13/22813/3
snaramre [Thu, 17 Oct 2019 16:39:03 +0000 (16:39 +0000)]
tests: python3 fixes for reassembly tests

Type: fix
Change-Id: I0d9b823bd558c48b18af9b0d1e80c30729e64dac
Signed-off-by: snaramre <snaramre@cisco.com>
4 years agotcp: avoid sending acks when data available 02/22802/5
Florin Coras [Thu, 17 Oct 2019 02:28:17 +0000 (19:28 -0700)]
tcp: avoid sending acks when data available

Type: fix

Change-Id: I02e2cb2d349f9ddb2bfed040a08ca448f379d565
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotests: python3 changes for load balancer test 98/22798/3
snaramre [Wed, 16 Oct 2019 22:36:47 +0000 (22:36 +0000)]
tests: python3 changes for load balancer test

Type: fix
Change-Id: Id9a328158e7c4106a95928bf8ddceb7b9e73aa25
Signed-off-by: snaramre <snaramre@cisco.com>
4 years agonat: tests support python3 00/22800/2
Ole Troan [Wed, 16 Oct 2019 23:31:12 +0000 (01:31 +0200)]
nat: tests support python3

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

4 years agovppinfra: test support python3 01/22801/2
Ole Troan [Wed, 16 Oct 2019 23:53:47 +0000 (01:53 +0200)]
vppinfra: test support python3

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

4 years agotcp: Init cwnd from ssthresh. 07/22807/4
Sergey Ivanushkin [Thu, 17 Oct 2019 09:16:27 +0000 (10:16 +0100)]
tcp: Init cwnd from ssthresh.

Set high ssthresh out of the box and make configurable

Type: fix

Signed-off-by: Sergey Ivanushkin <sergey.ivanushkin@enea.com>
Change-Id: Iba1549b4ee55e51468ad0b28ef3d26a85fa9cae0

4 years agohttp_static: add "http static cache clear" CLI 55/22755/2
Dave Barach [Tue, 15 Oct 2019 18:52:53 +0000 (14:52 -0400)]
http_static: add "http static cache clear" CLI

Useful to force content reloads

Type: feature

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

4 years agoip: punt API cleanup 25/22625/3
Jakub Grajciar [Wed, 9 Oct 2019 12:15:56 +0000 (14:15 +0200)]
ip: punt API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I7048f8ec598a8b06d75bdfb5d2fab9f6337c9474
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
4 years agoip: rd_cp API cleanup 45/22645/2
Jakub Grajciar [Thu, 10 Oct 2019 11:33:43 +0000 (13:33 +0200)]
ip: rd_cp API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1cc42b57fbf72e2ced8b5d1283c34de2f7ff948a

4 years agomisc: Update gitignore for /test/ext/.d 74/22774/2
Neale Ranns [Wed, 16 Oct 2019 15:15:23 +0000 (08:15 -0700)]
misc: Update gitignore for /test/ext/.d

.. otherwise i'm going to commit it accidentally

Type: feature

Change-Id: I0378b9a29a28ea7317bc7d234f8cbacdafd6b762
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agobonding: fix interface deletion 70/22770/2
Benoît Ganne [Wed, 16 Oct 2019 13:03:06 +0000 (15:03 +0200)]
bonding: fix interface deletion

Copy sw_if_index value instead of using pointers to original
bif->slaves content which could be overriden by eg. vec_del1().

Type: feature

Change-Id: I37e458effd6b2367479574f7bd3facd4e93bada4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotcp: fix mss flag in option parsing 89/22789/2
Florin Coras [Wed, 16 Oct 2019 19:26:51 +0000 (12:26 -0700)]
tcp: fix mss flag in option parsing

Type: fix

Change-Id: Ib03151a097caf15e4e8285afea83d1b930a874b0
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agosession: increase max ctrl msg size 87/22787/3
Florin Coras [Wed, 16 Oct 2019 18:21:41 +0000 (11:21 -0700)]
session: increase max ctrl msg size

Type: fix

Connect ctrl message recently outgrew the maximum ctrl msg size, so
increase the limit. Also add static asserts for messages that could
potentially exceed the limit.

Change-Id: I0d3e32e0d4d67d7e222cff14ddba59a0c3fb8b00
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotcp: avoid head retransmit if scoreboard has no holes 84/22784/2
Florin Coras [Wed, 16 Oct 2019 17:07:39 +0000 (10:07 -0700)]
tcp: avoid head retransmit if scoreboard has no holes

Type: fix

Change-Id: I6164ad0d97cd91b60c85302eff691836d12a0a70
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agobonding: graph node running after bond-input in feature arc may crash 58/22658/3
Steven Luong [Thu, 10 Oct 2019 18:36:41 +0000 (11:36 -0700)]
bonding: graph node running after bond-input in feature arc may crash

In bond RX quad loop, when all packets within the frame have the same incoming
interface, we cannot skip calling bond_update_next because that function calls
vnet_feature_next() to update the b->current_config_index. The next node needs
the correct b->current_config_index to work with.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I3d8b3d4e0f95490f406fae7638f0c43c301ce664

4 years agocdp: fix non-null terminated vector use 68/22768/2
Benoît Ganne [Wed, 16 Oct 2019 12:54:24 +0000 (14:54 +0200)]
cdp: fix non-null terminated vector use

Type: fix

Change-Id: I31e5d9d9e93339eb789aed20996f326b085c22a9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agodpdk: add function to add/del extra MAC addrs 63/21463/5
Matthew Smith [Fri, 12 Jul 2019 16:55:26 +0000 (11:55 -0500)]
dpdk: add function to add/del extra MAC addrs

Type: feature

Add a callback to install or remove an additional MAC address on
a DPDK-managed device. Note that some PMDs don't have support for
this so YMMV.

Change-Id: I7b0cb3fb0af0d66fbdb7b894a712897f889520a5
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agordma: add rdma API 37/22737/2
Benoît Ganne [Tue, 15 Oct 2019 08:51:11 +0000 (10:51 +0200)]
rdma: add rdma API

Type: feature

Change-Id: I590612989cb3c114f8d99227ad36c3434e998597
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoflow: Add 'drop' and 'redirect-to-queue' actions support 27/22727/3
Chenmin Sun [Tue, 15 Oct 2019 12:36:16 +0000 (20:36 +0800)]
flow: Add 'drop' and 'redirect-to-queue' actions support

Type: feature

Add 'drop' and 'redirect-to-queue' support in
'test-flow' command and DPDK plugin

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I567bb77cb401c9bd1309ecabe802fe9de88c746b

4 years agotests: python3 changes for ip6 fib tests 86/22686/6
snaramre [Fri, 11 Oct 2019 21:28:56 +0000 (21:28 +0000)]
tests: python3 changes for ip6 fib tests

Type: fix
Change-Id: Ie7764fec13cbb83b6899c7c33b7b2f8cc5d40c8a
Signed-off-by: snaramre <snaramre@cisco.com>
4 years agosvm: immediate fifo growth even when wrapped 61/22761/6
Ryujiro Shibuya [Wed, 16 Oct 2019 05:30:02 +0000 (06:30 +0100)]
svm: immediate fifo growth even when wrapped

Type: fix

- when the fifo is wrapped, and if applicable, insert a new chunk after
  the tail-chunk and rebuild the rb_tree.
- make sure that this new algorithm can be applied only when the fifo is
  used by a single thread (master-thread of the fifo).

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Change-Id: I3fc187bc496ea537ca24381e4abc08d2906c9e03

4 years agosvm: reset vector data instead of length 69/22769/2
Benoît Ganne [Wed, 16 Oct 2019 12:58:51 +0000 (14:58 +0200)]
svm: reset vector data instead of length

Reseting vector length confuses ASAN and does not reset data either.
Only reset data instead.

Type: fix

Change-Id: Id60b8333df28a5b636a9d302b987bbad95c85c38
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agofib: fix use-after-free for interface adj removal 71/22771/2
Benoît Ganne [Wed, 16 Oct 2019 13:08:37 +0000 (15:08 +0200)]
fib: fix use-after-free for interface adj removal

Type: fix

Change-Id: I82308e368d14d84f5970dad229bdcf2de7d1839d
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: fix use-after-free 72/22772/2
Benoît Ganne [Wed, 16 Oct 2019 13:11:22 +0000 (15:11 +0200)]
session: fix use-after-free

Type: fix

Change-Id: Ie63b80db56febc8a16bafcdd5399b2f92b6aa437
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotests: cli wrapper should return string 53/22753/3
Ole Troan [Tue, 15 Oct 2019 17:31:55 +0000 (19:31 +0200)]
tests: cli wrapper should return string

Python3 fixes.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I648b2142d45dfab9146a02eeb1b12de11103ff9f
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agotests: python3 version check for enum module 09/21609/4
snaramre [Thu, 29 Aug 2019 18:00:26 +0000 (18:00 +0000)]
tests: python3 version check for enum module

Type: fix
Change-Id: Ie210500fba741d3f047e8499957b5b233a78fa36
Signed-off-by: snaramre <snaramre@cisco.com>
4 years agoipip: fix typos in short_help 65/22665/2
Ignas Bacius [Thu, 10 Oct 2019 13:14:47 +0000 (16:14 +0300)]
ipip: fix typos in short_help

Type: fix
Signed-off-by: Ignas Bacius <ignas@noia.network>
Change-Id: Ica069e8c9dd4efd1f00639754da471bf11418b57

4 years agogbp: Add extended SFC unit tests 96/20596/7
Mohsin Kazmi [Wed, 10 Jul 2019 16:45:55 +0000 (18:45 +0200)]
gbp: Add extended SFC unit tests

Type: feature

Change-Id: I1218257af0053ae27c4394d7666fde87a732e08c
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agogso: Add gso feature arc 24/22124/10
Mohsin Kazmi [Tue, 8 Oct 2019 17:42:38 +0000 (19:42 +0200)]
gso: Add gso feature arc

Type: refactor

Change-Id: Ib4a8e7e64093b2db1deda6663325080bc8337605
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agoping: Move to plugin 15/22715/2
Mohsin Kazmi [Wed, 9 Oct 2019 16:35:16 +0000 (18:35 +0200)]
ping: Move to plugin

Type: refactor

Change-Id: I51d5bf54dfd408aa0c406cbdf0f4be10ef19d10d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agomemif: Revert "memif buffer leaks during disconnect." 00/22700/2
Andrew Yourtchenko [Mon, 14 Oct 2019 10:55:31 +0000 (10:55 +0000)]
memif: Revert "memif buffer leaks during disconnect."

This reverts commit d570c4d18df404cb59ef72d20d56f8e31418c8e9.
That commit introduced crash into memif make test-debug.
To reproduce: "TEST=memif make test-debug".

With this commit reverted the make test-debug for memif passes.

Type: fix
Change-Id: Ic335359e2050bb8a5d530b01c595b081476fa197
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agofib: recursive calculation leads to delegate pool realloc 23/22723/3
Neale Ranns [Mon, 14 Oct 2019 15:52:43 +0000 (08:52 -0700)]
fib: recursive calculation leads to delegate pool realloc

Type: fix

Change-Id: Ib7ac53d1b59b641ccd3b1d733107d7f1ba174314
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agomactime: add the "mactime.json" builtin URL 21/22721/2
Dave Barach [Mon, 14 Oct 2019 15:26:15 +0000 (11:26 -0400)]
mactime: add the "mactime.json" builtin URL

If the http static server plugin is enabled, register the name
"mactime.json" with the server. Visiting <web-root>/mactime.json
produces a json brain-dump of the mactime table.

Type: feature

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

4 years agotests: make pg_start() wait until pg completes 92/22692/5
Andrew Yourtchenko [Sun, 13 Oct 2019 10:09:50 +0000 (10:09 +0000)]
tests: make pg_start() wait until pg completes

A sizable number of tests call pg_start() to get the packets flowing and then
immediately expect to have the entirety of the packets gone through.
This works on powerful and unstressed hardware, but fails in beautifully random
ways under load.

This also necessitates the complicated logic of remembering the "zombie captures",
then sleeping for some time before cleaning them up....

The solution is simple: in pg_start(), start the generators, wait till they
all finish, clean up, done.

Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I930e51b7aae39c9841d22dd905a4d13a465a672b
Type: test

4 years agotests: log error which happens during connect and wait longer for stats socket 91/22691/3
Andrew Yourtchenko [Sun, 13 Oct 2019 10:06:46 +0000 (10:06 +0000)]
tests: log error which happens during connect and wait longer for stats socket

Intermittently, a test would start VPP, but no testcases would execute.
This would be more probable apparent during the high load or if there
is another testcase dumping the core at that moment.
Adding the logging to the connection revealed it was the stats socket
connection erroring with error -2. Increasing the deadline
from 3 seconds to 5 minutes has eliminated this error.

Change-Id: I40bd7e642abb9e2aef0238c612e4c34781de5db2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Type: test

4 years agopapi: fix socket sendall calls 99/22699/3
Vratko Polak [Mon, 14 Oct 2019 11:06:18 +0000 (13:06 +0200)]
papi: fix socket sendall calls

No point in checking the return value,
as .sendall() raises on error
(and the previous check was missing "not").

Type: fix

Change-Id: I9e07709ddd7093f91ffef87808abbab264b8aa5a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agogbp: use correct dst mac for RD-UU forward 16/22716/1
Benoît Ganne [Mon, 14 Oct 2019 12:54:34 +0000 (14:54 +0200)]
gbp: use correct dst mac for RD-UU forward

Type: fix

Change-Id: Ifdd193fab24796346b11a5df81740880f9a50ee8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agomactime: pass context in reply to mactime_dump 94/22694/1
Keith Burns [Sun, 13 Oct 2019 13:35:40 +0000 (06:35 -0700)]
mactime: pass context in reply to mactime_dump

Type: fix

mactime_dump API didn't copy context to _details reply,
causing subscription issues.

Change-Id: Ida9f28b437847fba67a7e0832baa2b25a46882a9
Signed-off-by: Keith Burns <alagalah@gmail.com>
4 years agotls: allow disconnects from main thread 74/22674/3
Florin Coras [Fri, 11 Oct 2019 15:00:43 +0000 (08:00 -0700)]
tls: allow disconnects from main thread

Type: fix

Use api with explicit thread index to retrieve tls contex on close.

Change-Id: Ibdc4338747300b7fc8f91ef3e10bcd48ce7ae366
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agohsa: vpp_echo refactor quic nclients arg 80/22680/2
Dave Wallace [Fri, 11 Oct 2019 16:04:21 +0000 (16:04 +0000)]
hsa: vpp_echo refactor quic nclients arg

Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: If8471d98053ae44cae07cdca6d269aa3c7df9887

4 years agohsa: vpp_echo clean up results comparison 79/22679/2
Dave Wallace [Fri, 11 Oct 2019 15:59:44 +0000 (15:59 +0000)]
hsa: vpp_echo clean up results comparison

Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I021dfe4a59ecda1ed77b656a81f4c935903854ea

4 years agohsa: vpp_echo remove redundant unformat function 76/22676/3
Dave Wallace [Fri, 11 Oct 2019 15:13:39 +0000 (15:13 +0000)]
hsa: vpp_echo remove redundant unformat function

Type: refactor

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ifae49981458cd3ef9e2c79d64040b2076ad93869

4 years agopapi: harden socket handling 72/22672/3
Vratko Polak [Fri, 11 Oct 2019 14:53:08 +0000 (16:53 +0200)]
papi: harden socket handling

In the previous implementation of socket transport for PAPI,
socket methods .send and .recv_into were used.
But they are not guaranteed to send/receive all the data
for the full message. The receive part contained a loop,
but it handled only the main message, not the header.

This patch replaces .send with .sendall
and uses newly defined _read_fixed method.

Also, removed Paul from maintainers,
as he is not active much, lately.

Type: fix

Change-Id: Iae1a68bf8f9e666856b7c7d62ebfe22defc5dfe1
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agolisp: fix dangling references to bihash tables 77/22677/3
Dave Barach [Fri, 11 Oct 2019 15:31:43 +0000 (11:31 -0400)]
lisp: fix dangling references to bihash tables

gid_ip4_table_t's and gid_ip6_table_t's are allocated from pools. They
MUST NOT be listed on the clib_all_bihash list to avoid dangling
references.

Switch to the clib_bihash_init2 API, which has the required knob.

Type: fix
Ticket: VPP-1788

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

4 years agotcp: refactor flags into cfg and conn flags 63/22663/4
Florin Coras [Thu, 10 Oct 2019 20:52:04 +0000 (13:52 -0700)]
tcp: refactor flags into cfg and conn flags

Type: refactor

Change-Id: Ib5e2ecf55732599e1322736e3662178c9da49c7d
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agotests: explicitly wait for the PG to finish before looking for capture file 70/22670/2
Andrew Yourtchenko [Fri, 11 Oct 2019 12:34:12 +0000 (12:34 +0000)]
tests: explicitly wait for the PG to finish before looking for capture file

Rather than only using time-based method of periodically checking
whether the pcap file appeared, first check that the packet generator
has stopped. To make this change fail-safe, have a 5-minute timeout
on this activity, just in case the things go terribly wrong.

Type: test
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id16b2802b2de8a4cafb5d9f0a8c9ba62ec89dc32

4 years agovppinfra: fix page boundary crossing bug in hash_memory64 33/22633/5
Dave Barach [Wed, 9 Oct 2019 16:57:13 +0000 (12:57 -0400)]
vppinfra: fix page boundary crossing bug in hash_memory64

Fix a day-1 bug, possibly dating back as far as 2002. The zap64() game
involves fetching 8 byte chunks, and clearing octets not to be
included in the key.

That's fine *unless* the 8-byte fetch happens to cross a page boundary
into unmapped or no-access space.

Type: fix

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

4 years agoip: reassembly: trace ip headers over worker handoffs 60/22660/4
Klement Sekera [Thu, 10 Oct 2019 17:03:57 +0000 (17:03 +0000)]
ip: reassembly: trace ip headers over worker handoffs

This change adds tracing of IP headers when doing a handoff between
worker threads. This eases debugging.

Type: feature

Change-Id: I2195b070a364cba13a658ec1cee5154fc4c3a8b0
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agotests: extra logging in reassembly tests 61/22661/4
Klement Sekera [Thu, 10 Oct 2019 18:57:34 +0000 (18:57 +0000)]
tests: extra logging in reassembly tests

Type: test

Change-Id: Ia09c3149490e47e49e59544ab1680a8160e60ac8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoip: RD-CP API incorrect reply code 62/22662/3
Neale Ranns [Thu, 10 Oct 2019 19:59:02 +0000 (12:59 -0700)]
ip: RD-CP API incorrect reply code

Type: fix

Change-Id: Ie436d51999dc1384a0db492f28a7e66620e14551
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agobonding: feature arc may not be enabled for the slave interface 34/22634/3
Steven Luong [Wed, 9 Oct 2019 17:29:47 +0000 (10:29 -0700)]
bonding: feature arc may not be enabled for the slave interface

vnet_feature_enable_disable takes sw_if_index, not hw_if_index. If there
is a subinterface created prior to the slave interface is created,
sw_if_index and hw_if_index start to diverge and the problem will happen.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I11e1f099378832f83b748526c6cbeb56960fad3c

4 years agotcp: improve pacing after idle send periods 58/22558/15
Florin Coras [Sun, 6 Oct 2019 21:06:14 +0000 (14:06 -0700)]
tcp: improve pacing after idle send periods

Rest pacer on ack reception if we haven't recently sent anything.

Type: feature

Change-Id: I820bacd81b65130052dfafbfcbe6ca4553069fbc
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agohttp_static: add .json content 56/22656/2
Dave Barach [Thu, 10 Oct 2019 17:29:35 +0000 (13:29 -0400)]
http_static: add .json content

Type: feature

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

4 years agotcp: retry lost retransmits 52/22352/20
Florin Coras [Fri, 27 Sep 2019 15:16:40 +0000 (08:16 -0700)]
tcp: retry lost retransmits

Add heuristic that detects lost retransmitted segments and retries
sending them.

Type: feature

Change-Id: I34d1bb16799e1993779222eb2bfad4b40704159e
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoip: fix clang debug compilation 49/22649/2
Benoît Ganne [Mon, 7 Oct 2019 13:06:52 +0000 (15:06 +0200)]
ip: fix clang debug compilation

The non-extern declaration confuses clang linker in debug mode.
The function is defined as inline above anyway.

Type: fix
Fixes: c6215d902f

Change-Id: Ic7e4477631cf0bcfb31ab3f81effe3642dd4223e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agosession: fix typos & cert_key store init 31/22631/3
Nathan Skrzypczak [Wed, 9 Oct 2019 14:23:26 +0000 (16:23 +0200)]
session: fix typos & cert_key store init

Type: fix

Change-Id: I865534de9f16bff586106e0850f131de1e9cbf24
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agotcp: custom checksum calculations for Ipv4/Ipv6 54/22654/1
Srikanth A [Thu, 3 Oct 2019 00:48:58 +0000 (17:48 -0700)]
tcp: custom checksum calculations for Ipv4/Ipv6

Type: feature

Based on the configuration, we can disable checksum offload capability
and calculate checksum while pushing the TCP & IP header.
This saves some cycles when VPP stack is used in legacy hardware devices.

Signed-off-by: Srikanth A <srakula@cisco.com>
Change-Id: Ic1b3fcf3040917e47ee65263694ebf7437ac5668
(cherry picked from commit 3642782a2748503f5b5ccf89d1575c1d489948ef)

4 years agotcp: fix tso not work in single buffer issue 05/22205/5
Simon Zhang [Tue, 24 Sep 2019 13:16:56 +0000 (21:16 +0800)]
tcp: fix tso not work in single buffer issue

Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: Iddb6fd41812e8c97af58859ef43279cfc0f9d1df
Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
4 years agotests: add cli_return_response to vpp_papi_provider 35/22635/3
Dave Barach [Wed, 9 Oct 2019 21:28:04 +0000 (17:28 -0400)]
tests: add cli_return_response to vpp_papi_provider

To improve gcov/lcov code coverage stats, it's necessary to send
incorrect debug CLI commands; to force vpp into debug CLI error paths.

cli_return_response() sends commands and returns the response object,
so test vectors can handle failures.

Type: feature

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

4 years agosr: fix deleting an SR l2 steering policy 11/22611/2
Ahmed Abdelsalam [Tue, 8 Oct 2019 16:27:34 +0000 (16:27 +0000)]
sr: fix deleting an SR l2 steering policy

Type: fix
Signed-off-by: Ahmed Abdelsalam <ahabdels@cisco.com>
Change-Id: I9e98b1622785e58484bf316ef491e44cfb06bcb7

4 years agoacl: remove api boilerplate 27/22627/2
Ole Troan [Wed, 9 Oct 2019 12:38:14 +0000 (14:38 +0200)]
acl: remove api boilerplate

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

4 years agomactime: fix undefined symbol in mactime_test 26/22626/2
Ole Troan [Wed, 9 Oct 2019 12:27:40 +0000 (14:27 +0200)]
mactime: fix undefined symbol in mactime_test

undefined symbol format_macaddress

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

4 years agogeneve: API cleanup 40/22440/6
Jakub Grajciar [Tue, 1 Oct 2019 10:04:56 +0000 (12:04 +0200)]
geneve: API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1964e4f0afe6f030ae9c8e28fcba5fd81aa1f130

4 years agomemif: remove api boilerplate 19/22619/2
Ole Troan [Wed, 9 Oct 2019 10:39:32 +0000 (12:39 +0200)]
memif: remove api boilerplate

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

4 years agoikev2: fix dangling pointer 32/22632/3
Filip Tehlar [Wed, 2 Oct 2019 09:08:04 +0000 (09:08 +0000)]
ikev2: fix dangling pointer

Type: fix

Change-Id: I8aa9029e0a5cf21aa24a90b39eb2787653f65abb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
4 years agosession: avoid old io dispatch if no slots left to send 12/22612/6
Ryujiro Shibuya [Wed, 9 Oct 2019 01:54:04 +0000 (02:54 +0100)]
session: avoid old io dispatch if no slots left to send

Type: fix

Signed-off-by: Ryujiro Shibuya <Ryujiro.Shibuya@owmobility.com>
Change-Id: I8e1f6cbd905ad5c21aed1b2e358540d0fbd7fc47

4 years agodocs: Add macos build documentation 98/20998/10
Nathan Skrzypczak [Wed, 31 Jul 2019 15:57:58 +0000 (17:57 +0200)]
docs: Add macos build documentation

Type: docs

Change-Id: Iee03aacab2cfcb4e87190302dc641e8273b7f096
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agomap: use ip6-full-reassembly instead of own code 45/22445/3
Klement Sekera [Tue, 1 Oct 2019 13:00:22 +0000 (13:00 +0000)]
map: use ip6-full-reassembly instead of own code

Remove map's implementation of reassembly and use common
ip6-full-reassembly functionality. This makes it easier to maintain by
removing duplicate code/functionality.

Type: refactor

Change-Id: I430e888b704e28c100a9ce075d1460cb529e4676
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agodhcp: dhcp6_pd_client_cp API cleanup 09/22409/5
Jakub Grajciar [Mon, 30 Sep 2019 11:06:48 +0000 (13:06 +0200)]
dhcp: dhcp6_pd_client_cp API cleanup

Use consistent API types.

Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: If6c102a53d074cba7eca6b6af9855aa4486f38cc

4 years agointerface: dump the interface device type 90/21490/3
Mohsin Kazmi [Fri, 27 Sep 2019 11:44:28 +0000 (13:44 +0200)]
interface: dump the interface device type

Type: feature

Change-Id: I22e2ef34631c9432311ff6457504e0649e0512b4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agoip: fix coverity warning 99/22599/2
Klement Sekera [Tue, 8 Oct 2019 08:57:45 +0000 (08:57 +0000)]
ip: fix coverity warning

Type: fix
Fixes: 0eb75d0e9c7624a4e8ac69fea7dbe12d39b75096

Change-Id: I8bcdc06b33bf4e12752b90dc3445fa51af552a46
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agobuild: clean up make help output 46/22246/4
Dave Wallace [Tue, 24 Sep 2019 21:52:36 +0000 (17:52 -0400)]
build: clean up make help output

This change is designed to help the uninformed find the right way
to run extended tests by using the test-all[-debug] targets.
'make test EXTENDED_TESTS=y' fails to build as it has a dependency
on 'vom-install' which is conveniently included in test-all[-debug].

- clarify test-all[-debug] description and
  make test-help description
- Also align indentation of make help output

Type: style

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ief54cc8a5af68c052aacb0d660237c5eb63451b5

4 years agointerface: callback to manage extra MAC addresses 95/22595/2
Matthew Smith [Fri, 12 Jul 2019 16:48:24 +0000 (11:48 -0500)]
interface: callback to manage extra MAC addresses

Type: feature

New callback vnet_hw_interface_add_del_mac_address().

Add or delete secondary MAC addresses on a hardware interface.
This will allow packets to be processed which have a destination
MAC address other than the primary programmed MAC address without
needing to put the device into promiscuous mode.

Change-Id: I6beecbcb8932fc1fe45b567f76fa3706feefae2c
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agoapi: comment, simplify and fix api socket read 47/22547/4
Vratko Polak [Mon, 7 Oct 2019 12:52:53 +0000 (14:52 +0200)]
api: comment, simplify and fix api socket read

The function vl_socket_read_ready did contain some comments already,
but as they stated, the logic has to be tricky to cover multiple cases.

Comment:
+ Add function-level comment
+ Add comments to describe some of local variables
+ Add many comments to describe internal state at particular lines.

Simplify:
+ Remov mbp_set as it is never needed.
+ Replace msg_len with msgbuf_len to save "+ sizeof (msgbuf_t)".

Improve:
+ Early exit on EAGAIN.

Fix:
+ "n" now only tracks input_buffer.
  Previously, it was entering the detection of additional messages
  even for unprocessed_input.
+ Set up msg_buffer (including appending to unprocessed_input)
  outside full-message-detection loop now,
  so it cannot be executed multiple times as before.

Type: fix
Ticket: VPP-1785

Change-Id: I256e34b435be06844458744a13ea37a0e86a96f9
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agopapi: introduce read_blocking 25/21925/9
Vratko Polak [Tue, 10 Sep 2019 11:35:11 +0000 (13:35 +0200)]
papi: introduce read_blocking

Previously, self.transport.q got the messages
(at least for socket transport), stored in the encoded (packed) form.
In order to avoid accessing internals for async reads,
a new method is introduced, to perform
blocking reads of decoded (unpacked) messages.

The method is also used in _call_vpp(),
so sync and async reads are kept compatible.

Type: feature

Change-Id: Id49792dfa57c00b1a14a198031c5398d09a9ba20
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
4 years agompls: support fragmentation of mpls output packet 53/22553/2
Rajesh Goel [Sun, 6 Oct 2019 07:47:36 +0000 (13:17 +0530)]
mpls: support fragmentation of mpls output packet

Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: Ie4372c5cf58ab215cdec5ce56f8a994daaba2844

4 years agoioam: remove api boilerplate 01/22601/3
Ole Troan [Tue, 8 Oct 2019 09:35:23 +0000 (11:35 +0200)]
ioam: remove api boilerplate

Note: The VAT _test.c plugins need some more adjustments.

Type: refactor
Change-Id: Ifa150683d7d68db7950f66ef85eea73c8281ba14
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoapi: autogenerate event handler functions for *_test.c 86/22586/5
Ole Troan [Mon, 7 Oct 2019 14:22:00 +0000 (16:22 +0200)]
api: autogenerate event handler functions for *_test.c

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: If75f63244f37ae3312832ca015f738c51ee7da1f
Signed-off-by: Ole Troan <ot@cisco.com>
4 years agoip: only install IPv6 prefixes in FIB when the interface is up 97/22597/5
Neale Ranns [Tue, 8 Oct 2019 05:40:54 +0000 (22:40 -0700)]
ip: only install IPv6 prefixes in FIB when the interface is up

otherwise they get installed twice and the reference counting means they are not removed.
This is the same behaviour as IPv4.

Type: fix

Change-Id: I9266e04ccff6ff06a577e85973a2ddbeb9dfc52b
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agofib: P2P interfaces do not need specific multicast adjacencies 98/22598/2
Neale Ranns [Tue, 8 Oct 2019 05:44:54 +0000 (22:44 -0700)]
fib: P2P interfaces do not need specific multicast adjacencies

they can use the 'auto' adj for all traffic

Type: fix

Change-Id: Id2b9557683252a94badc8f9dfab5f7b2ae26f1ee
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agohsa: use crypto_engine_type_t for TLS 42/22042/4
Nathan Skrzypczak [Fri, 13 Sep 2019 08:20:15 +0000 (10:20 +0200)]
hsa: use crypto_engine_type_t for TLS

Type: refactor

This patch does the following conversions
TLS_ENGINE_X -> CRYPTO_ENGINE_X
tls_engine_type_t -> crypto_engine_t
It does not change numbering of engines

Change-Id: I872dfaec3a6713bf4229c84d1ffd98b8b2419995
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agosession: Add certificate store 45/22045/8
Nathan Skrzypczak [Fri, 13 Sep 2019 09:08:13 +0000 (11:08 +0200)]
session: Add certificate store

Type: feature

This changes the behavior of both API calls
APPLICATION_TLS_CERT_ADD & APPLICATION_TLS_KEY_ADD
certificates and keys aren't bound to an app, they are
passed to it via connect / listen using the message
queue.

This should be followed by a per protocol (QUIC/TLS)
crypto_context store to save devrived structs

Change-Id: I36873bc8b63b5c72776c69e8cd9febc9cae31882
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agohsa: fix vpp_echo session close 73/22273/10
Dave Wallace [Wed, 25 Sep 2019 21:58:24 +0000 (17:58 -0400)]
hsa: fix vpp_echo session close

- Convert asserts in vpp_echo to conditional checks
- Refactor error logging for session creation/deletion
- Fix session close anomalies
- Fix ECHO_* macros
- Add rx/tx results different cmdline options to
  specify pass when counters are different
- Update close tests to send more than the fifo
  sizes of data
- Specify rx/tx results diff options for early
  close tests
- Set listen session state to closed on handling
  unlisten reply

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I9d0075fcb18e20829f420da104d69523897b0552

4 years agovlib: fix cli process stack overflow 70/22570/2
Chenmin Sun [Mon, 7 Oct 2019 19:35:20 +0000 (03:35 +0800)]
vlib: fix cli process stack overflow

Type: fix

Some cli processes, including configuring an test flow
on an i40e interface consume more than the currently
available stack space.

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I3df53d251cd43286f94647384d6e50a463bad15c

4 years agotcp: rate sample for persist segments 96/22596/4
Florin Coras [Tue, 8 Oct 2019 00:19:09 +0000 (17:19 -0700)]
tcp: rate sample for persist segments

Type: fix

Change-Id: I7c38d2ad6364f098529f51c15b533eb234b82716
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 years agoapi: add bapi thread handle to api main structure. 08/22608/1
IJsbrand Wijnands [Tue, 8 Oct 2019 11:50:55 +0000 (13:50 +0200)]
api: add bapi thread handle to api main structure.

Adding the thread handle to the api main structure allows the client process of
the bin api to manage the thread, like setting the thread name for example.

Type: feature
Change-Id: I38b58ddc83d5958c4bda76eadd371eee1545724b
Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
4 years agotests: handle unicode charactes in cli output 55/22455/2
Klement Sekera [Tue, 1 Oct 2019 19:14:34 +0000 (19:14 +0000)]
tests: handle unicode charactes in cli output

Type: fix

Change-Id: Ic4fb53e6d10a1de155a3088be81d53d9efeb0c0f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agohsa: make vpp_echo use mq instead of bapi 28/22028/6
Nathan Skrzypczak [Thu, 12 Sep 2019 14:02:13 +0000 (16:02 +0200)]
hsa: make vpp_echo use mq instead of bapi

Type: refactor

Change-Id: I4f370b09e22dbbc8920272df9a042dae04825bfc
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agosession: add is_migrating flag 88/22588/2
Nathan Skrzypczak [Wed, 2 Oct 2019 08:02:05 +0000 (10:02 +0200)]
session: add is_migrating flag

Type: fix

Add SESSION_F_IS_MIGRATING flag for session. It is set by the session
layer before poking the transport for migration. It's the transport
responsibility to unset the flag & act apropriatly if RX happens on
a migrating session.

Change-Id: Ie722917f1cf9344d8f041cad4ed8b064fb5853b6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agoapi: Add API support for marvell PP2 plugin 28/22328/9
Jianlin Lv [Fri, 27 Sep 2019 01:35:41 +0000 (09:35 +0800)]
api: Add API support for marvell PP2 plugin

Support create/delete interface with PP2 api

Type: feature

Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
Change-Id: Ia9c0ac0f237fd9f71f5480d736d6bcabee763fff

4 years agoip: remove dead code in ip6-svr 97/22397/2
Klement Sekera [Mon, 30 Sep 2019 09:25:04 +0000 (09:25 +0000)]
ip: remove dead code in ip6-svr

Type: fix
Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75

Change-Id: Ia714c2e46627864091d3f686dbced4cdd9c1a773
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agodocs: change VPP_WITH_SAMPLE_PLUGIN to SAMPLE_PLUGIN in sample plugin documentation 56/22556/4
Haggai Eran [Sun, 6 Oct 2019 11:20:42 +0000 (14:20 +0300)]
docs: change VPP_WITH_SAMPLE_PLUGIN to SAMPLE_PLUGIN in sample plugin documentation

The sample_plugin_doc.md file refers to VPP_WITH_SAMPLE_PLUGIN make
parameter, while the VPP makefile uses SAMPLE_PLUGIN instead.

Type: docs
Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
Change-Id: Id11090fcdc78b77e246da48d0d890865011f1132

4 years agodevices: vhost not reading packets from vring 85/22585/2
Steven Luong [Wed, 2 Oct 2019 14:33:48 +0000 (07:33 -0700)]
devices: vhost not reading packets from vring

In a rare event, after the vhost protocol message exchange has finished and
the interface had been brought up successfully, the driver MAY still change
its mind about the memory regions by sending new memory maps via
SET_MEM_TABLE. Upon processing SET_MEM_TABLE, VPP invalidates the old memory
regions and the descriptor tables. But it does not re-compute the new
descriptor tables based on the new memory maps. Since VPP does not have the
descriptor tables, it does not read the packets from the vring.

In the normal working case, after SET_MEM_TABLE, the driver follows up with
SET_VRING_ADDRESS which VPP computes the descriptor tables.

The fix is to stash away the descriptor table addresses from
SET_VRING_ADDRESS. Re-compute the new descriptor tables when processing
SET_MEM_TABLE if descriptor table addresses are known.

Type: fix
Ticket: VPP-1784

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I3361f14c3a0372b8d07943eb6aa4b3a3f10708f9
(cherry picked from commit 61b8ba69f7a9540ed00576504528ce439f0286f5)