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

3 years agotcp: fix synack elog crash 63/28063/2
Florin Coras [Fri, 24 Jul 2020 16:49:46 +0000 (09:49 -0700)]
tcp: fix synack elog crash

The elog track, if enabled, must be initalized before synack is sent.

Type: fix

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

3 years agoikev2: add SA dump API 17/27817/12
jan_cavojsky [Wed, 8 Jul 2020 07:24:12 +0000 (09:24 +0200)]
ikev2: add SA dump API

Type: feature
Ticket: VPP-1897

Change-Id: I0245aceeb344efd29b1f9217c35889a8bbe1f744
Signed-off-by: jan_cavojsky <Jan.Cavojsky@pantheon.tech>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agogeneve: support geneve interface acting as a bvi 86/27586/4
Ole Troan [Wed, 17 Jun 2020 20:57:13 +0000 (22:57 +0200)]
geneve: support geneve interface acting as a bvi

create geneve tunnel local 10.10.10.10 remote 10.10.10.9 vni 48 decap-next node ethernet-input l3-mode
set interface ip address geneve_tunnel0 11.11.11.12/24

Type: feature
Change-Id: I579ce879553d72a2e8048e33d0c0122674996b81
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agodpdk: device_id sorted order for cryptodev 50/28050/3
Vladimir Ratnikov [Thu, 23 Jul 2020 09:11:09 +0000 (05:11 -0400)]
dpdk: device_id sorted order for cryptodev

By default, VPP automatically assignes for each tunnel
next available QAT device by order dev_id-que-pair.
In most cases we have more than one device and it can
greatly increase ipsec perfomance without any actions
with configuration from user  if we use all the
devices first and first que-pairs

Type: feature

Signed-off-by: Vladimir Ratnikov <vratnikov@netgate.com>
Change-Id: Iac9fe74768775459e22f69bb3706b542090a9375

3 years agofeature: fix feature config data initialization overflow 65/27965/2
Benoît Ganne [Fri, 17 Jul 2020 09:54:28 +0000 (11:54 +0200)]
feature: fix feature config data initialization overflow

Copy only exactly the data provided by the user even when it is not a
4-bytes multiple.

Type: fix

Change-Id: I2ef987c37e58523a38b46b09227529db2c26aa55
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoacl: correct acl vat help message 34/28034/2
Lijian.Zhang [Mon, 18 May 2020 12:02:22 +0000 (20:02 +0800)]
acl: correct acl vat help message

"ipv4"/"ipv6" option is not supported in acl_add_replace and
macip_acl_add_replace vat api.
Update its help message per actual api usage.

Type: fix

Change-Id: I8d34fac5f98bd78a46a5e98df05cd35182988dd8
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com>
Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com>
3 years agohsa: proxy session cleanup fixes 41/28041/9
Florin Coras [Wed, 22 Jul 2020 20:34:28 +0000 (13:34 -0700)]
hsa: proxy session cleanup fixes

Type: fix

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

3 years agovppinfra: add *_zero() vector inlines 53/27953/3
Damjan Marion [Thu, 16 Jul 2020 17:19:29 +0000 (19:19 +0200)]
vppinfra: add *_zero() vector inlines

Type: improvement
Change-Id: Ia63d1d7de273967ab7725d83634c0b6dd481c6c0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotcp: track pending timers 52/27952/7
Florin Coras [Thu, 16 Jul 2020 17:05:02 +0000 (10:05 -0700)]
tcp: track pending timers

Also removes delack timer and reuses the u32 for the pending timers
list.

Type: fix
Ticket: VPP-1923

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

3 years agonat: fix port number selection 86/27786/3
Elias Rudberg [Thu, 2 Jul 2020 19:21:34 +0000 (21:21 +0200)]
nat: fix port number selection

Change the port number selection for new NAT sessions so that it
matches how the thread index is calculated from the port number for
out2in packets. Before this change there was a problem when the
largest port number in the range was used, that resulted in the wrong
thread index being selected when out2in packets arrive for that
session.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I936c389eb0d5df6168e18e5e44754de1cdad6ad1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoikev2: add global message length check 73/27973/2
Benoît Ganne [Mon, 20 Jul 2020 12:42:48 +0000 (14:42 +0200)]
ikev2: add global message length check

Type: fix

Change-Id: I3eb51ea4f6c29005b0315cf488fcabb8543dfcd1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovppapigen: missing crcs in user-defined types 77/27677/8
Ole Troan [Thu, 25 Jun 2020 12:27:46 +0000 (14:27 +0200)]
vppapigen: missing crcs in user-defined types

make the change backwards compatible

Change-Id: I379691aa5972f99b2144deda4b7ef9e6ba4af67d
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agovirtio: add the buffer allocation error 39/28039/1
Mohsin Kazmi [Wed, 22 Jul 2020 15:15:10 +0000 (17:15 +0200)]
virtio: add the buffer allocation error

Type: improvement

Change-Id: I991e32d531719693c387db4ef93d04d4b562789d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoipsec: Dedicated IPSec interface type 95/27795/4
Neale Ranns [Tue, 30 Jun 2020 07:47:14 +0000 (07:47 +0000)]
ipsec: Dedicated IPSec interface type

Type: feature

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

3 years agocrypto: bails out early for unsupported key type 58/27958/3
Benoît Ganne [Fri, 17 Jul 2020 09:33:19 +0000 (11:33 +0200)]
crypto: bails out early for unsupported key type

Do not access data structures based on uninitialized key->alg.

Type: fix
Fixes: f539578bac8b64886b57c460c9d74273e6613f8b

Change-Id: I6bfb7e7a51af2c131b8bdf3bca6a38fcf1094760
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agostats: memory leak in stat_validate_counter_vector 67/27967/3
Steven Luong [Fri, 17 Jul 2020 16:09:16 +0000 (09:09 -0700)]
stats: memory leak in stat_validate_counter_vector

Free the existing vectors prior to losing them.

Type: fix
Ticket: VPPSUPP-94

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Ic15f1fbc7a0c6c348065fc9759ee5d5c43013b91
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agoikev2: refactor and test profile dump API 01/27801/4
Filip Tehlar [Mon, 6 Jul 2020 15:40:08 +0000 (15:40 +0000)]
ikev2: refactor and test profile dump API

Type: refactor

Change-Id: I6b8dc68e5d4a452776fbaf5a69fbd7f53a8abb75
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agosr: new messages created to return sl index for segment lists in a sr policy 72/27872/2
Chinmaya Agarwal [Mon, 13 Jul 2020 17:04:12 +0000 (22:34 +0530)]
sr: new messages created to return sl index for segment lists in a sr policy

Type: fix
Signed-off-by: Chinmaya Agarwal <chinmaya.agarwal@hsc.com>
Change-Id: Id43ab583f444e4487085fc686d5faed4858b2e97

3 years agoapi: call api reaper callbacks for socket clients 70/27970/2
Dave Barach [Fri, 17 Jul 2020 21:16:34 +0000 (17:16 -0400)]
api: call api reaper callbacks for socket clients

Add a callback to clear the per-client packet trace buffer cache.

Save the packet trace dump pg setup script.

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

3 years agounittest: keep ASAN happy for non-terminated string tests 64/27964/3
Benoît Ganne [Fri, 17 Jul 2020 09:51:52 +0000 (11:51 +0200)]
unittest: keep ASAN happy for non-terminated string tests

Type: fix

Change-Id: Iae9e84d4297acd54c909d3a8a39adafcd86b0a91
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoabf: mark API as in-progress 36/27636/3
Andrew Yourtchenko [Mon, 22 Jun 2020 12:27:06 +0000 (12:27 +0000)]
abf: mark API as in-progress

As requested by Neale, mark the ABF API as in-progress

Change-Id: I109a32fa54b1f2a882695d9fd71b235fa46bc6f3
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agogbp: mark APIs as in-progress 35/27635/3
Andrew Yourtchenko [Mon, 22 Jun 2020 12:21:19 +0000 (12:21 +0000)]
gbp: mark APIs as in-progress

As per request from Neale, mark the GBP plugin APIs as in-progress.

Type: fix
Change-Id: I679943edcfff0742ee32c45cd8f97f482c353b9f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agol2e: mark API as in-progress 37/27637/2
Andrew Yourtchenko [Mon, 22 Jun 2020 12:24:07 +0000 (12:24 +0000)]
l2e: mark API as in-progress

As requested by Neale, mark the API as in-progress.

Change-Id: Id92cad65c66435e179583507f077816e09e4205b
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agopppoe: fix uninitialized memory bug 46/27946/2
TimotheeChauvin [Thu, 16 Jul 2020 12:27:10 +0000 (12:27 +0000)]
pppoe: fix uninitialized memory bug

In pppoe_cp_node.c, node->errors[error0] was accessed without
node->errors being initialized.

Found with AFL + ASAN.

Type: fix
Signed-off-by: TimotheeChauvin <timchauv@cisco.com>
Change-Id: Ide8a60021b2d47b5e2fce7062d8f12c7f4d225f7

3 years agomisc: add callback hooks and refactor pmc 61/27861/4
Tom Seidenberg [Fri, 10 Jul 2020 15:49:03 +0000 (15:49 +0000)]
misc: add callback hooks and refactor pmc

Callbacks for monitoring and performance measurement:
- Add new callback list type, with context
- Add callbacks for API, CLI, and barrier sync
- Modify node dispatch callback to pass plugin-specific context
- Modify perfmon plugin to keep PMC samples local to the plugin
- Include process nodes in dispatch callback
- Pass dispatch function return value to callback

Type: refactor

Signed-off-by: Tom Seidenberg <tseidenb@cisco.com>
Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22

3 years agodpdk: fix coverity warning in the flow code 92/27792/4
Chenmin Sun [Sun, 5 Jul 2020 18:46:00 +0000 (02:46 +0800)]
dpdk: fix coverity warning in the flow code

CID 211153

Type: fix

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

3 years agovlib: fix asan compilation with gcc 43/27843/2
Benoît Ganne [Thu, 9 Jul 2020 12:23:51 +0000 (14:23 +0200)]
vlib: fix asan compilation with gcc

clang tends to force alignment of all sections when compiling for
address sanitizer, confusing VPP plugin infra.
On the contrary, GCC does not support this attribute on sections.
Selectively enable it depending upon the compiler.

Type: fix
Fixes: cea46522e79637f6ec37c03ec3fbeb87b160a378

Change-Id: I2dd6e52e70e6b4d89c101171cafc813e175ec472
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto: fix coverity issue for cryptodev 96/27096/3
Fan Zhang [Fri, 15 May 2020 07:58:37 +0000 (08:58 +0100)]
crypto: fix coverity issue for cryptodev

- Fixes coverity issue #210160.
- Fixes the possible issue in cryptodev when input node does
  not update mbuf, such as avf-input.
- Fixes GCM ESN packet incorrect tag.
- Code clean up to reduce binary size.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Dariusz Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: Piotr Kleski <piotrx.kleski@intel.com>
Change-Id: Ic05ae29855ac1f7a62e4af5831a4ed9faa8f561a

3 years agovppinfra: fix format_c_identifier vector overflow 43/27943/2
Benoît Ganne [Thu, 16 Jul 2020 10:03:35 +0000 (12:03 +0200)]
vppinfra: fix format_c_identifier vector overflow

In case of vector, we must check length before trying to access element.
Also fix wrong DPDK plugin workaround.

Type: fix

Change-Id: I2ecef1c88ebef2362f48cab0d462699aa43cd4b9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agomisc: add tracedump API plugin 11/27811/8
Dave Barach [Tue, 7 Jul 2020 21:33:38 +0000 (17:33 -0400)]
misc: add tracedump API plugin

Type: feature

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

3 years agoadl: move allow/deny list function to plugin 16/27916/9
Dave Barach [Tue, 14 Jul 2020 22:30:05 +0000 (18:30 -0400)]
adl: move allow/deny list function to plugin

Provide binary API compatibility support for the "cop" APIs until vpp
21.01.

Change the deprecation date in map.api to vpp 21.01.

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

3 years agoip: optimize ip4_header_checksum, take 2 51/27951/2
Damjan Marion [Thu, 16 Jul 2020 14:22:48 +0000 (16:22 +0200)]
ip: optimize ip4_header_checksum, take 2

- add 64-bit version
- remove byte swaps, as they are actually not needed

Type: improvement
Change-Id: Ia1efe54ee80b4ae7633b9ab36b3154c3357006d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoikev2: fix race condition in child_sa update 16/27816/3
Benoît Ganne [Wed, 8 Jul 2020 15:51:23 +0000 (17:51 +0200)]
ikev2: fix race condition in child_sa update

Type: fix

Change-Id: I864d49a641b45337c0a45a0af7d996cad75f6629
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovppinfra: enable STATIC_ASSERT with clang 10/27810/2
Benoît Ganne [Tue, 7 Jul 2020 14:32:22 +0000 (16:32 +0200)]
vppinfra: enable STATIC_ASSERT with clang

For some reason clang does not support &((struct foo*)0)->field in
static assertion contrary to gcc.
Use offsetof() macro implementation provided by both compilers instead.

Type: fix

Change-Id: I3311cdd29c5861e45dc0ef92f2bbd66242ca73b8
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoip: optimize ip4_header_checksum 20/27920/2
Damjan Marion [Wed, 15 Jul 2020 22:48:55 +0000 (00:48 +0200)]
ip: optimize ip4_header_checksum

Type: improvement
Change-Id: I67bacb90a3dd8a9bd7beb4975ad0fe344675b65f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agogre: fix outer ip6 length 21/27921/3
Aloys Augustin [Thu, 16 Jul 2020 09:01:01 +0000 (11:01 +0200)]
gre: fix outer ip6 length

This updates the computation of the outer ip6 header payload_length
field in order to take into account the GRE header length.

Change-Id: Ie9f982521aeaef7279a9e329a33272d6fae0a428
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
3 years agovppinfra: more vector inlines 19/27919/1
Damjan Marion [Wed, 15 Jul 2020 18:18:39 +0000 (20:18 +0200)]
vppinfra: more vector inlines

Type: improvement
Change-Id: Ie0de374b89ec3a17befecf3f08e94951597609ec
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: add prefetching to in2out_ed/out2in_ed 77/27877/3
Klement Sekera [Mon, 13 Jul 2020 13:59:33 +0000 (13:59 +0000)]
nat: add prefetching to in2out_ed/out2in_ed

This saves about 20 clocks/packet in both code paths.

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

3 years agoikev2: add support for AES-GCM cipher in IKE 08/27908/3
Filip Tehlar [Wed, 8 Jul 2020 13:25:34 +0000 (13:25 +0000)]
ikev2: add support for AES-GCM cipher in IKE

Type: feature
Ticket: VPP-1920

Change-Id: I6e30f3594cb30553f3ca5a35e0a4f679325aacec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agovirtio: fix the msix for multiqueue 44/27844/7
Mohsin Kazmi [Wed, 15 Jul 2020 11:54:10 +0000 (11:54 +0000)]
virtio: fix the msix for multiqueue

Type: fix

Change-Id: Ie0cff37b474f8d85a3ae376e0f547a347fb1ad8a
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoikev2: API downgrade due to lack of ikev2 tests 98/27598/4
Filip Tehlar [Thu, 18 Jun 2020 04:18:15 +0000 (04:18 +0000)]
ikev2: API downgrade due to lack of ikev2 tests

Type: refactor

Change-Id: Ic7ddad20088e069887f81721cceb21f4902e8907
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoip: fix format_ip6_address_and_mask() bug 63/27863/2
Chenmin Sun [Sun, 12 Jul 2020 00:08:36 +0000 (08:08 +0800)]
ip: fix format_ip6_address_and_mask() bug

Previously there's a format_ip4_address in format_ip6...
This patch fixes this typo

Type: fix

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

3 years agohsa: set connected mode for echo_server app in udp mode. 27/27627/9
jiangxiaoming [Mon, 22 Jun 2020 01:18:04 +0000 (09:18 +0800)]
hsa: set connected mode for echo_server app in udp mode.

Type: fix

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

3 years agosession: fix application_lookup_name fail due to app_by_name default hash type wrong 68/27868/5
jiangxiaoming [Mon, 13 Jul 2020 08:21:33 +0000 (16:21 +0800)]
session: fix application_lookup_name fail due to app_by_name default hash type wrong

Type: fix

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

3 years agosession: reduce verbosity on fifo alloc failure 78/27878/2
Florin Coras [Mon, 13 Jul 2020 15:52:53 +0000 (08:52 -0700)]
session: reduce verbosity on fifo alloc failure

Also fix session test app name registrations

Type: improvement

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

3 years agodpdk: add txq struct and fix dpdk tx lock 07/27807/3
Benoît Ganne [Tue, 7 Jul 2020 11:29:16 +0000 (13:29 +0200)]
dpdk: add txq struct and fix dpdk tx lock

This introduces a txq structure mirroring the rxq structure.
This fixes the case when #txq > #rxq, because lock must be per txq.

Type: fix
Fixes: dfb19cabe20ccf1cbd1aa714f493ccd322839b91

Change-Id: Ic1bce64d2b08b9a98c8242a1ba1bfcdbda322bec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosession: fix ct listener cleanup 12/27812/1
Florin Coras [Wed, 8 Jul 2020 00:57:28 +0000 (17:57 -0700)]
session: fix ct listener cleanup

Type: fix

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

3 years agotcp: round down rcv wnd even if avoiding retraction 99/27799/4
Florin Coras [Mon, 6 Jul 2020 15:06:54 +0000 (08:06 -0700)]
tcp: round down rcv wnd even if avoiding retraction

Type: improvement

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

3 years agotap: fix the tun sndbuf value for kernel 4.20 and later 03/27803/3
Mohsin Kazmi [Mon, 6 Jul 2020 18:03:41 +0000 (18:03 +0000)]
tap: fix the tun sndbuf value for kernel 4.20 and later

Type: fix

From kernel 4.20, xdp support has been added in tun_sendmsg.
If sndbuf == INT_MAX, kernel executes xdp data path
for tun driver which assumes packets are ethernet frames.
This patch is avoiding the xdp data path in kernel by setting
the sendbuf value < INT_MAX.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ia4aa54b177b96d56a2d513d18d26ca01d5b88929