vpp.git
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)

4 years agordma: fix crash when failing to read pci addr on create 80/22580/2
Benoît Ganne [Mon, 7 Oct 2019 13:36:10 +0000 (15:36 +0200)]
rdma: fix crash when failing to read pci addr on create

Type: fix

Change-Id: I543e2e5976cb384b81278a7ec98a0a6ab1612438
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agordma: fix crash when failing to detect numa node on create 83/22583/2
Benoît Ganne [Mon, 7 Oct 2019 13:57:32 +0000 (15:57 +0200)]
rdma: fix crash when failing to detect numa node on create

Type: fix

Change-Id: Ibb8e7c1c13869c1dce2385f58bd7260fcf776c5a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agodhcp: Move to plugin 74/22574/3
Neale Ranns [Mon, 7 Oct 2019 07:39:28 +0000 (00:39 -0700)]
dhcp: Move to plugin

Type: feature

Change-Id: I3fe27a8ef577741d9a5c4f090ec91cf68fb44fe3
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agomactime: add a "top" command to watch device stats 91/22591/2
Dave Barach [Mon, 7 Oct 2019 16:04:31 +0000 (12:04 -0400)]
mactime: add a "top" command to watch device stats

Include a binary API change NOT suitable for cherry-picking into 19.08

Type: feature

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

4 years agoip: add tracing for ipv6 frag headers 73/22573/2
Klement Sekera [Mon, 7 Oct 2019 12:20:39 +0000 (12:20 +0000)]
ip: add tracing for ipv6 frag headers

Type: feature

Change-Id: I0e049b28d8c21b67ea4545e865eda4e88f10e485
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoquic: fix wrong condition in update_fifo_size 90/22590/1
MathiasRaoul [Mon, 7 Oct 2019 15:41:37 +0000 (15:41 +0000)]
quic: fix wrong condition in update_fifo_size

Type: fix

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: If371cde9412be29634164830c58634da248ad0ae

4 years agomactime: remove unnecessary function declaration 69/22569/3
Neale Ranns [Mon, 7 Oct 2019 10:31:50 +0000 (10:31 +0000)]
mactime: remove unnecessary function declaration

Type: fix

Change-Id: I80cb666d9eae9d0f780d51fb95454d97ed320454
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agovlib: move thread barrier around mod of global node next data 69/22369/3
Christian E. Hopps [Sun, 29 Sep 2019 01:36:36 +0000 (21:36 -0400)]
vlib: move thread barrier around mod of global node next data

The old code modified the node next array prior to obtaining the thread
barrier. Then it updated the runtime node data, and upon barrier release
caused reforking of each worker thread. The reforking clones the main
thread nodes and reconstructs the runtime node structure. This cloning
is not 100% "deep" in the sense that the node next array is
shared (i.e., only the pointer is copied). So prior to the barrier being
obtained the node's next array is being changed while workers are
actively using it (bad). Treating the node next array as read-only in
the workers and sharing it is a decent optimization so instead of trying
to fix that just move the barrier a little earlier in the process to
protect the node next array as well.

This was tripping an assert in next frame ownership change by way of the
ip4-arp node. The assert verifies that the node's next array length is
equal to the runtime next node count. The race above was lost and the
node next array data was updated in the main thread while the arp code
was still executing in a worker.

This was being hit when many arp requests were being sent from both ends
of a tunnel during which the add next node function was called, which
often led to an assert b/c the next node array was out of sync with the
runtime next node count.

- PS#2 update - move barrier sync to just above code that modifies state.

Ticket: VPP-1783
Type: fix

Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: I868784e28f994ee0922aaaae11c4894a3f4f1fe7
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
4 years agoquic: Refactor naming & clibs 41/22441/4
Nathan Skrzypczak [Tue, 1 Oct 2019 11:04:59 +0000 (13:04 +0200)]
quic: Refactor naming & clibs

Type: refactor

Change-Id: I067fc7dbcc0985277df01384d9dcdb0bdf62fba5
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agodocs: grammar police raid 57/22557/2
Dave Barach [Sun, 6 Oct 2019 13:19:29 +0000 (09:19 -0400)]
docs: grammar police raid

Edit the front-page intro text. Fix egregious grammar errors,
including an "it's" vs. "its" blunder.

Type: docs

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

4 years agoip: reassembly add missing goto 68/22568/2
Klement Sekera [Mon, 7 Oct 2019 09:48:06 +0000 (09:48 +0000)]
ip: reassembly add missing goto

Type: fix
Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75

Change-Id: I256ef153b3b27a1f7ab7daa45015a2ec4bc84076
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agoip: reassembly remove dead code 66/22566/2
Klement Sekera [Mon, 7 Oct 2019 09:34:44 +0000 (09:34 +0000)]
ip: reassembly remove dead code

Type: fix
Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75

Change-Id: I79589f648f4c75762e5277fb94636a91fa36ccdd
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agobuild: add env variable to pass extra cmake args 70/22070/3
Nathan Skrzypczak [Mon, 16 Sep 2019 14:26:58 +0000 (16:26 +0200)]
build: add env variable to pass extra cmake args

If VPP_EXTRA_CMAKE_ARGS is set, its content will be
appended to the vpp cmake command cli

Type: feature

Change-Id: I825d4239e62b0a2fb70a652f0671f6c559630aad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
4 years agodhcp: API return code fix 63/22563/2
Neale Ranns [Mon, 7 Oct 2019 08:13:44 +0000 (08:13 +0000)]
dhcp: API return code fix

Type: fix

Change-Id: Ifcbfeecd6ca1215ec473eec4cce736ab4eacde80
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoip: MFIB CLI fix for parsing path flags 65/22565/1
Neale Ranns [Mon, 7 Oct 2019 08:23:38 +0000 (08:23 +0000)]
ip: MFIB CLI fix for parsing path flags

Type: fix

Change-Id: I7ed9726d8c5ca26715a84b004a18fd7f93142486
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agordma: prevent loopback of broadcast packets 31/22531/2
Benoît Ganne [Fri, 4 Oct 2019 13:28:12 +0000 (15:28 +0200)]
rdma: prevent loopback of broadcast packets

TX queues must be created before RX queues on Mellanox cards in order to
not receive our own broadcast packets.

Type: fix

Change-Id: I32ae25a47d819f715feda621a5ecddcf4efd71ba
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agobonding: traffic traversing the wrong interface 51/22551/2
Steven Luong [Fri, 4 Oct 2019 21:18:37 +0000 (14:18 -0700)]
bonding: traffic traversing the wrong interface

Missing an increment in the while loop. Hashes not stored in the array.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I603027f5a7305478f48a102ac8035ffde9102c53
(cherry picked from commit 0471cdbd3fe04a88a8b70b5f0eff0c378e19abf7)

4 years agoip: Fix IP unnumbered dump of one interface 54/22554/1
Neale Ranns [Sun, 6 Oct 2019 08:04:26 +0000 (01:04 -0700)]
ip: Fix IP unnumbered dump of one interface

Type: fix

Change-Id: I35fb6fdfba50c4a59cf1ffb94cb51487bcf5afc9
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agomisc: add "show run summary" 32/22532/2
Dave Barach [Fri, 4 Oct 2019 13:59:00 +0000 (09:59 -0400)]
misc: add "show run summary"

Prints the interior node vector rate, rx / tx / drop rates

Type: feature

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

4 years agordma: make sure pci subsystem is initialized 45/22545/2
Benoît Ganne [Fri, 4 Oct 2019 15:38:05 +0000 (17:38 +0200)]
rdma: make sure pci subsystem is initialized

The rdma driver use the pci subsystem, make sure the dependency is
recorded.

Type: fix

Change-Id: Ibd613f623d355612881acc31b9423f2de13793a3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agovlib: pci: set pci driver name to none when no driver is loaded 44/22544/2
Benoît Ganne [Fri, 4 Oct 2019 15:30:21 +0000 (17:30 +0200)]
vlib: pci: set pci driver name to none when no driver is loaded

If no Linux PCI driver module is loaded, then the driver_name in the PCI
info struct is NULL. This can triggers crash when checking driver name
eg. in vlib_pci_device_open().
Default to "<NONE>" as driver name, which should never match.

Type: fix

Change-Id: I9e69889a7566467bd8220b92bbbaa72ada957257
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agodocs: add packet-generator writeup 46/22546/2
Dave Barach [Fri, 4 Oct 2019 16:38:13 +0000 (12:38 -0400)]
docs: add packet-generator writeup

Type: docs

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

4 years agohsa: make APP_OPTIONS_PREALLOC_FIFO_PAIRS configurable 43/22543/2
MathiasRaoul [Fri, 4 Oct 2019 15:28:00 +0000 (15:28 +0000)]
hsa: make APP_OPTIONS_PREALLOC_FIFO_PAIRS configurable

-add prealloc_fifo_pairs  member in echo_main_t
-new cli parameter in vpp_echo

Type: feature

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: I6bb1214ee93e06421cd0a3721420278c51cd59c4

4 years agoquic: make quic fifo size configurable via cli 23/22323/9
MathiasRaoul [Fri, 4 Oct 2019 15:27:03 +0000 (15:27 +0000)]
quic: make quic fifo size configurable via cli

Type: feature

Change-Id: I6d6ac649094ef4bee2aed311915dd58f11972e79
Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
4 years agoip: fix use-after-free in IPv6 SLAAC expiration 06/22406/4
Benoît Ganne [Mon, 30 Sep 2019 08:55:33 +0000 (10:55 +0200)]
ip: fix use-after-free in IPv6 SLAAC expiration

Type: fix

Change-Id: I46b166b3a10c4543eafa4422531dd3c725db45f1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoquic: update quicly to v0.0.5 84/22484/5
MathiasRaoul [Wed, 2 Oct 2019 14:56:15 +0000 (14:56 +0000)]
quic: update quicly to v0.0.5

-Update quicly patches
-Remove event logger (removed from quicly).
-Update quicly functions calls

Type: feature

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: I0355befeb5ce961928f17225c83890ba87cf6ebc

4 years agovppinfra: create unformat function for data size parsing 23/22523/2
MathiasRaoul [Fri, 4 Oct 2019 09:53:45 +0000 (09:53 +0000)]
vppinfra: create unformat function for data size parsing

Type: feature

Signed-off-by: MathiasRaoul <mathias.raoul@gmail.com>
Change-Id: I8d71078a9ed42326e19453ea10008c6bb6992c52

4 years agonat: fix use-after-free 31/21931/4
Benoît Ganne [Thu, 18 Jul 2019 15:33:42 +0000 (17:33 +0200)]
nat: fix use-after-free

Type: fix

Change-Id: Iac91c086c4e975f0bada058f40b7b7d4475377f8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agotcp: unittest: do not access non-existent samples 00/22400/2
Benoît Ganne [Mon, 30 Sep 2019 10:56:28 +0000 (12:56 +0200)]
tcp: unittest: do not access non-existent samples

There is no bt->samples for this test, do not use it.

Type: fix

Change-Id: I2090290887bc5c0b5cdb0561cf2bf72a87781089
Signed-off-by: Benoît Ganne <bganne@cisco.com>
4 years agoacl: fix intermittent test failure 96/22496/3
Andrew Yourtchenko [Thu, 3 Oct 2019 07:55:52 +0000 (07:55 +0000)]
acl: fix intermittent test failure

ACL tests use random port number in the tests.
A port number 6081 causes the decode in scapy
to consume some of the Raw payload into GENEVE
encoding, which breaks the test.

Solution: bring up the lower range of random
port to 16384, so that it does not touch any
of the well known ports.

Type: test
Change-Id: I022660d8ec147857924b436f1871b0b5ddcf4c47
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoebuild: Unite default build platform to vpp 93/21293/4
juraj.linkes [Wed, 14 Aug 2019 09:11:33 +0000 (11:11 +0200)]
ebuild: Unite default build platform to vpp

Top level makefile is using vpp as the default platform. The other place
where platform is specified has native as the default. Unite them to the
only currently supported platform - vpp.

Type: make

Change-Id: Idb12ccc3056dd6be640a2d6763dc30e4f789d2ac
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
4 years agomisc: add "maxframe" and "rate" to packet-generator cli. 57/22357/4
Christian E. Hopps [Fri, 27 Sep 2019 16:59:30 +0000 (12:59 -0400)]
misc: add "maxframe" and "rate" to packet-generator cli.

Allow for setting the maximum number of generated packets to be included
in the frame passed to next nodes. This is very important for testing
code which may be susceptible to multi-frame vs single-frame bugs (e.g.,
code that is doing re-ordering where packets may be buffered between
frames).

Update:
- remove redundant packet "rate" option.
- reduce n_max_frame to u32 as that's what pulled from the CLI.

Type: feature
Signed-off-by: Christian E. Hopps <chopps@chopps.org>
Change-Id: Ie362bbb110b2cf01d9f65c559bbe9101e17b7fdc
Signed-off-by: Christian Hopps <chopps@labn.net>
4 years agoemacs: track improvements in vppapigen 48/22448/4
Dave Barach [Tue, 1 Oct 2019 16:10:57 +0000 (12:10 -0400)]
emacs: track improvements in vppapigen

Remove boilerplate which is now generated by vppapigen

Type: refactor

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

4 years agomemif: memif buffer leaks during disconnect. 32/22432/7
Padma Ram [Tue, 1 Oct 2019 01:05:18 +0000 (06:35 +0530)]
memif: memif buffer leaks during disconnect.

- code added to release the mbuf's to main pool during memif disconnect.

Type: fix

Change-Id: I504dacc9a40bc1702831cf3208fd532d1ae68a6f
Signed-off-by: Padma Ram <padmaram86.raja@gmail.com>
4 years agoapi: fix non-null-terminated C-string 03/22403/3
Benoît Ganne [Fri, 27 Sep 2019 16:07:39 +0000 (18:07 +0200)]
api: fix non-null-terminated C-string

Type: fix

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