vpp.git
14 months agoipsec: fix AES CBC IV generation (CVE-2022-46397) 59/38159/1 stable/2005
Benoît Ganne [Tue, 18 Jan 2022 14:56:41 +0000 (15:56 +0100)]
ipsec: fix AES CBC IV generation (CVE-2022-46397)

For AES-CBC, the IV must be unpredictable (see NIST SP800-38a Appendix
C). Chaining IVs like is done by ipsecmb and native backends for the
VNET_CRYPTO_OP_FLAG_INIT_IV is fully predictable.
Encrypt a counter as part of the message, making the (predictable)
counter-generated IV unpredictable.

Fixes: VPP-2037
Type: fix

Change-Id: If4f192d62bf97dda553e7573331c75efa11822ae
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: touch files when extracting rpm tarballs 96/28996/1
Dave Wallace [Wed, 16 Sep 2020 21:04:24 +0000 (21:04 +0000)]
build: touch files when extracting rpm tarballs

Type: fix

- Long story short, intermittently centos jobs have been
  failing with clock skew issues. When someone commits a
  patch on a machine with the date ahead of UTC, then clock
  skew will be encountered when extracting the RPM source
  tarball. See [0] and [1] for details.

- Replace 'make bootstrap' with 'make install-dep' in
  RPM package build specfile.

[0] https://unix.stackexchange.com/questions/164807/does-git-archive-use-the-wrong-file-timestamp
[1] https://git.fd.io/vpp/tree/Makefile#n380

Change-Id: Iebfb9eb2e26c1f2e4488e871da86d0c60b9f4048
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 27b50fea143f2d45613ef982870cd2052e21fb0f)

3 years agomisc: 19.08.3 Release Notes 99/28699/1
Andrew Yourtchenko [Mon, 7 Sep 2020 18:09:41 +0000 (18:09 +0000)]
misc: 19.08.3 Release Notes

Also remove the duplicate 17.07.1 section

Change-Id: I809f417fabea96df506886ae6576b6e8c1b72caf
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agoipsec: fix esp padding 36/28536/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 agovcl: fix epoll timeout 35/28135/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
(cherry picked from commit 0edfb1a06ed093c5ed82be34b42b8cacc3ac0ff8)

3 years agobuild: Fix 'make install-deps' errors on aarch64 CentOS 7 22/28122/1
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>
(cherry picked from commit 81b95c1fe2ece45ee2a5d895631b608733384182)

3 years agostats: memory leak in stat_validate_counter_vector 32/27932/1
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>
(cherry picked from commit e29fb5bf1b9ab87f4213d990377ea2604990135b)

3 years agomisc: 20.05.1 Release Notes 18/27918/2 v20.05.1
Andrew Yourtchenko [Wed, 15 Jul 2020 17:18:45 +0000 (17:18 +0000)]
misc: 20.05.1 Release Notes

Change-Id: Ib77b5928ba0db64ffe747f3b9a9f1248cc239b2a
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agovirtio: fix the msix for multiqueue 01/27901/3
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>
(cherry picked from commit 8046fdc10b14fd161ee81d0a25cfa79793ef698b)

3 years agomisc: ipfix-export unformat u16 collector_port fix 00/27900/2
Elias Rudberg [Tue, 26 May 2020 23:03:46 +0000 (01:03 +0200)]
misc: ipfix-export unformat u16 collector_port fix

Use %U and unformat_udp_port instead of %u for unformat() call for
u16 collector_port number in set_ipfix_exporter_command_fn() to
avoid corruption of other variables which can happen if unformat()
with %u is used with a 16-bit variable. This avoids crash due to
corrupted fib_index value.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: Id54273fcc458a7f9c5aa4025aa91711f160c1c1a
(cherry picked from commit 2dca180db989ea7afacdf4e70cc85e4408557382)

3 years agonat: fix regarding vm arg for vlib_time_now call 99/27899/2
Elias Rudberg [Wed, 27 May 2020 00:15:53 +0000 (02:15 +0200)]
nat: fix regarding vm arg for vlib_time_now call

Change in snat_ipfix_header_create() to use thread-specific
vlib_main_t *vm pointer to avoid problems with different threads
accessing the same vlib_main_t data structure. This avoids
assertion failure when vlib_time_now() is called with a vm
corresponding to a different thread.

Type: fix

Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
Change-Id: I2096c1debb5688d3b97e5ed9a0ea78d94053d8b7
(cherry picked from commit 5556813fb63d28240a17ccf18f947e60c4cbb263)

3 years agosr: fix for SID index across segment lists within a sr policy 97/27897/1
Chinmaya Agarwal [Tue, 23 Jun 2020 12:38:23 +0000 (12:38 +0000)]
sr: fix for SID index across segment lists within a sr policy

Type: fix
Signed-off-by: Chinmaya Agarwal <chinmaya.agarwal@hsc.com>
Change-Id: I9aa5456bf94356e8702fbfd39b14db4c2e74d3e6
(cherry picked from commit edc2ea435b5c407a78f4fcb42d750338d6cdd6d5)

3 years agotap: fix dump for TUN interfaces 69/27769/3
Mohsin Kazmi [Tue, 30 Jun 2020 13:28:01 +0000 (15:28 +0200)]
tap: fix dump for TUN interfaces

Type: fix

Change-Id: I3bcc8ff1cf0a828ce3ba112694d38e3287d38d8d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit 86f281a841b5ec67c6a440dfc691e4c42b883df9)

3 years agotap: fix the tun sndbuf value for kernel 4.20 and later 73/27773/2
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
(cherry picked from commit 4834a66b7b3ef73e486c40ea9d8e36cc2e09c473)

3 years agotap: remove the bridge configurations for TUN interface 91/27691/3
Mohsin Kazmi [Fri, 26 Jun 2020 13:47:21 +0000 (13:47 +0000)]
tap: remove the bridge configurations for TUN interface

Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ifeae641ec0aa7de74e33e582234505bf6e28ca87
(cherry picked from commit add4a412d1f5271be21f99fe15a93cb73c38b833)

3 years agogso: fix the l2 path 93/27693/2
Mohsin Kazmi [Wed, 24 Jun 2020 14:20:54 +0000 (16:20 +0200)]
gso: fix the l2 path

Type: fix

Change-Id: I4f91175444dec9800d651aa5a5e0472359de63d1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit ec1d61efe6d01a1a687f39e57a601ac693833b07)

3 years agotests: fix deps pinning / patching 92/27692/1
Aloys Augustin [Wed, 24 Jun 2020 09:33:20 +0000 (11:33 +0200)]
tests: fix deps pinning / patching

This ensures we don't recompute the requirements-{2,3}.txt on each make
test run, and skips patching scapy if it is already patched instead of
failing.

Change-Id: I3da57182ae49f3dd04db139d96734a5d145fedff
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
(cherry picked from commit 8eca60df745b7656b96db16e75b0deda66bfc515)

3 years agol2: L2/L3 mode swicth cleanup and l2-patch fix 33/27433/2
John Lo [Thu, 14 May 2020 19:02:16 +0000 (15:02 -0400)]
l2: L2/L3 mode swicth cleanup and l2-patch fix

Cleanup L2/L3 mode switch to not redirect to/from ethernet-input node
as it is no longer necessary.
L2 patch should use sw_if_index for device feature enable/disable.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I0f24161d027b07c188fd1e05276146f94c075710
(cherry picked from commit f415a3b53a51b261d08cc3312c25f250d6bc1bd6)

3 years agovppinfra: refactor mpcap.h 28/27428/2
Dave Barach [Tue, 19 May 2020 13:56:22 +0000 (09:56 -0400)]
vppinfra: refactor mpcap.h

vppinfra source files MUST NOT #include <vlib/vlib.h>, <vnet/vnet.h>
or similar. Move mpcap_add_packet(...), mpcap_add_buffer(...) to a new
file: src/vnet/mpcap.h.

Type: refactor
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Id517aef6fe49b618f853ce32940b91ba45a1e60d
(cherry picked from commit 2a41919e39d4672f76a654f30be9c2093cef4fad)

3 years agonat: update ip4-udp src port for checksum == 0 pkts 27/27427/2
Dave Barach [Fri, 29 May 2020 20:34:50 +0000 (16:34 -0400)]
nat: update ip4-udp src port for checksum == 0 pkts

Otherwise, the out2in path will discard return-path traffic with
probability 1.0.

Type: fix
Fixes: gerrit 23963 / f126e746fc01c75bc99329d10ce9127b26b23814

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I621ed99329c04ef358035747dde599c0016b58f5
(cherry picked from commit 63c672c440d92cc570c587254afb4167617ec0b7)

3 years agovcl: support connected udp listens 32/27432/1
Florin Coras [Sat, 16 May 2020 18:18:14 +0000 (18:18 +0000)]
vcl: support connected udp listens

Request connected udp listener behavior by setting
VPPCOM_ATTR_SET_CONNECTED attribute with vppcom_session_attr

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba95155c0f41cea8c6e1a4263946270d49c213ac
(cherry picked from commit 1e96617d952e2d5d8cc367a226702f8f825ed039)

3 years agolisp: fix api_format reference 26/27426/1
Paul Vinciguerra [Fri, 29 May 2020 23:01:18 +0000 (19:01 -0400)]
lisp: fix api_format reference

Type: fix
Ticket: VPP-1885

Change-Id: I474fffd4d36f439a19d475a8cb20171ca88274ec
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 353535bb4856d8ee6d818a3c75b8b576b9967ee4)

3 years agogso: fix flag for inner header 62/27362/2
Mohsin Kazmi [Thu, 28 May 2020 18:56:43 +0000 (20:56 +0200)]
gso: fix flag for inner header

Type: fix

Change-Id: Ic3fc488521636f7f7c9402a20db45fdb599adaae
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
(cherry picked from commit be03b5c15598131355da91967d05321c15fa1f24)

3 years agolisp: fix api_format 65/27365/2
Florin Coras [Fri, 29 May 2020 16:18:57 +0000 (16:18 +0000)]
lisp: fix api_format

Type: fix
Ticket: VPP-1885
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6431e49b315e09490fed8fd70ac53872836c6a09
(cherry picked from commit f3c1e4b61269cd93302073a631a2549f1aeb24d9)

3 years agovcl: fix udp connected check 63/27363/2
Florin Coras [Mon, 25 May 2020 18:17:03 +0000 (18:17 +0000)]
vcl: fix udp connected check

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I83dafe10cdc78fbb9a751f32155cd84d281b12d9
(cherry picked from commit a4dac8af0eb4271db0c528a00beca58f41b51c95)

3 years agolisp: fix custom dump 64/27364/2
Florin Coras [Thu, 28 May 2020 18:01:26 +0000 (18:01 +0000)]
lisp: fix custom dump

Type: fix
Ticket: VPP-1886
Fixes: 58db6e1

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic40018a756e57bfec05ffbc5e30d18f4feb315db
(cherry picked from commit 9b72b153d85d0e3e0ca218bcf1564805424b64b9)

3 years agofib: Safe adj walk 21/27321/3
Neale Ranns [Fri, 29 May 2020 14:19:41 +0000 (10:19 -0400)]
fib: Safe adj walk

Type: fix

the hash walk does not give the same guarantees as the bihash so
walk in a safe manner.

Change-Id: Idfe48c3a84ab3a341d887f7d196bc81ba34ae8b0
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 22391fa92b95ee0376eb372450d6315523c8a9ae)

3 years agoethernet: fix DMAC check and skip unnecessary ones (VPP-1868) 11/27311/2
John Lo [Wed, 13 May 2020 02:34:39 +0000 (22:34 -0400)]
ethernet: fix DMAC check and skip unnecessary ones (VPP-1868)

Fix and optimize DMAC check in ethernet-input node to utilize NIC or
driver which support L3 DMAC-filtering mode so that DMAC check can be
bypassed safely for interfaces/sub-interfaces in L3 mode.
Checking of interface in L3-DMAC-filtering state to avoid DMAC check
require the following:
a) Fix interface driver init sequence for devices which supports L3
   DMAC-filtering to indicate its capability and initialize interface
   to L3 DMAC-filtering state.
b) Fix ethernet_set_flags() function and its associated callback
   flags_change() functions registered by various drivers in interface
   infra to provide proper L3 DMAC filtering status.
Maintain interface/sub-interface L3 config count so DMAC checks can be
bypassed if L3 forwarding is not setup on any main/sub-interfaces.

Type: fix
Ticket: VPP-1868

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I204d90459c13e9e486cfcba4e64e3d479bc9f2ae
(cherry picked from commit 4a302ee7c75f3d4fd1a73a9d1f6c34b3bde8d620)

3 years agomisc: 20.05 Release Notes 28/27128/5 v20.05
Andrew Yourtchenko [Mon, 18 May 2020 15:04:47 +0000 (15:04 +0000)]
misc: 20.05 Release Notes

Change-Id: If68e419b00f8961c814727713f989fd0d72f6f1b
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agovppinfra: fix SIGBUS in bihash init when running unpriviledged, take two 07/27307/2
Damjan Marion [Wed, 27 May 2020 14:43:35 +0000 (16:43 +0200)]
vppinfra: fix SIGBUS in bihash init when running unpriviledged, take two

Looks like MAP_LOCK is not enough, so call mlock(...) instead....

Type: fix
Change-Id: I1bc668a2bf3c861ca1c2d376c0fb6bfea87d4f48
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agofib: IPv6 lookup data structure MP safe when prefixes change (VPP-1881) 55/27255/5
Neale Ranns [Tue, 26 May 2020 13:12:17 +0000 (13:12 +0000)]
fib: IPv6 lookup data structure MP safe when prefixes change (VPP-1881)

Type: fix

adding routes should be MP safe. When new prefixes with differrent
prefix lengths are added, adjust the sorted list in an MP safe way.

Change-Id: Ib73a3c84d01eb86d17f8e79ea2bd2505dd9afb3d
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agoipsec: Add/Del IPSec SA is not MP safe 06/27306/1
Neale Ranns [Wed, 27 May 2020 15:17:24 +0000 (15:17 +0000)]
ipsec: Add/Del IPSec SA is not MP safe

Type: fix

we can probably do better, but for now this is needed

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

3 years agovcl: fix ldp fcntl64 58/27258/2
Florin Coras [Tue, 26 May 2020 19:45:45 +0000 (19:45 +0000)]
vcl: fix ldp fcntl64

Type: fix
Ticket: VPP-1882

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I342d8f928fcc7de74f9bd288c1a5d63ea1f90020
(cherry picked from commit 0ab36f55753d3d1417c41f8a3aec5e79a882555c)

3 years agomisc: Avoid sample.md from in the VPP docs, clean up the extraneous copy 03/27203/2
Andrew Yourtchenko [Thu, 21 May 2020 17:05:41 +0000 (17:05 +0000)]
misc: Avoid sample.md from in the VPP docs, clean up the extraneous copy

I had cleaned up the sample.md previously for 20.01, but when later
that was merged to master, the file was renamed. So, fix this issue.

Change-Id: I6347685af216901fbfdd445606735b9bf79f8fe5
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agofib: Fix interpose source reactivate 54/27254/2
Neale Ranns [Tue, 26 May 2020 08:52:55 +0000 (08:52 +0000)]
fib: Fix interpose source reactivate

Type: fix

when the interpose is on an adj-fib and the cover is removed the adj
source will not install. this lead to no path list being found for the
interpose source and a crash. pick a drop path list in this case.

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

3 years agofib: Use basic hash for adjacency neighbour table (VPP-1877) 53/27253/2
Neale Ranns [Mon, 25 May 2020 09:09:36 +0000 (09:09 +0000)]
fib: Use basic hash for adjacency neighbour table (VPP-1877)

Type: improvement

a bihash per-interface used too much memory.

Change-Id: I447bb66c0907e1632fa5d886a3600e518663c39e
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 20aec3db441074ee5a861a40d6e02fad2f3dcb37)

3 years agoipsec: DES/3DES fixing the iv_len for openssl crypto 47/27247/2
Rajesh Goel [Tue, 26 May 2020 06:34:18 +0000 (12:04 +0530)]
ipsec: DES/3DES fixing the iv_len for openssl crypto

Type: fix

Signed-off-by: Rajesh Goel <rajegoel@cisco.com>
Change-Id: I8d128598b4c872f19b64c779c19b5908ba2f2c08
(cherry picked from commit d1d90f5951df93625594f1904cddd95880838ff0)

3 years agovcl: do not propagate epoll events if session closed 46/27246/2
Florin Coras [Tue, 26 May 2020 00:47:52 +0000 (00:47 +0000)]
vcl: do not propagate epoll events if session closed

Type: fix
Ticket: VPP-1880

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

3 years agotcp: fix sack block validation on wrap 45/27245/1
Florin Coras [Mon, 25 May 2020 19:15:56 +0000 (19:15 +0000)]
tcp: fix sack block validation on wrap

Type: fix
Fixes: 487507f
Ticket: VPP-1879

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia9813ae09d14111dc8edac0fa6ab082e13ab6e2e
(cherry picked from commit 3b9540966f877ae67d374cab334c31bd6e3f8c8b)

3 years agovppinfra: fix SIGBUS in bihash init when running unpriviledged 44/27244/2
Damjan Marion [Sun, 24 May 2020 18:43:10 +0000 (20:43 +0200)]
vppinfra: fix SIGBUS in bihash init when running unpriviledged

Obserbed when VPP is running in k8s container

Type: fix
Change-Id: Ibbff9c3921bd7f4f97d47cb6f10eed8ed5efe269
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoipsec: fixed chaining ops after add footer and icv 42/27242/2
PiotrX Kleski [Tue, 5 May 2020 12:14:22 +0000 (14:14 +0200)]
ipsec: fixed chaining ops after add footer and icv

In case there is no free space in first buffer for ICV and footer,
additional buffer will be added, but esp_encrypt will stay in single
buffer mode.
The issue happens for the following payload sizes:
 - TCP packets with payload 1992
 - ICMP packets with payload 2004

This fix moves the single/chained buffer ops selection to after
esp_add_footer_and_icv call.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Change-Id: Ic5ceba418f738933f96edb3e489ca2d149033b79
(cherry picked from commit fdca4dd1a1a817e65bf44e435261d893fc0c51d6)

3 years agosrv6-mobile: Update the doc of 20.05 for gtp4.dt and gtp6.dt funcitons. 17/27217/3
Satoru Matsushima [Mon, 18 May 2020 08:33:57 +0000 (17:33 +0900)]
srv6-mobile: Update the doc of 20.05 for gtp4.dt and gtp6.dt funcitons.

Document update to reflect merged SRv6 functions into 20.05 of lookup and forwarding for inner IP packet encapsulated with outer IP and GTP-U headers.

Type: docs

Signed-off-by: Satoru Matsushima <satoru.matsushima@gmail.com>
Change-Id: I85c9ddf6bf9fa63f2b8b6e03eff3ecec1e7615ab

3 years agoip: Dual loop error in midchain chksum 53/27153/1
Neale Ranns [Wed, 20 May 2020 19:58:20 +0000 (19:58 +0000)]
ip: Dual loop error in midchain chksum

Type: fix

Change-Id: Idf7c80b7d81f796bd0512bca4276bcfcf2af241a
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit fc74697ed3b45499027b272332af786e8e7917bb)

3 years agonat: fix segv if out of ports in ed mode 84/27084/2 v20.05-rc2
Alexander Chernavin [Thu, 14 May 2020 07:35:47 +0000 (03:35 -0400)]
nat: fix segv if out of ports in ed mode

Type: fix
Ticket: VPP-1870
Change-Id: Ife726d2f6baaa3516c209011183f39670cf6a55d
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 88120824acc299a0aec17ce4c208dbc8be394779)

3 years agoip: fix interface ip address del sw_if_index check 70/27070/2
yedg [Thu, 14 May 2020 02:51:53 +0000 (10:51 +0800)]
ip: fix interface ip address del sw_if_index check

Type: fix

Signed-off-by: Ye donggang <yedg@wangsu.com>
Change-Id: Ia9f72ff2be455ecd4ff3d16e884c5a50f9df69fe
(cherry picked from commit dbd366b239c0506b0d9984e7481967e038f10a23)

3 years agodocs: asan: update doc to match current status 51/27151/1
Benoît Ganne [Mon, 11 May 2020 13:53:54 +0000 (15:53 +0200)]
docs: asan: update doc to match current status

Type: docs

Change-Id: I45265876c9c778f6b91d39f30eb6035f14d166ec
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit ca86c95a3413214110a03b001d45d018385b92dc)

3 years agodpdk: fix pktmbuf pool private data init 46/27146/1
Benoît Ganne [Tue, 19 May 2020 12:15:41 +0000 (14:15 +0200)]
dpdk: fix pktmbuf pool private data init

Type: fix

Change-Id: I7349840af48eec209532dab43a8ad0bd68993268
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit c32a84c70efb45081568fc8aa5fa1884d74865fe)

3 years agolisp: API doc/comments cleanup 45/27145/2
Onong Tayeng [Wed, 13 May 2020 15:55:57 +0000 (21:25 +0530)]
lisp: API doc/comments cleanup

Removing the comments around eid_type which seem to have been overlooked
by the original patch https://gerrit.fd.io/r/c/vpp/+/24663.

NOTE: This patch is a doc-only change. It does two things:
    1. Remove comments around obsolete eid_type type
    2. Update the comments to reflect the new vl_api_eid_t type

This is to ensure correct documentation is displayed to user/reader of
VPP docs in 20.05.

Type: fix

Signed-off-by: Onong Tayeng <otayeng@cisco.com>
Change-Id: I48e1993cf8869cb32e159d1956f3ec1e5943e33f
(cherry picked from commit 4ab5190eb4167ac4c06cd649ec8a860784ab1d41)

3 years agointerface: fix interface rx mode config API 43/27143/1
Jakub Grajciar [Tue, 5 May 2020 10:30:30 +0000 (12:30 +0200)]
interface: fix interface rx mode config API

Swap byte order for fields of type vl_api_rx_mode_t.

Ticket: VPP-1871
Type: fix

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ia1745257b57209d41661d38067e0dd7618f9a9b9
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
(cherry picked from commit aefcd1a3579ec2c93f606b151d563d87ea211387)

3 years agovcl: remove udpc transport 79/27079/2
Florin Coras [Fri, 15 May 2020 21:23:58 +0000 (21:23 +0000)]
vcl: remove udpc transport

Type: refactor
Ticket: VPP-1875

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I145ff3301f168973c4f7f32c337bbcac47900705
(cherry picked from commit 3ca663e743dda703e76d8493a0c5cf13d7004c63)

3 years agotcp: fix bogus time update due to missing cast 73/27073/3
Florin Coras [Thu, 14 May 2020 00:30:18 +0000 (00:30 +0000)]
tcp: fix bogus time update due to missing cast

Type: fix
Ticket: VPP-1874

Seems clang needs explicit casting to u64 of u64 and f64 multiplication
before truncating to u32

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib0d7a33d4c5e68577e401e854fc3e55e0723da93
(cherry picked from commit 17b5c3d6ab83a597e7c79613041f2fd7470825bd)

3 years agovcl svm: fix rx event loss 74/27074/2
hanlin [Mon, 11 May 2020 14:20:37 +0000 (22:20 +0800)]
vcl svm: fix rx event loss

When vcl_epoll_wait_handle_mq handles rx events exceeding maxevents, VPP will not signal because cursize > 0, and the remaining rx events cannot be triggered because the eventfd event has been read. Therefore, we should dequeue all events until cursize = 0. And then handle msg up to maxevents with vcl_epoll_wait_handle_mq_event and those beyond with vcl_handle_mq_event.

Type: fix
Ticket: VPP-1873
Signed-off-by: hanlin <hanlin_wang@163.com>
Change-Id: I8a0c87cb41c837deb8284b40f668cc3c7d9d6e56
Signed-off-by: hanlin <hanlin_wang@163.com>
(cherry picked from commit d0e646f6892e9c85278c9538760a8940c86dcdbb)

3 years agodocs: Add link to 20.05 test framework docs 50/27050/1
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>
3 years agodocs: Initial changes for stable/2005 branch 49/27049/1 v20.05-rc1
Andrew Yourtchenko [Wed, 13 May 2020 19:10:23 +0000 (19:10 +0000)]
docs: Initial changes for stable/2005 branch

This patch adds an entry for the defaultbranch
    in .gitreview

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

3 years agosr: fix srv6/srv6-ad/srv6-as promisc mode switch 29/27029/3
John Lo [Wed, 13 May 2020 05:38:12 +0000 (01:38 -0400)]
sr: fix srv6/srv6-ad/srv6-as promisc mode switch

Calling ethernet_set_flags() to switch interface to/from promiscuous
mode must use use hw_if_index instead of sw_if_index.

Type: fix

Signed-off-by: John Lo <loj@cisco.com>
Change-Id: I72da286b913893227e32193ee11fbbc56e04804d

3 years agogso: remove ordering dependency on esp-encrypt-tun 78/26978/2
Neale Ranns [Mon, 11 May 2020 15:24:39 +0000 (15:24 +0000)]
gso: remove ordering dependency on esp-encrypt-tun

Type: fix

... it's not a feature anymore

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

3 years agonat: fix broken build 37/27037/1
Klement Sekera [Wed, 13 May 2020 12:34:21 +0000 (12:34 +0000)]
nat: fix broken build

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

3 years agonat: fix LRU blocked by inactive session 69/26869/11
Klement Sekera [Mon, 4 May 2020 09:56:58 +0000 (09:56 +0000)]
nat: fix LRU blocked by inactive session

This fixes a situation where long-lived inactive session blocks LRU
list. Solution is to have multiple LRU lists based on session type.
This helps because session timeout is same for all sessions of same
type.

Type: fix

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

3 years agonat: perf improvement - replace branchy code 71/26971/6
Klement Sekera [Mon, 11 May 2020 08:58:05 +0000 (08:58 +0000)]
nat: perf improvement - replace branchy code

Use a lookup table instead.

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

3 years agodpdk: DPDK 20.05 iavf fdir bug-fix patch cherry pick 20/27020/3
Chenmin Sun [Tue, 12 May 2020 23:04:06 +0000 (07:04 +0800)]
dpdk: DPDK 20.05 iavf fdir bug-fix patch cherry pick

After VF reset, FDIR rule still takes effect. To solve the issue,
this patch adds to flush all flows before flow uninit. VIRTCHNL
sends message to PF by Admin Queue, so flow flush should be implemented
before Admin Queue shut down.

Type: fix

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

3 years agointerface: fix the checksum offload in quad loop 84/26884/5
Mohsin Kazmi [Tue, 5 May 2020 12:30:25 +0000 (14:30 +0200)]
interface: fix the checksum offload in quad loop

Type: fix

In quad loop, checksum will be calculated for all four packets,
if one packet needs checksum computation, without respecting their
respective flags. This patch fixes it.

Change-Id: I479b420ba0dcbd178ea4180bf05a0e55a6b13843
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agofeature: Config end nodes are user specific 06/27006/4
Neale Ranns [Tue, 12 May 2020 08:51:02 +0000 (08:51 +0000)]
feature: Config end nodes are user specific

Type: fix

it is possible for a user to change the end node of a feature arc, but
this change should only apply to that 'instnace' of the arc, not all
arcs. for example, if a tunnel has its ipx-output end node changed to
adj-midchain-tx, this shouldn't affect all ipx-output arcs. obviously...

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

3 years agobonding: fix the GSO flags 15/27015/3
Mohsin Kazmi [Tue, 12 May 2020 12:28:13 +0000 (14:28 +0200)]
bonding: fix the GSO flags

Type: fix

Only add GSO and Checksum offload flags when gso is
enabled.

Change-Id: I58945a4ffbb9a0e6a8640fc01424c63feef16306
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoipsec: Support 4o6 and 6o4 for SPD tunnel mode SAs 19/27019/4
Neale Ranns [Tue, 12 May 2020 13:33:56 +0000 (13:33 +0000)]
ipsec: Support 4o6 and 6o4 for SPD tunnel mode SAs

Type: feature

the es4-encrypt and esp6-encrypt nodes need to be siblings so they both have the same edges for the DPO on which the tunnel mode SA stacks.

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

3 years agonat: handoff next node feature fix 17/27017/6
Filip Varga [Tue, 12 May 2020 11:42:45 +0000 (13:42 +0200)]
nat: handoff next node feature fix

Type: fix

Change-Id: I14e323e7bb1db7a3d40668212535c07504374e59
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agoikev2: fix removing of expired SAs 24/27024/2
Filip Tehlar [Sat, 9 May 2020 03:32:28 +0000 (03:32 +0000)]
ikev2: fix removing of expired SAs

Type: fix

Change-Id: Idf9b0ffb4e3a0113bece80d1195192bdf46feb89
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agomisc: remove useless assignment 26/27026/1
Dave Barach [Tue, 12 May 2020 20:43:10 +0000 (16:43 -0400)]
misc: remove useless assignment

Type: fix

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

3 years agoapi: use malloc for rx thread arg instead of heap 02/27002/6
Florin Coras [Mon, 11 May 2020 18:03:40 +0000 (18:03 +0000)]
api: use malloc for rx thread arg instead of heap

Type: fix

Avoids issues if thread with non-zero __os_thread_index attaches to
binary api.

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

3 years agovcl: de-init vcl on destroy 81/26981/6
Florin Coras [Mon, 11 May 2020 17:19:31 +0000 (17:19 +0000)]
vcl: de-init vcl on destroy

Type: fix

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

3 years agotcp: avoid rcv wnd less than mss 59/26959/5
Florin Coras [Fri, 8 May 2020 16:23:38 +0000 (16:23 +0000)]
tcp: avoid rcv wnd less than mss

Type: fix

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

3 years agolacp: missing endian conversions for trace packet format 35/26935/2
Steven Luong [Wed, 6 May 2020 23:58:02 +0000 (16:58 -0700)]
lacp: missing endian conversions for trace packet format

Fix a couple endian conversions for displaying Marker Protocol packet
in the trace

Type: fix

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

3 years agocrypto-native: properly deal with broken or outdated toolchains 72/26972/2
Damjan Marion [Mon, 11 May 2020 12:03:29 +0000 (14:03 +0200)]
crypto-native: properly deal with broken or outdated toolchains

Avoids crash due to missing symbol, when build system detects toolchain
which is not able to produce binaries for all targets we need....

Type: fix

Change-Id: I77ee63cb8dca3c9e4e83a6235c60f1439a472444
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: fix u64 error counter cli printing 79/26979/2
Florin Coras [Mon, 11 May 2020 15:31:20 +0000 (15:31 +0000)]
vlib: fix u64 error counter cli printing

Type: fix

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

3 years agoip-neighbor: fix show ip neighbor issue 57/26957/2
Michael Yu [Fri, 8 May 2020 08:42:58 +0000 (16:42 +0800)]
ip-neighbor: fix show ip neighbor issue

Fix the issue that vppctl show ip4{6} neighbor [interface] command can't
show entries correctly, example: both ip4 and ip6 entries can be shown
with command:
vppctl show ip4 neighbor.

Type: fix

Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
Change-Id: I229368b71cd285adce994c8290cc9d7e4c4f5aa6
Signed-off-by: Michael Yu <michael.a.yu@nokia-sbell.com>
3 years agoethernet: fix dmac stride error 61/26961/3
Zhiyong Yang [Sat, 9 May 2020 07:13:34 +0000 (07:13 +0000)]
ethernet: fix dmac stride error

Type: fix

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Change-Id: I617fb365def22a28d48f75013dea38f8e1703a44

3 years agovppapigen: api crc checker 81/26881/16
Ole Troan [Tue, 5 May 2020 10:23:47 +0000 (12:23 +0200)]
vppapigen: api crc checker

crcchecker is a tool for enforcement of the binary API.

1. Production APIs should never change.
2. An API can be deprecated across three release cycles.
   Release 1: API is marked as deprecated.
   option deprecated="vyy.mm";
   option replaced_by="new_api_2";
   Release 2: both old and new APIs are supported
   Release 3: the deprecated API is deleted.
3. APIs that are experimental / not released are not checked.
   An API message can be individually marked as in progress, by:
   option status="in_progress";
   In the API definition.

The definition of a "production API" is if the major version in the API file is > 0.

extras/scripts/crcchecker.py --check-patchset # returns -1 if backwards incompatible
extras/scripts/crcchecker.py --dump-manifest
extras/scripts/crcchecker.py --git-revision v20.01 <files>
extras/scripts/crcchecker.py -- diff <oldfile> <newfile>

This patch integrates the tool in "make checkstyle-api".
A future patch is required to integrate the tool in the verify job.
I.e. this patch does not enable enforcement through Jenkins.

Change-Id: I5f13c0976d8a12a58131b3e270f2dc9c00dc7d8c
Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agogtpu: fix coverity issue 53/26953/2
Chenmin Sun [Fri, 8 May 2020 19:17:54 +0000 (03:17 +0800)]
gtpu: fix coverity issue

Fix coverity issue #210194 in gtpu-decap

Type: fix

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

3 years agobuild: reject merge conflict checkin attempts 56/26956/2
Dave Barach [Fri, 8 May 2020 13:46:17 +0000 (09:46 -0400)]
build: reject merge conflict checkin attempts

Although attempts to build code containing merge conflict markers
USUALLY results in compile errors, this patch adds an explicit check
for the conflict end marker.

If for some unknown reason it's necessary to check in the text
'>>>>>>>', construct it by concatenation: ">>>"">>>>"
or '>>>' + '>>>>' depending on the language involved.

Type: improvement

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

3 years agodocs: fix merge damage in nat.h 58/26958/3
Dave Wallace [Fri, 8 May 2020 15:58:24 +0000 (15:58 +0000)]
docs: fix merge damage in nat.h

Type: fix
Fixes: b5a575b09

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

3 years agovppinfra: set explicit found in search_free_list loop 54/26954/2
Steven Luong [Fri, 8 May 2020 11:50:05 +0000 (04:50 -0700)]
vppinfra: set explicit found in search_free_list loop

While https://gerrit.fd.io/r/c/vpp/+/26948 fixed avoid using -1 to
index into h->free_lists[b][l] by changing the loop counter, the
check for the value of the loop counter (l < 0) cannot be trusted
to decide whether we've found a large enough object within the bin
or not. When the loop is terminated, the value of the variable l
could be ambiguous if it equals to 0 and it is never less than 0,
ie, when we bail out of the loop, we don't know if it was due to the
breaking out of the condition in
  if ((s = f_size - size) >= 0)
     break;
or
  while (l > 0);

The fix is to explicitly set a variable when we have found a large enough
object inside the loop to be used to test whether the loop was prematurely
terminated (found == 1) or the loop just ran exhausted (found == 0)

Type: fix

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

3 years agomisc: add knob to generate compile_commands.json 60/26960/3
Damjan Marion [Fri, 8 May 2020 17:01:22 +0000 (19:01 +0200)]
misc: add knob to generate compile_commands.json

Used for lanuguage servers like clangd and ccls

Type: improvement
Change-Id: I68d534dfa7b8ba3459fbd919d5ffccaa1fa1171e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agobuild: various improvements 41/26941/7
Damjan Marion [Thu, 7 May 2020 14:49:45 +0000 (16:49 +0200)]
build: various improvements

- add option to install only host tools
- add option to specify lib and runtime dir

Type: improvement

Change-Id: I6356b52df459120fc9b0127948bae7679fb10e52
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoethernet: fix coverity warning 55/26955/2
Dave Barach [Fri, 8 May 2020 12:16:06 +0000 (08:16 -0400)]
ethernet: fix coverity warning

Type: fix
Ticket: VPP-1837

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

3 years agopapi: use python3 for papi install 52/26952/2
Ole Troan [Fri, 8 May 2020 08:39:30 +0000 (10:39 +0200)]
papi: use python3 for papi install

Breaks on Ubuntu 20.04 otherwise.

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

3 years agonat: fix per thread data vlib_main_t usage take 2 51/26951/4
Ole Troan [Fri, 8 May 2020 08:02:18 +0000 (10:02 +0200)]
nat: fix per thread data vlib_main_t usage take 2

The original fix access vlib_main before these was initialized.
Removed cached vlib_mains structure.

Type: fix
Fixes: 9bb09afb56b1aa787ca574cc732085272059fd5f
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I686bab9220e27891f66bf60489c1602855786aa8
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agodpdk: fix compiling issue with clang 49/26949/2
Lijian.Zhang [Thu, 30 Apr 2020 06:52:15 +0000 (14:52 +0800)]
dpdk: fix compiling issue with clang

When building vpp image with below command, clang reports warnings/errors
on the unused option '-L', as it's not linking stage, and does not require
linking libraries.

In dpdk.mk, the linking library path should be attached to
DPDK_EXTRA_LDFLAGS, instead of DPDK_EXTRA_CFLAGS

$ make build-release CC=clang V=1

clang -Wp,-MD,./.ark_ddm.o.d.tmp  -fPIE -fPIC -pthread -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/lib/librte_eal/linux/eal/include  -march=armv8-a+crc -DRTE_MACHINE_CPUFLAG_NEON -DRTE_MACHINE_CPUFLAG_CRC32  -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include -DRTE_USE_FUNCTION_VERSIONING -include /root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include/rte_config.h
-D_GNU_SOURCE -O3 -I./ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Wno-missing-field-initializers -Wno-address-of-packed-member -Werror   -g -mtune=generic -L/root/origin/build-root/install-vpp-native/external/lib -I/root/origin/build-root/install-vpp-native/external/include -o ark_ddm.o -c
/root/origin/build-root/build-vpp-native/external/dpdk-20.02/drivers/net/ark/ark_ddm.c
== Build drivers/vdpa/ifc
clang: warning: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Wunused-command-line-argument]
clang: error: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Werror,-Wunused-command-line-argument]

Type: fix

Change-Id: If8fd9b19d0aff9d3c27d77e78cd3064bb1ad6565
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 agovppinfra: fix u32x4_byte_swap on Arm 50/26950/1
Lijian.Zhang [Mon, 27 Apr 2020 02:46:06 +0000 (10:46 +0800)]
vppinfra: fix u32x4_byte_swap on Arm

Fix the endianness conversion function u32x4_byte_swap() on Arm. Here's
an example of using this function with and without the fix.

This issue is seen using Mellanox NIC RDMA driver on Arm servers.
The packet length cannot be parsed correctly.

Testing code:
u32x4 s = {0x12345678, 0x23456789, 0x3456789a, 0x456789ab};
u32x4 ss = u32x4_byte_swap (s);

Without the code change:
(gdb) p /x s
$1 = {0x12345678, 0x23456789, 0x3456789a, 0x456789ab}
(gdb) p /x ss
$2 = {0x23456789, 0x12345678, 0x456789ab, 0x3456789a}

With the code change:
(gdb) p /x s
$3 = {0x12345678, 0x23456789, 0x3456789a, 0x456789ab}
(gdb) p /x ss
$4 = {0x78563412, 0x89674523, 0x9a785634, 0xab896745}

Type: fix

Change-Id: Ie5f263e94331783940e7c00397092a64e4fc4279
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 agovppinfra: loop counter off by 1 in search_free_list() 48/26948/3
Steven Luong [Thu, 7 May 2020 17:47:33 +0000 (10:47 -0700)]
vppinfra: loop counter off by 1 in search_free_list()

In search_free_list(), we have this do while loop.
do
  {
    l--;
    f_index = h->free_lists[b][l];
    f = elt_at (h, f_index);
    f_size = heap_elt_size (v, f);
    if ((s = f_size - size) >= 0)
      break;
  }
while (l >= 0);

When (l == 0), we still go back up to execute l--. Then l become -1. The
next statement is we index h->free_lists[b][-1]. After that, elt_at() would
probably cause a crash in the ASSERT.

Type: fix
Ticket: VPPSUPP-63

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

3 years agonat: remove duplicate line of code 97/26897/2
Klement Sekera [Wed, 6 May 2020 11:21:16 +0000 (11:21 +0000)]
nat: remove duplicate line of code

Type: fix

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

3 years agonat: fix per thread data vlib_main_t usage 42/26942/2
Filip Varga [Thu, 7 May 2020 12:28:56 +0000 (14:28 +0200)]
nat: fix per thread data vlib_main_t usage

Type: fix

Change-Id: If6784c9eb278f525e05304d10fd1a00641faaaf0
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agomisc: deprecate elftool 36/26936/2
Damjan Marion [Thu, 7 May 2020 07:49:27 +0000 (09:49 +0200)]
misc: deprecate elftool

Type: make

Change-Id: I34fec1c40ef660177c266517eaf41d60827609f4
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosession: catch segment manager alloc failure 14/26514/3
Florin Coras [Wed, 15 Apr 2020 01:30:46 +0000 (01:30 +0000)]
session: catch segment manager alloc failure

Type: improvement

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

3 years agolacp: fix regarding vm arg for vlib_time_now calls 43/26943/1
Elias Rudberg [Thu, 7 May 2020 12:29:21 +0000 (14:29 +0200)]
lacp: fix regarding vm arg for vlib_time_now calls

Use thread-specific vlib_main_t *vm pointers to avoid problems with
different threads accessing the same vlib_main_t data structure.
This avoids assertion failure when vlib_time_now() is called with a vm
corresponding to a different thread.

Type: fix

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

3 years agordma: fix alignment issue 34/26934/2
Damjan Marion [Wed, 6 May 2020 21:38:58 +0000 (23:38 +0200)]
rdma: fix alignment issue

Type: fix

Change-Id: I0ff7a6f3354066c2252c1ebd0d43ac59db278bf0
Signed-off-by: Damjan Marion <damarion@cisco.com>
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
3 years agodocs: clean up make docs job 68/23168/7
Paul Vinciguerra [Fri, 1 Nov 2019 17:00:58 +0000 (13:00 -0400)]
docs: clean up make docs job

Type: docs

Change-Id: I9b5e5137eb4c1e89f6e8d7a278cd11a0fd496471
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agovppinfra: add timer wheel section to Sphinx docs 90/26890/2
Dave Barach [Tue, 5 May 2020 21:08:53 +0000 (17:08 -0400)]
vppinfra: add timer wheel section to Sphinx docs

Type: docs

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

3 years agocrypto: fix coverity issues 19/26819/3
Fan Zhang [Fri, 1 May 2020 12:06:57 +0000 (13:06 +0100)]
crypto: fix coverity issues

Fix coverity issues in crypto framework and cryptodev
engine.

Type: fix

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Ib261da0163c8182c803600db22c5a6dad5a19999

3 years agomisc: fix coverity warnings 70/26870/2
Dave Barach [Mon, 4 May 2020 18:47:45 +0000 (14:47 -0400)]
misc: fix coverity warnings

Type: fix
Ticket: VPP-1837

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

3 years agordma: fix clang build 80/26880/3
Benoît Ganne [Tue, 5 May 2020 10:25:13 +0000 (12:25 +0200)]
rdma: fix clang build

Type: fix

Change-Id: I9b613f0af484f601dd20a851e2f59ee5e06b5c37
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agomisc: fts add support for non-ascii author names in yaml 87/26887/2
Paul Vinciguerra [Tue, 5 May 2020 15:46:26 +0000 (11:46 -0400)]
misc: fts add support for non-ascii author names in yaml

Type: fix

Change-Id: I3f034ca86412b58d3e41a627bd8902157683435a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>