vpp.git
3 years agoaf_xdp: AF_XDP input plugin 97/16597/21
Benoît Ganne [Fri, 12 Jun 2020 06:47:34 +0000 (08:47 +0200)]
af_xdp: AF_XDP input plugin

Type: feature

Change-Id: I85aa4ad6b68c1aa0e51938002dc691a4b11c545c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agordma: bugfix in the descriptor refill logic. In case of a partial allocation, the... 21/28621/3
Mohammed Hawari [Mon, 31 Aug 2020 15:23:45 +0000 (17:23 +0200)]
rdma: bugfix in the descriptor refill logic. In case of a partial allocation, the remainder modulo 8 must be returned to the pool so that the number of kept buffers is a multiple of 8.

Type: fix
Change-Id: Ifd97b03ea220300e7e6fe81a8ff4a25060fea6c1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agosession: format app_ns_name with %v rather than %s 13/28613/2
jiangxiaoming [Mon, 31 Aug 2020 09:38:11 +0000 (17:38 +0800)]
session: format app_ns_name with %v rather than %s

Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: Ie29dec803aa4ee02755190b09573c23f9b5f0ada

3 years agoflow: code refactor 72/28072/6
Chenmin Sun [Mon, 27 Jul 2020 09:40:17 +0000 (17:40 +0800)]
flow: code refactor

This is the code refactor for vnet/flow infra and the dpdk_plugin flow
implementation. The main works of the refactor are:
1. Added two base flow type: VNET_FLOW_TYPE_IP4 and VNET_FLOW_TYPE_IP6
   as the base the flow type
2. All the other flows are derived from the base flow types
3. Removed some flow types that are not currently supported by
   the hardware, and VPP won't leverage them either:
   IP4_GTPU_IP4, IP4_GTPU_IP6, IP6_GTPC, IP6_GTPU,
   IP6_GTPU_IP4, IP6_GTPU_IP6
4. Re-implemented the vnet/flow cli as well as the dpdk_plugin
   implementation
5. refine cli prompt
6. refine display info in command "show flow entry"

Type: refactor

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

3 years agocnat: Destination based NAT 62/27162/27
Neale Ranns [Tue, 19 May 2020 07:17:19 +0000 (07:17 +0000)]
cnat: Destination based NAT

Type: feature

Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I64a99a4fbc674212944247793fd5c1fb701408cb

3 years agovirtio: fix the coverity warning 30/28530/4
Mohsin Kazmi [Thu, 20 Aug 2020 15:18:56 +0000 (17:18 +0200)]
virtio: fix the coverity warning

Type: fix

Change-Id: I6c6d66ad8aa158be8d2b9d111de7d46473b9dc02
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovppinfra: add clib_mem_destroy_mspace(void *ms) 01/28601/2
Dave Barach [Fri, 28 Aug 2020 14:39:00 +0000 (10:39 -0400)]
vppinfra: add clib_mem_destroy_mspace(void *ms)

Also clib_mem_destroy() to destroy the current mspace.

Handy when an application wants to make a memory allocation arena
disappear.

Type: improvement

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

3 years agoipsec: Deprecate old interface API 91/28591/2
Neale Ranns [Thu, 27 Aug 2020 09:09:56 +0000 (09:09 +0000)]
ipsec: Deprecate old interface API

Type: feature

Change-Id: Ib5d7b7e4735a5dec6c3ed74068206a86782588ca
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agosession: limit max number of ct sessions per dispatch 82/28582/3
Florin Coras [Wed, 26 Aug 2020 02:07:02 +0000 (19:07 -0700)]
session: limit max number of ct sessions per dispatch

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia67662a5b988b3b5351cea21d6d92fb3a86629b5

3 years agovppinfra: Multiarch support for OCTEONTX2 SoC 79/28579/2
Nitin Saxena [Tue, 25 Aug 2020 14:28:37 +0000 (19:58 +0530)]
vppinfra: Multiarch support for OCTEONTX2 SoC

Type: feature

- Added multiarch support for Marvell OCTEONTX2
- Corrected Marvell THUNDERX2 spelling

Signed-off-by: Nitin Saxena <nsaxena@marvell.com>
Change-Id: I42d3654aeda89759a2db9d695592ee3227b26c2b

3 years agodpdk: fix blacklists 18/28418/5
Vladimir Ratnikov [Fri, 14 Aug 2020 12:25:30 +0000 (08:25 -0400)]
dpdk: fix blacklists

When we have both format blacklisted devices like:
blacklist 1234:5678
blacklist 1234:56:78.0

unformat with fmt=%x:%x matches for both strings
 and the rest 78.0 substring is kept in input
 and it can't be parsed for init args

This patch checks first if device format matches PCI address and
 just then if it matches Vendor and Product

Type: fix
Change-Id: If111762c0e0a424b052e4f6dc0f67731bf89dc2a
Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
3 years agotests: "force solo" testcase support 86/28586/8
Andrew Yourtchenko [Wed, 26 Aug 2020 14:33:54 +0000 (14:33 +0000)]
tests: "force solo" testcase support

Some of the tests are time-sensitive, and at present require a non-trivial
modification in order to run at high concurrency.

Without these modifications, they intermittently fail, and require
the test retries.

Rather than setting them to the extended tests and forgetting
about them, put them into a "solo" set, which gets run in a
single-threaded mode after the rest of the tests are done.

Mark a few of the tests that showed errors during TEST_JOBS=48
as forced-solo.

Also, give a better diagnostic if the testcase misses a docstring
needed to represent it in the diagnostic outputs.

Type: fix

Change-Id: I33fe62eb17edc1885bd2c3523892051d52da6546
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agovppinfra: elog multi-track g2 test pattern 78/28578/2
Dave Barach [Tue, 25 Aug 2020 13:35:42 +0000 (09:35 -0400)]
vppinfra: elog multi-track g2 test pattern

Type: test

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

3 years agodpdk: bump to DPDK 20.08 80/28580/3
Damjan Marion [Tue, 25 Aug 2020 20:29:19 +0000 (22:29 +0200)]
dpdk: bump to DPDK 20.08

Type: improvement

Change-Id: Id864c80ac0c9e6f3514a99e516fed82a998effff
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovcl: fix duplicated key of session_index_to_vlsh_table in multiple 35/28535/4
hanlin [Fri, 21 Aug 2020 03:05:36 +0000 (11:05 +0800)]
vcl: fix duplicated key of session_index_to_vlsh_table in multiple
threads vcl workers scenario

Type: fix

In multiple threads vcl workers scenario, multiple vcl workes can create
sessions with same index. Because only one vls worker created, key of
session_index_to_vlsh_table is duplicated.

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I7e1f5bc471adc5378194452aef85e611f5d0df1d

3 years agordma: bump rdma-core version to v31.0 07/28507/2
Benoît Ganne [Wed, 19 Aug 2020 08:23:16 +0000 (10:23 +0200)]
rdma: bump rdma-core version to v31.0

Type: improvement

Change-Id: If02deabea1fe47bbe82c53182e24a97cff68f8ec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovcl: cleanup non-blocking connect 70/28570/5
Florin Coras [Tue, 25 Aug 2020 04:23:51 +0000 (21:23 -0700)]
vcl: cleanup non-blocking connect

Make sure session is in non-closed state after non-blocking connect to
ensure cleanup is performed, if needed.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic1533b9864828f875c840dfdfeed08bf32d10651

3 years agoflow: add vnet/flow formal API 68/28068/5
Chenmin Sun [Mon, 27 Jul 2020 09:54:40 +0000 (17:54 +0800)]
flow: add vnet/flow formal API

This patch adds the API for vnet/flow infra.
Currently this API supports the below flow types:
    VNET_FLOW_TYPE_IP4_N_TUPLE
    VNET_FLOW_TYPE_IP6_N_TUPLE
    VNET_FLOW_TYPE_IP4_N_TUPLE_TAGGED
    VNET_FLOW_TYPE_IP6_N_TUPLE_TAGGED
    VNET_FLOW_TYPE_IP4_L2TPV3OIP
    VNET_FLOW_TYPE_IP4_IPSEC_ESP
    VNET_FLOW_TYPE_IP4_IPSEC_AH
    VNET_FLOW_TYPE_IP4_GTPU

All the above flows are tested with Intel E810/X710 NIC

Type: feature

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

3 years agoip-neighbor: skip probe for disabled interfaces 80/28180/2
Matthew Smith [Tue, 4 Aug 2020 20:26:16 +0000 (15:26 -0500)]
ip-neighbor: skip probe for disabled interfaces

Type: fix

In ip6_neighbor_probe(), if the interface is not enabled for ip6,
return NULL and skip trying to build a packet.

If the interface is not enabled, its mcast adjacency will be set to
~0 and a seg fault will ensue.

Change-Id: I825c9f40a0d5b2a77f788ac8dbd618138706383d
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agoapi: register endian handlers for reply messages 66/28566/2
Ole Troan [Mon, 24 Aug 2020 10:22:01 +0000 (12:22 +0200)]
api: register endian handlers for reply messages

Endian handlers was not registered for reply messages.
Causing endian-neutral handlers to crash.

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

3 years agobonding: enhance binary api handling 06/28206/4
Steven Luong [Mon, 10 Aug 2020 16:34:07 +0000 (09:34 -0700)]
bonding: enhance binary api handling

- check input sw_if_index to make sure it is sane. Coverity actually
complains about it.
- return rv. Some of the APIs handlers were not passing back the rv.

Type: improvement

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

3 years agovmxnet3: enhance debug CLI error handling 81/28181/3
Steven Luong [Wed, 5 Aug 2020 19:30:42 +0000 (12:30 -0700)]
vmxnet3: enhance debug CLI error handling

- Display the interface name upon successfully creating the interface.
- Don't go silent when error occurs. Be explicit about it.

Type: improvement

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

3 years agohsa: set connected mode for udp server 63/28563/2
jiangxiaoming [Sat, 22 Aug 2020 11:25:49 +0000 (19:25 +0800)]
hsa: set connected mode for udp server

Type: fix

Signed-off-by: jiangxiaoming <jiangxiaoming@outlook.com>
Change-Id: I32a28a944fcee11657c4dd0ba34ad6d73de89263

3 years agovppinfra: add format_one_elog_event 24/28524/2
Dave Barach [Thu, 20 Aug 2020 12:30:39 +0000 (08:30 -0400)]
vppinfra: add format_one_elog_event

To avoid ridiculous pointer gymnastics in golang

Type: improvement

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

3 years agovppapigen: Fix missing api dir 57/28557/1
Nathan Skrzypczak [Fri, 21 Aug 2020 09:16:44 +0000 (11:16 +0200)]
vppapigen: Fix missing api dir

Type: fix

pci_types.api lives in vlib/pci which wasn't included
in the generate_json.py script

Change-Id: I15649786282584b7aefb9ace83c5154eb697b50b
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotcp: track reorder with sacks 10/28110/18
Florin Coras [Thu, 30 Jul 2020 06:03:39 +0000 (23:03 -0700)]
tcp: track reorder with sacks

Type: feature

Change-Id: I041bff2e8d589c171661de286fa1503531dff891
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agotap: fix flags in custom-dump 25/28525/2
Mohsin Kazmi [Thu, 20 Aug 2020 12:54:07 +0000 (14:54 +0200)]
tap: fix flags in custom-dump

Type: fix

Change-Id: I4cd0b1855eab05344897686dc17b7df44de6c786
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovirtio: add modern device support 66/27566/10
Mohsin Kazmi [Thu, 20 Aug 2020 08:25:12 +0000 (10:25 +0200)]
virtio: add modern device support

Type: feature

Change-Id: I205f7c146a213d603d9d1e46fcf5195a876608dc
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoipsec: fix esp padding 23/28523/1
Milan Lenco [Thu, 20 Aug 2020 11:23:09 +0000 (13:23 +0200)]
ipsec: fix esp padding

Type: fix

Signed-off-by: Milan Lenco <milan.lenco@pantheon.tech>
Change-Id: Ic8db52b41d7e5af3425099f008984e50afb3da74

3 years agovirtio: refactor pci device code 49/27649/6
Mohsin Kazmi [Thu, 16 Jul 2020 12:55:42 +0000 (12:55 +0000)]
virtio: refactor pci device code

Type: refactor

Change-Id: I7342178f9ab9adb99b91a4f984bc22bef2ce8021
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoip: vnet_ip_mroute_cmd payload_proto fix 16/27416/2
Elias Rudberg [Wed, 3 Jun 2020 22:15:45 +0000 (00:15 +0200)]
ip: vnet_ip_mroute_cmd payload_proto fix

Make sure payload_proto variable is set properly in vnet_ip_mroute_cmd()
function. This avoids using an uninitialized payload_proto value which
could lead to assertion failure when using e.g. the ip mroute add
command.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I8b1d1df02e80150836b7b0448814d8f99747eeed

3 years agonat: fixed cli nat summary and nat limit 15/28515/2
Filip Varga [Wed, 19 Aug 2020 12:57:10 +0000 (14:57 +0200)]
nat: fixed cli nat summary and nat limit

Type: fix

Change-Id: I78017b02015116f93b579c7381119f618351c98d
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agosession: ct init error handling 24/28424/5
Florin Coras [Sat, 15 Aug 2020 00:51:13 +0000 (17:51 -0700)]
session: ct init error handling

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie70348406a2bfc156302687d2f5f98bc1a50c88f

3 years agovppinfra: minor tweaks for cgo interoperation 09/28509/1
Dave Barach [Wed, 19 Aug 2020 10:59:53 +0000 (06:59 -0400)]
vppinfra: minor tweaks for cgo interoperation

'type' is a keyword in golang, so s/type/event_type/ in elog.h and
elsewhere.

Add vec_len_not_inline(...), elog_write_file_not_inline(...) and
elog_read_file_not_inline(...) since the inline forms aren't usable.

More such tweaks may follow.

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

3 years agonat: session cli command fix 40/28440/2
Filip Varga [Tue, 18 Aug 2020 09:46:01 +0000 (11:46 +0200)]
nat: session cli command fix

Type: fix

Change-Id: I57ae649d1b26d5bea2df89c209f257372e565b49
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agoapi: retry sending fd on EAGAIN 29/28429/4
Florin Coras [Tue, 18 Aug 2020 03:46:34 +0000 (20:46 -0700)]
api: retry sending fd on EAGAIN

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I04117636ad95b706e3dd9331f00bd80e57d26d7f

3 years agobuild: add explicit commit to rc1, rc2 builds, and add ".0" to post-non-dot-release... 82/27782/4
Andrew Yourtchenko [Thu, 2 Jul 2020 12:39:00 +0000 (12:39 +0000)]
build: add explicit commit to rc1, rc2 builds, and add ".0" to post-non-dot-release per-patch builds

This addresses problem with incorrect sorting of artifacts in the per-patch packagecloud repositories
for throttle branches, by slightly changing the version string for the non-released (per-build) artifacts:

1) the rc1 and rc2 artifacts now will have the count of
   commits since tag (0) and the explicit commit hash

2) the builds after version XX.YY but before XX.YY.1
are named as if the version was "XX.YY.0"

Type: fix
Change-Id: Ib69a59ee98aa296c5cb24b183bba807b6cb3c05c
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agovppinfra: fix RC in bihash instantiation 28/28428/2
Nathan Skrzypczak [Mon, 17 Aug 2020 12:14:56 +0000 (14:14 +0200)]
vppinfra: fix RC in bihash instantiation

There can be a race condition in the case
a thread tries to do a bihash_search while
another instantiates the bihash.

Type: fix

Change-Id: Ic61b590763beb409e112957c43a5a66cd10afb28
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agonat: det: replace speculative buffer enqueue model 67/28167/3
Klement Sekera [Tue, 4 Aug 2020 09:38:30 +0000 (09:38 +0000)]
nat: det: replace speculative buffer enqueue model

Replace speculative buffer enqueue coding model with
vlib_get_buffers(...)/vlib_buffer_enqueue_to_next(...).

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ib5a32d60592fb17ed0ba1ac074047e39780f74be

3 years agostats: Move misplaced comment block 22/28422/3
Vratko Polak [Fri, 14 Aug 2020 16:00:33 +0000 (18:00 +0200)]
stats: Move misplaced comment block

Type: fix
Fixes: fdc678081ca5f0971b8bcbf312c1e83017365c33

Change-Id: I64d15b050cfd3d88923bf996cb68b13504dbf6af
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agovppapigen: generate define for module_semver 40/25540/8
Ole Troan [Fri, 28 Feb 2020 12:45:42 +0000 (13:45 +0100)]
vppapigen: generate define for module_semver

Generate a semver define for API modules in the VPP side C generator.

E.g in map.api_types.h
\#define VL_API_MAP_API_VERSION_MAJOR 4
\#define VL_API_MAP_API_VERSION_MINOR 2
\#define VL_API_MAP_API_VERSION_PATCH 1

Type: improvement
Change-Id: I2ab86154e85e26fb075c4e91a01ff3692640654b
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agotap: add gro support 10/28210/5
Mohsin Kazmi [Thu, 13 Aug 2020 16:57:26 +0000 (18:57 +0200)]
tap: add gro support

Type: feature

Change-Id: I5868dd267aa26aa97aec5fd70e70c5956ac52277
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agonat: sessions get expired when fib table removed 78/28178/7
Filip Varga [Tue, 4 Aug 2020 16:06:06 +0000 (18:06 +0200)]
nat: sessions get expired when fib table removed

fib table removal would leave lingering sessions in vpp
this patch is aimed at solving this issue by grouping
sessions by source and destionation fib. if one of the
fibs gets removed this grouping is tagged as expired
and session won't be passed to non existing fib table

Ticket: VPPSUPP-93
Type: improvement

Change-Id: I45b1205a8b58d91f174e6feb862554ec2f6cffad
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agovcl: rx dequeue notifications with epoll 40/28340/7
Florin Coras [Thu, 13 Aug 2020 03:46:29 +0000 (20:46 -0700)]
vcl: rx dequeue notifications with epoll

Add deq request on ct fifo if present and clear event when session is
removed from epoll group.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8a20342879b3aac2f8fe8171556baaf9c992363b

3 years agovcl: minimize vpp to vcl rx events 39/28339/5
Florin Coras [Thu, 13 Aug 2020 01:58:25 +0000 (18:58 -0700)]
vcl: minimize vpp to vcl rx events

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2015162bd315927e45b9fe583324b1458fe69d8f

3 years agogso: packet coalesce library 09/28209/4
Mohsin Kazmi [Tue, 11 Aug 2020 13:00:44 +0000 (15:00 +0200)]
gso: packet coalesce library

Type: feature

Change-Id: Ia19d3611e596d9ec47509889b34e8fe793a0ccc3
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoip: add VNET_IP_TABLE_ADD_DEL_FUNCTION 75/28075/5
Steven Luong [Mon, 27 Jul 2020 17:06:58 +0000 (10:06 -0700)]
ip: add VNET_IP_TABLE_ADD_DEL_FUNCTION

vrf table may be dynamically added or deleted. When the table is deleted,
clients who use the corresponding vrf table may need a callback to
do the clean up. The mechanism added here is cloned from
VNET_SW_INTERFACE_ADD_DEL_FUNCTION.

Type: improvement

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

3 years agovcl: clear ct rx event on right fifo 42/28342/2
Florin Coras [Thu, 13 Aug 2020 07:17:51 +0000 (00:17 -0700)]
vcl: clear ct rx event on right fifo

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I70bab0d86287c108c6dffda5c5b2f29277c15de1

3 years agodocs: correct fib tunnel diagram reference 68/28168/2
Christian Hopps [Tue, 4 Aug 2020 10:16:12 +0000 (06:16 -0400)]
docs: correct fib tunnel diagram reference

The included image was pulling in figure 2, change to the correct
figure 11.

Type: docs
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: I3679916364753fc682d1d1713fce952de398e626

3 years agonat: move deterministic nat to det44 sub feature 06/27806/12
Filip Varga [Tue, 21 Jul 2020 08:27:39 +0000 (10:27 +0200)]
nat: move deterministic nat to det44 sub feature

Type: refactor

Change-Id: I0bb203102a0e13dd7448e2125925ab356bbd7937
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agonat: remove non-error error counters 57/28057/4
Klement Sekera [Thu, 16 Jul 2020 07:54:10 +0000 (07:54 +0000)]
nat: remove non-error error counters

Some statistics counters were implemented as error counters. Move them
to stat segment, where they belong.

Type: improvement
Change-Id: I5600bec1b4e0496282297374ec1e79d909cdaf8a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoacl: use the global heap when allocating the lookup context 51/28251/2
Andrew Yourtchenko [Wed, 12 Aug 2020 08:24:44 +0000 (08:24 +0000)]
acl: use the global heap when allocating the lookup context

The "ACL as a service" lookup infra is shared, so a global heap must
be used.

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

3 years agovppapigen: remove unreachable code 12/28212/2
Ole Troan [Tue, 11 Aug 2020 14:18:09 +0000 (16:18 +0200)]
vppapigen: remove unreachable code

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

3 years agostats: remove offsets on vpp side 17/28017/3
Ole Troan [Tue, 21 Jul 2020 06:46:08 +0000 (08:46 +0200)]
stats: remove offsets on vpp side

Represent pointers directly in shared memory and require clients to adjust for
shared memory segment being mapped at different base address.
Deprecated: stat_segment_pointer() / stat_segment_offset()
Added: stat_segment_adjust()

Bumped the stat segment version to 2.

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

3 years agovcl: mt detection and cleanup 49/28249/5
Florin Coras [Wed, 12 Aug 2020 05:05:28 +0000 (22:05 -0700)]
vcl: mt detection and cleanup

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I521c110fd4d7445bd585c96d4c768f16a0a7d3b8

3 years agovcl: support multi-threads with session migration 64/27864/9
hanlin [Mon, 13 Jul 2020 03:09:15 +0000 (11:09 +0800)]
vcl: support multi-threads with session migration

Currently, mutlti-threads only support one dispatch thread and multiple
worker threads, eventually only dispatch thread is a vcl worker and can
interact with epoll.
This patch will register all threads as vcl worker, and then each
thread can interact with epoll now. Moreover, session migration also
supported, such as socket created in thread A and used (bind, connect
and etc.) in thread B.

Type: feature

Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: Iab0b43a33466968c1423d7d20faf1460c8589d91

3 years agovcl: support inter worker rpc 55/27955/5
Florin Coras [Fri, 17 Jul 2020 03:46:17 +0000 (20:46 -0700)]
vcl: support inter worker rpc

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I664cd14c84fc5cf2ffe61efce99c95219b44fad7

3 years agovppapigen: add support for empty options 04/28204/4
Ole Troan [Mon, 10 Aug 2020 15:06:44 +0000 (17:06 +0200)]
vppapigen: add support for empty options

Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I59323447bee7bb4f0563251a5df80cbefb9bd89e
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agopapi: allow unknown address family 92/27392/4
Ole Troan [Tue, 2 Jun 2020 12:38:53 +0000 (14:38 +0200)]
papi: allow unknown address family

In unions all representations of the union are decoded.
Which means trying to decode something that isn't an address
might have invalid address family types.

Type: fix
Ticket: VPP-1884
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id3381ef8cc885952c1eb488ebc70e276eaceb366

3 years agostats: add timeout for in_progress access to stat segment 99/28199/7
Ole Troan [Mon, 10 Aug 2020 09:59:20 +0000 (11:59 +0200)]
stats: add timeout for in_progress access to stat segment

add new api stat_segment_set_timeout_nsec to limit time waiting for vpp
in_progress state.

Change-Id: Ic78a97bc5013d67d7e4bbcc4a6f0ef918f9f9b33
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agostats: name and error index client memory leak 02/28202/2
Ole Troan [Mon, 10 Aug 2020 14:25:21 +0000 (16:25 +0200)]
stats: name and error index client memory leak

Type: fix
Change-Id: I6c9999b93d4f4ad4b8540a21e793c9a90e7c8ecf
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agovcl: fix getting wrong non-blocking flags issue in VPPCOM_ATTR_GET_FLAGS action 97/28197/2
Simon Zhang [Thu, 6 Aug 2020 21:20:47 +0000 (05:20 +0800)]
vcl: fix getting wrong non-blocking flags issue in VPPCOM_ATTR_GET_FLAGS action

Type: fix

Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Change-Id: If4c700b59b8936a43d6a73ed75cc6fdaf6cf141d

3 years agovrrp: change init of vrrp key in VR lookup 92/28192/2
Matthew Smith [Wed, 5 Aug 2020 22:04:06 +0000 (17:04 -0500)]
vrrp: change init of vrrp key in VR lookup

Type: fix

A struct that is used as a hash key was being initialized in its
declaration. On CentOS 8 this caused some hash lookups to fail.
This seems to be caused by uninitialized padding.

Use clib_memset() to initialize the key with 0's to avoid the issue.

Change-Id: I00555c201a1ab34133971313ba14f20f4e867a30
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agomemif: wrong interface counter is incremented 90/28190/1
Steven Luong [Thu, 6 Aug 2020 19:22:53 +0000 (12:22 -0700)]
memif: wrong interface counter is incremented

vlib_increment_combined_counter takes sw_if_index, not hw_if_index.

Type: fix

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

3 years agobash: fix pip install issue with jjb-sandbox-env function 86/28086/2
Dave Wallace [Tue, 28 Jul 2020 14:59:02 +0000 (14:59 +0000)]
bash: fix pip install issue with jjb-sandbox-env function

- In a new system (e.g. ubuntu 18.04 docker image), the pip3
  installation of jenkins-job-builder fails unless pip3 wheel
  is completed on a previous pip3 install command.

Type: fix

Change-Id: I4354c851161b9c470d44951dc8b722ffc87f56f7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 years agovppinfra: harmonize function names 88/28188/3
Dave Barach [Thu, 6 Aug 2020 15:38:40 +0000 (11:38 -0400)]
vppinfra: harmonize function names

Type: fix

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

3 years agomisc: harmonize names 89/28189/1
Dave Barach [Thu, 6 Aug 2020 16:10:09 +0000 (12:10 -0400)]
misc: harmonize names

Type: fix

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

3 years agointerface: add pcap trace data preallocation 82/28182/2
Dave Barach [Wed, 5 Aug 2020 20:12:35 +0000 (16:12 -0400)]
interface: add pcap trace data preallocation

Type: improvement

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

3 years agovcl: fix epoll timeout 73/28173/1
Florin Coras [Wed, 5 Aug 2020 05:45:45 +0000 (22:45 -0700)]
vcl: fix epoll timeout

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I917158a62e5881b97917c3339527d3c34c37565a

3 years agotcp: improve timestamp rtt accuracy 37/28137/9
Florin Coras [Fri, 31 Jul 2020 19:32:40 +0000 (12:32 -0700)]
tcp: improve timestamp rtt accuracy

- switch to using vlib_time as reference for timestamps
- use us precision ticks for tcp but keep using ms precision for
timestamps. As a result, srtt, rttvar and rto are now measured in us
instead of ms. MRTT samples from timestamps are converted from ms to
us (not accurate under ms) while high precision samples are used with us
precision, i.e., they're no longer converted to ms precision samples.

Type: improvement

Change-Id: Ibda559575d9b4fdc85b0985264f7c865ff367e34
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agounittest: add clib_count_equal_u8/16/32/64 tests 74/27974/2
Benoît Ganne [Mon, 20 Jul 2020 16:07:49 +0000 (18:07 +0200)]
unittest: add clib_count_equal_u8/16/32/64 tests

Type: test

Change-Id: I490c1b1a2fa49badda038e6be014c77b9bee6c56
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppinfra: fix clib_count_equal_u8/16/32/64 overflow 62/27962/3
Benoît Ganne [Fri, 17 Jul 2020 09:46:45 +0000 (11:46 +0200)]
vppinfra: fix clib_count_equal_u8/16/32/64 overflow

Type: fix

Change-Id: Id5ca868cd7a2abc9320206f0336aa3348f5906e3
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agonsim: limit tx burst size and refactor input node 38/28138/1
Florin Coras [Fri, 31 Jul 2020 20:56:40 +0000 (13:56 -0700)]
nsim: limit tx burst size and refactor input node

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic93a598051d437a5801d794b678edf6e73d42a47

3 years agonsim: basic reorder support 98/28098/16
Florin Coras [Wed, 29 Jul 2020 02:20:40 +0000 (19:20 -0700)]
nsim: basic reorder support

Reorder delayed packets, i.e., flush instead of delay, with a configured
rate.

Type: feature

Change-Id: Ib1294f5f1c9b6e98a12b1bb0be655e54facfed3a
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agoip-neighbor: Allow to replace dynamic entry 50/27950/4
Vladimir Isaev [Thu, 16 Jul 2020 14:05:18 +0000 (17:05 +0300)]
ip-neighbor: Allow to replace dynamic entry

Before this patch it was not allowed to replace
a dynamic ARP entry with a static one with the
same mac-address.

Type: fix

Signed-off-by: Vladimir Isaev <visaev@netgate.com>
Change-Id: I6cfc0e510ffdf141c61874288f11a60395182374

3 years agodocs: Add link to 20.05 test framework docs 17/28117/2
Andrew Yourtchenko [Wed, 13 May 2020 22:59:30 +0000 (22:59 +0000)]
docs: Add link to 20.05 test framework docs

Change-Id: I429a29a5cb1f311bec4361c758b14b51b0afc8aa
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 765ef37670a4c32ccd3da345197e2b103d1a22b0)

3 years agotcp: process syn in fin-wait-2 06/28106/3
Florin Coras [Wed, 29 Jul 2020 17:13:07 +0000 (10:13 -0700)]
tcp: process syn in fin-wait-2

Type: improvement

Change-Id: I379ba4270dad56fb0a06427a43e97bed36bdaa13
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agofeature: add vnet_feature_is_enabled 07/28107/1
Dave Barach [Wed, 29 Jul 2020 22:07:02 +0000 (18:07 -0400)]
feature: add vnet_feature_is_enabled

A predicate function which says whether a given sw_if_index has a
certain feature enabled.

int vnet_feature_is_enabled (const char *arc_name,
                             const char *feature_node_name,
                             u32 sw_if_index)

returns 1 if the feature is enabled
returns 0 if the feature is not enabled
returns VNET_API_ERROR_INVALID_VALUE if the arc name is not found
returns VNET_API_ERROR_INVALID_VALUE_2 if the feature node name is not found
returns VNET_API_ERROR_INVALID_SW_IF_INDEX if the sw_if_index is not found

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

3 years agohsa: fix handling active connection failures in the proxy 04/28104/1
Ivan Shvedunov [Wed, 29 Jul 2020 16:17:05 +0000 (19:17 +0300)]
hsa: fix handling active connection failures in the proxy

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I9c62bb6524247e2cd25de198263c16f3d9db0da9

3 years agotcp: fix skipping RSTs in SYN_SENT state 03/28103/1
Ivan Shvedunov [Wed, 29 Jul 2020 16:15:41 +0000 (19:15 +0300)]
tcp: fix skipping RSTs in SYN_SENT state

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: Ieddf8f03fdd14e71efaf4c78fe5b7f0d15c5cf5a

3 years agobuild: Fix 'make install-deps' errors on aarch64 CentOS 7 44/28044/4
Jieqiang Wang [Thu, 23 Jul 2020 15:19:25 +0000 (15:19 +0000)]
build: Fix 'make install-deps' errors on aarch64 CentOS 7

On CentOS-7 aarch64, command of 'debuginfo-install -y glibc openssl-libs mbedtls-devel zlib' in 'make install-deps' fails because it tries to install the corresponding *debuginfo* packages from some inaccessible/unmaintained repos on aarch64, e.g., centos-sclo-rh-debuginfo. The error message shows as below.

Using 'debuginfo-install --enablerepo=xxx' also fails because it will still enable all the repos including the broken repos on aarch64. Using 'debuginfo-install --disablerepo=xxx' (xxx is the broken repo) works fine but we are not centain about that if VPP user will install additional broken repos on aarch64 or not. So to fix this error, we install all the *debuginfo* packages for 'glibc openssl-libs mbedtls-devel zlib' packages using 'yum install' instead.

[root@ ~]# debuginfo-install -y glibc openssl-libs mbedtls-devel zlib
Loaded plugins: auto-update-debuginfo, fastestmirror, ovl
enabling epel-debuginfo
enabling base-debuginfo
enabling centos-sclo-rh-debuginfo
Loading mirror speeds from cached hostfile
epel/aarch64/metalink                                                                                                                                                                       | 8.2 kB  00:00:00
epel-debuginfo/aarch64/metalink                                                                                                                                                             | 8.5 kB  00:00:00
 * base: mirror.aktkn.sg
 * centos-sclo-rh: mirror.aktkn.sg
 * epel: mirrors.yun-idc.com
 * epel-debuginfo: mirrors.yun-idc.com
 * extras: mirror.aktkn.sg
 * updates: mirror.xtom.com.hk
http://debuginfo.centos.org/centos/7/sclo/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

failure: repodata/repomd.xml from centos-sclo-rh-debuginfo: [Errno 256] No more mirrors to try.
http://debuginfo.centos.org/centos/7/sclo/aarch64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

Type: fix

Change-Id: I017c3b20a167d8035c3ae617b9ad5ae479e52f57
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
3 years agoipsec: fix cli uninitialized parameters 84/28084/2
Benoît Ganne [Tue, 28 Jul 2020 13:56:15 +0000 (15:56 +0200)]
ipsec: fix cli uninitialized parameters

Type: fix

Change-Id: Ia5c1f928f6752314b278127d2446e973f03a5da8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotcp: process syn in close-wait 96/28096/2
Florin Coras [Tue, 28 Jul 2020 17:57:09 +0000 (10:57 -0700)]
tcp: process syn in close-wait

Type: improvement

Change-Id: I0cafe08d21e02094dda203c5eb60601b5953425d
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agobonding: toggle bond admin state may cause hw link state to down 97/28097/2
Steven Luong [Tue, 28 Jul 2020 19:28:03 +0000 (12:28 -0700)]
bonding: toggle bond admin state may cause hw link state to down

For bond interface, we set hardware link state to up initially when
admin state is set to up. Thereafter, if we toggle the admin state to
down and up, we require at least one active member in the bond prior
to bringing up the hardware state which is inconsistent. The fix is to
remove the unnecessary condition.

This is a rework of the original proposed patch which is more complex
and could be tricky to get it right
https://gerrit.fd.io/r/c/vpp/+/27141

Type: fix

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

3 years agodocs: Update the VPP tutorial 87/28087/2
John DeNisco [Tue, 28 Jul 2020 16:15:16 +0000 (12:15 -0400)]
docs: Update the VPP tutorial

Update the documents for the VPP tutorial.

Type: fix

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: I62d0641ff0af7b07a26b4379f19cbdaf285537d7

3 years agoip: svr: improve performance for non-fragments 51/27851/3
Klement Sekera [Fri, 10 Jul 2020 09:29:48 +0000 (09:29 +0000)]
ip: svr: improve performance for non-fragments

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: Ia77ce41a8f1a032c5e027c4bb47347752cfda0a9

3 years agoip: fix punt cli to only consumes a line of input 73/28073/2
Benoît Ganne [Mon, 27 Jul 2020 16:27:57 +0000 (18:27 +0200)]
ip: fix punt cli to only consumes a line of input

Type: fix

Change-Id: Idb6f82e08b29e3805ed2133acb5fd7226148f672
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agohttp_static: fix session cleanup 76/28076/5
Florin Coras [Mon, 27 Jul 2020 19:47:56 +0000 (12:47 -0700)]
http_static: fix session cleanup

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibb380eecca76ed9c00ed14c167dfcf576f943db0

3 years agohsa: fix http server session cleanup 77/28077/4
Florin Coras [Mon, 27 Jul 2020 20:11:42 +0000 (13:11 -0700)]
hsa: fix http server session cleanup

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6832e3f24a56e043415a32eb4072d0bfb7697251

3 years agolisp: fix cli locator-set name null termination 79/28079/4
Florin Coras [Mon, 27 Jul 2020 21:42:10 +0000 (14:42 -0700)]
lisp: fix cli locator-set name null termination

Type: fix

Change-Id: I5f550bd6a03f47b829ef99803cb6b9ac86329450
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agolisp: fix lisp/one enable/disable 78/28078/3
Florin Coras [Mon, 27 Jul 2020 21:26:28 +0000 (14:26 -0700)]
lisp: fix lisp/one enable/disable

Type: fix

Change-Id: Iefe6b3a1a0a999d89ef9812fc14d31159043e60c
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 years agosr: fix prefix_len type parsing 61/27961/3
Benoît Ganne [Fri, 17 Jul 2020 09:44:15 +0000 (11:44 +0200)]
sr: fix prefix_len type parsing

prefix_len is parsed using '%u' format requiring an integer.

Type: fix

Change-Id: I9f31fa60e80d4f45fe456f3fd6c94f123cfc99ea
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobonding lacp: replace slave string with member 17/27917/7
Steven Luong [Wed, 15 Jul 2020 15:44:54 +0000 (08:44 -0700)]
bonding lacp: replace slave string with member

- Replace textual string slave with member except APIs.
- For APIs, mark the existing APIs as deprecated and introduce new APIs
- While introducing sw_bond_interface_dump, add the optional filter by
  sw_if_index and enhance the testcases to make use of it.

Type: improvement

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

3 years agoikev2: fix session re-initiate after SA expires 80/28080/1
Filip Tehlar [Tue, 28 Jul 2020 07:25:08 +0000 (07:25 +0000)]
ikev2: fix session re-initiate after SA expires

Type: fix

Change-Id: Ie3d24b3df02d08fbb74d97f4e5ab0d79c35b0c0d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agonat: limit resource consumption when out of ports 71/28071/2
Klement Sekera [Mon, 27 Jul 2020 12:21:54 +0000 (12:21 +0000)]
nat: limit resource consumption when out of ports

Type: improvement
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I83f44711264376389989152666f3c71216146bdd

3 years agotcp: fix tcp_connection_cleanup() with uninitialized elog 74/28074/3
Ivan Shvedunov [Mon, 27 Jul 2020 16:59:38 +0000 (19:59 +0300)]
tcp: fix tcp_connection_cleanup() with uninitialized elog

This fixes TCP connection cleanup crash when TCP debugging is enabled.
It could happen if session_stream_accept() returned an error.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I0df08969d82bb0f44def81b9e47195bd15502831

3 years agolacp: fix vector overflow 60/27960/2
Benoît Ganne [Fri, 17 Jul 2020 09:42:07 +0000 (11:42 +0200)]
lacp: fix vector overflow

Type: fix

Change-Id: I8f776ce10ee8c29689db5ceef70df42dfb6b747c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agointerface: fix show/clear hardware-interfaces string overflow 56/28056/2
Benoît Ganne [Fri, 24 Jul 2020 07:57:11 +0000 (09:57 +0200)]
interface: fix show/clear hardware-interfaces string overflow

Type: fix

Change-Id: Iab99bc1f6c309fae6eaa714b484274fe7072a4cb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agopci: fix non NULL-terminated vector used as C string overflow 60/28060/2
Benoît Ganne [Fri, 24 Jul 2020 15:04:06 +0000 (17:04 +0200)]
pci: fix non NULL-terminated vector used as C string overflow

Type: fix

Change-Id: Iab512ba8c72c9e20aeba2d4265276bcabf095d46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosession: cleanup lookup table for rejected session 64/28064/3
Florin Coras [Fri, 24 Jul 2020 17:09:07 +0000 (10:09 -0700)]
session: cleanup lookup table for rejected session

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id20f693a5acdee74ab534e9964418973537b977f