vpp.git
3 years agomap: Fix inverted 'map security check enable' CLI flag. 24/28224/2
Jon Loeliger [Tue, 26 Nov 2019 19:47:49 +0000 (13:47 -0600)]
map: Fix inverted 'map security check enable' CLI flag.

Type: fix
Fixes: 5a2e278a09726be627b8310e03f0522d60aafedf

Change-Id: Ibdc2f0be44e382bfa4a8f3e16be8d6239d7a0ec1
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit acaa04a22dd8bade2eca944ddd8517961433a34f)

3 years agofib: Another realloc burn 23/28223/2
Neale Ranns [Thu, 21 Nov 2019 09:37:41 +0000 (09:37 +0000)]
fib: Another realloc burn

Type: fix

harmless this time since it only affects the debug statement, but
it still crashes an ASAN image.

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

3 years agotcp: invalidate expired timer handles before dispatching 22/28222/2
Florin Coras [Sat, 23 Nov 2019 01:38:25 +0000 (17:38 -0800)]
tcp: invalidate expired timer handles before dispatching

Type: fix

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

3 years agovppapigen: fix typo on f64 endian_string 21/28221/2
Paul Vinciguerra [Wed, 20 Nov 2019 04:30:53 +0000 (23:30 -0500)]
vppapigen: fix typo on f64 endian_string

Type: fix

Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Change-Id: Id47e3f2c348f07c84d9c2499122fa25d6c74fb13
(cherry picked from commit 1c200dc492c02b1bf827e627f5a190b911fb34ec)

3 years agopapi: add missing base types to serializer 20/28220/2
Paul Vinciguerra [Sun, 24 Nov 2019 02:02:27 +0000 (21:02 -0500)]
papi: add missing base types to serializer

  File "/vpp/src/vpp-api/python/vpp_papi/vpp_serializer.py", line 512, in __init__
    'Unknown message type {}'.format(f_type))
  vpp_papi.vpp_serializer.VPPSerializerValueError: Unknown message type i16

Type: fix

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

3 years agovppinfra: fix coverity issue 205691 in pmalloc 19/28219/2
Andrew Yourtchenko [Mon, 18 Nov 2019 10:23:54 +0000 (10:23 +0000)]
vppinfra: fix coverity issue 205691 in pmalloc

set the address to MMAP_FAILED if mmap has failed,
so that we do not attempt to free it in the error
handling path.

Change-Id: I6e6b51a365fb68086dc20aa40a676a36af59a3ba
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 9ce35233658d6c19a4458ec7e728b6ee75fd3ace)

3 years agonat: respect arc features (multi worker) 18/28218/2
Filip Varga [Mon, 9 Sep 2019 14:55:19 +0000 (16:55 +0200)]
nat: respect arc features (multi worker)

Type: fix
Ticket: VPP-1747

Change-Id: If282aae3e584d7017c200f897b99c8a37eb1b2e5
Signed-off-by: Filip Varga <fivarga@cisco.com>
(cherry picked from commit 9a6dc8a9376e7270331255861b3ead1045b40c6d)

3 years agoip6: Fix improper MCAST adj test in IPv6 router solicitation 29/28229/2
Jon Loeliger [Tue, 3 Dec 2019 16:51:23 +0000 (10:51 -0600)]
ip6: Fix improper MCAST adj test in IPv6 router solicitation

Type: fix
Fixes: cb9cadad578297ffd78fa8a33670bdf1ab669e7e

Change-Id: Id6de9780da41db5d762fe042f533cfaf21ed7b73
Reported-by: Rajith PR <rajith@rtbrick.com>
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit a90b26c1ee5bc4410c2753b6683a2e50e275daf6)

3 years agobuild: Separate ip and ip6 maintainers 30/28130/1
Jon Loeliger [Tue, 3 Dec 2019 18:13:29 +0000 (12:13 -0600)]
build: Separate ip and ip6 maintainers

Boldly assign IPv6 to Neale and to me.
Ole said so.  Really!

Change-Id: Iaa30a57230558dcf3ee016a94479cac95bb2d50d
Type: make
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit a6460e46f379315e872819af139ae2c87e8e06f3)

3 years agobfd: add missing cast 17/28217/1
Klement Sekera [Wed, 29 Jan 2020 22:59:48 +0000 (22:59 +0000)]
bfd: add missing cast

Add missing cast to time conversion function to to deal with arbitrary
clocks-per-second values.

Type: fix

Change-Id: I5075a823e7a95c972c513ac765252337d5f59fbf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit 27d12d30cdf5af37fad0e14db0877ca716af2115)

3 years agobfd: allow IPv6 link-local address as local address 16/28216/1
Alexander Chernavin [Thu, 31 Oct 2019 14:38:43 +0000 (10:38 -0400)]
bfd: allow IPv6 link-local address as local address

Type: fix

Change-Id: Ia3dacd2628591f7ba9710e8e4d68df97ae21935c
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 845f51ffe2a2176dd3187e1eb96c00caee98980a)

3 years agodhcp: fix dhcpv6 client and dhcpv6 prefix delegation 96/28196/1
Dave Barach [Sat, 9 Nov 2019 01:20:17 +0000 (20:20 -0500)]
dhcp: fix dhcpv6 client and dhcpv6 prefix delegation

Keep trying even if the interface in question is not "admin-up,
link-up." In real life, it's normal for link autonegotiation to take a
good fraction of a second. The driver layer takes care of packets sent
to an interface which can't transmit at the moment.

Renew address leases at the preferred renewal time, not at the
expiration time.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I68ec1c52cc1f4a8aa256185820748b845e92f7c1
(cherry picked from commit 20b962d3e494513ab28854936cc8bbc32891686b)

3 years agosession: fix session_main_get_worker_if_valid 63/28163/6
Nathan Skrzypczak [Wed, 4 Dec 2019 10:02:28 +0000 (11:02 +0100)]
session: fix session_main_get_worker_if_valid

Type: fix

Change-Id: Ie024792015f3c9c52102c9be03da63c79f3456af
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 901467ed75fa76e8fe4792459e3649d4aef4ddc7)

3 years agosession: fix transport proto unformat 62/28162/6
Florin Coras [Wed, 20 Nov 2019 01:23:22 +0000 (17:23 -0800)]
session: fix transport proto unformat

Type: fix

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

3 years agosession: Fix out of order mq 61/28161/6
Nathan Skrzypczak [Tue, 19 Nov 2019 15:48:58 +0000 (16:48 +0100)]
session: Fix out of order mq

Type: fix

Change-Id: I522db62db50fc0fa46a6dd7cddd32e2f09b5e5a6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 989bc47d68187dd5db608d2b32abbbbc392b03ca)

3 years agosession: session enable in multiworker 60/28160/6
Nathan Skrzypczak [Thu, 7 Nov 2019 16:55:01 +0000 (17:55 +0100)]
session: session enable in multiworker

Having session enable in config file wasn't
working for multiple workers

Type: fix

Change-Id: Ib29ba540a6e1d714e7e470f4c7518e3d266fe7ca
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 31bd035621bdc57deb757613b534bd6c2b032814)

3 years agosession: fix app attach on error 59/28159/6
Nathan Skrzypczak [Thu, 7 Nov 2019 09:29:24 +0000 (10:29 +0100)]
session: fix app attach on error

Type: fix

Change-Id: I57b3c76515544ba3655690b37e0dacb47734ba6d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit 9d3e1b433f394781a55a4c7c39b695d08dd2563f)

3 years agodhcp: fix proxy dhcpv6 size check 56/28156/6
Benoît Ganne [Wed, 30 Oct 2019 13:46:40 +0000 (14:46 +0100)]
dhcp: fix proxy dhcpv6 size check

Type: fix

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

3 years agoip: fix tracing of packet flags 55/28155/6
Klement Sekera [Wed, 23 Oct 2019 10:16:02 +0000 (10:16 +0000)]
ip: fix tracing of packet flags

This fixes incorrect tracing of flags such as MORE_FRAGMENTS.

Type: fix

Change-Id: Ia5698418a7cbb45c18bc9c95f560cea020e63c39
Signed-off-by: Klement Sekera <ksekera@cisco.com>
(cherry picked from commit ea5cd12d26047c36be5969c2c88147d26f788103)

3 years agopapi: fix default handling 54/28154/6
Ole Troan [Tue, 22 Oct 2019 12:01:53 +0000 (14:01 +0200)]
papi: fix default handling

The BaseTypers object were reused, so a default for anyother mesage
would be inherited in new messages.

Type: fix
Fixes: 85465588b18fef9c4712f864f512e00741e2d4f2
Change-Id: Ie1efb85a76b088653eb9ea4b88540c98b6b0aad0
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit 40dc4b35e3d946efbc5c2b8b0af5e52d67b7fe6c)

3 years agoquic: Hotfix crypto context on migrate 53/28153/6
Nathan Skrzypczak [Wed, 18 Dec 2019 12:37:45 +0000 (13:37 +0100)]
quic: Hotfix crypto context on migrate

Type: fix

quicly_connections have internal references to crypto
contexts which need to be updated when we switch thread
as the supporting pools are thread-based.
This under the assumption that the new contexts will be
exactly identical

Change-Id: I38083e59657ff068e347d9e7b47abe91a1167b6c
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit d9942bcc61d83cee390fc2c6a428e562ec9750f0)

3 years agoquic: fix quicly rtt time skew 52/28152/6
Dave Wallace [Fri, 1 Nov 2019 18:41:29 +0000 (14:41 -0400)]
quic: fix quicly rtt time skew

- This patch to quicly fixes an intermittent failure
  in the rtt calculation when there is a time skew

Type: fix

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

3 years agoquic: remove redundant function calls 51/28151/6
Dave Wallace [Wed, 30 Oct 2019 23:40:33 +0000 (23:40 +0000)]
quic: remove redundant function calls

- session_transport_delete_notify() is called before
  and inside quic_connection_delete()

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I5c79a3269e36c4aab5aa99fdfdac06c1334f0f6f
(cherry picked from commit 34d92ebde67efb96784e0360f25a3b3c3b86b8f0)

3 years agoquic: disable failing test 50/28150/6
Florin Coras [Thu, 31 Oct 2019 02:43:57 +0000 (19:43 -0700)]
quic: disable failing test

Type: fix

Disable test until fixed.

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

3 years agoquic: Add PICOTLS_INCLUDE_DIR var to CMakeLists. 49/28149/6
Mathias Raoul [Tue, 6 Aug 2019 12:58:01 +0000 (14:58 +0200)]
quic: Add PICOTLS_INCLUDE_DIR var to CMakeLists.

Type: fix

Change-Id: I10ebcc653491d11ca798e0a60be6eeef82c41766
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
(cherry picked from commit 74dcbf97af4e55cb29932dad7d65472403c6006d)

3 years agomisc: bond_create is broken for custom dump print 48/28148/7
Steven Luong [Wed, 11 Sep 2019 17:49:30 +0000 (10:49 -0700)]
misc: bond_create is broken for custom dump print

Regression from https://gerrit.fd.io/r/#/c/vpp/+/21508/
The aformentioned patch changed lb and mode to u32. But it does not make the
same change to custom_dump.c

Type: fix

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

3 years agomemif: 14 bytes extra overhead issue fixed. 47/28147/6
Mrityunjay Kumar [Thu, 5 Sep 2019 05:10:25 +0000 (05:10 +0000)]
memif: 14 bytes extra overhead issue fixed.

Type: fix

Signed-off-by: Mrityunjay Kumar <kumarnitp@gmail.com>
Change-Id: I31cc5e853b57e285064647503231b251e5152d3f
(cherry picked from commit 3f0579e8df831d42745e0b97191eb5e4bcffb011)

3 years agolibmemif: don't consume rx queue interrupt, if memif_rx_burst fails 46/28146/7
Jan Cavojsky [Tue, 3 Mar 2020 15:25:58 +0000 (16:25 +0100)]
libmemif: don't consume rx queue interrupt, if memif_rx_burst fails

Type: fix

Signed-off-by: Jan Cavojsky <jan.cavojsky@pantheon.tech>
Change-Id: Ic6c15c88c80c4045c290cd78533be6f070c7470a
(cherry picked from commit 77a95cdce2f3d80dac2832b68310eb5b23769c0e)

3 years agolibmemif: memif_control_fd_update always pass context from libmemif_main 45/28145/7
Jakub Grajciar [Thu, 14 Nov 2019 09:47:25 +0000 (10:47 +0100)]
libmemif: memif_control_fd_update always pass context from libmemif_main

Event polling instance is always identified by libmemif main private context.
Fixes event polling handled by libmemif.

Type: fix

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

3 years agomemif: fix zero-copy arg overwrite 44/28144/7
Jakub Grajciar [Wed, 11 Sep 2019 08:21:17 +0000 (10:21 +0200)]
memif: fix zero-copy arg overwrite

Type: fix

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

3 years agogbp: More reliable unit-tests 95/28195/3
Neale Ranns [Tue, 7 Apr 2020 08:44:20 +0000 (08:44 +0000)]
gbp: More reliable unit-tests

Type: fix

the GBP unit tests would peridocially fail. The reason being that there
is dynamic state whose presence nneds to be created, tested and then
timeed out. The failures occurded when the timeout occured before the
state could be tested. the previous timeout was 2 seconds, this has been
doubled, as a result i saw no faliures running continuously for ~16
hours.
bumping the timer increasing the test run time from ~40 to ~53 seconds,
a small price to pay.

in test cases where the state is not timed out i bumped the timer to 60
seconds.

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

3 years agotests: fix deps pinning / patching 43/28143/5
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 agointerface: add pcap trace data preallocation 28/28128/3
Dave Barach [Wed, 5 Aug 2020 20:12:35 +0000 (16:12 -0400)]
interface: add pcap trace data preallocation

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2e53fa85a0b4082666f57a3a58a09c04ae2001b5
(cherry picked from commit 586462fabcc913a5a4fa9115d4b5caf33dfdb347)

3 years agobuild: Fix 'make install-deps' errors on aarch64 CentOS 7 20/28120/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 30/27930/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 agointerface: shmemioerror while getting name_filter arg 61/27761/2
Aleksander Djuric [Thu, 31 Oct 2019 11:35:21 +0000 (14:35 +0300)]
interface: shmemioerror while getting name_filter arg

Type: fix

Signed-off-by: Aleksander Djuric <aleksander.djuric@gmail.com>
Change-Id: I5e0eb7024d208040d79e9d6db863f41e2ecf4ee6
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit c12eae73f925169597e20a8f8139c462e317404d)

3 years agobuild: backporting a dpdk i40e TSO pkt exceeds buffer size patch 53/27453/5
Steven Luong [Fri, 5 Jun 2020 13:33:25 +0000 (06:33 -0700)]
build: backporting a dpdk i40e TSO pkt exceeds buffer size patch

The subject patch appears to be critical. Backport it to DPDK_19.05

Type: fix

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

4 years agofib: IPv6 lookup data structure MP safe when prefixes change (VPP-1881) 57/27257/4
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>
(cherry picked from commit aecb10b97fa97b215c415ceaa3cac4c97204922f)

4 years agoethernet: fix dmac stride error 55/27455/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
(cherry picked from commit cbe36e47b5647becc6c03a08e2745ee5ead5de20)

4 years agoapi: fix vl_api_clnt_node process stack overflow 57/27457/3
Chenmin Sun [Tue, 14 Jan 2020 00:47:22 +0000 (08:47 +0800)]
api:  fix vl_api_clnt_node process stack overflow

Type: fix

Some simple settings(e.g. bringing up an i40e/ice interface) through
vnat consume more than the currently available stack space.

This root cause of this issue is same with commit
b2dbb36fc265b8996fc7fa310dda447d5b0479cb "vlib: fix startup-config \
-process stack overflow" and commit 2fd44a00aa26188ca75f0accd734f2 \
1758c199bf "vlib: fix cli process stack overflow"

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I312e4fed96a679aa68b859e28a90a2a4b6eb0c6e
(cherry picked from commit a488f37559493657b59181c1212e57b3b9cc3689)

4 years agovppinfra: refactor mpcap.h 29/27429/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)

4 years agomisc: fix the MAKE_PARALLEL_JOBS for 'make verify' target 36/27436/1
Andrew Yourtchenko [Fri, 7 Feb 2020 11:58:00 +0000 (12:58 +0100)]
misc: fix the MAKE_PARALLEL_JOBS for 'make verify' target

MAKE_PARALLEL_JOBS was prepending "-j", which in case of nested targets like "verify"
resulted in ninja being executed with "-j -j" flags.

Solution: prepend -j only at the moment of setting the MAKE_PARALLEL_FLAGS variable,
this keeps MAKE_PARALLEL_JOBS intact regardless of depth of the job call tree.

Type: make
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I10a69fe527758e5a862852a9f2102aeaca30e88f
(cherry picked from commit 56ac770df97065ea705ff2f3070055a410113b9f)

4 years agobonding: fix the gso flags 52/27152/2
Mohsin Kazmi [Tue, 12 May 2020 12:23:28 +0000 (14:23 +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>
(cherry picked from commit e4f0020e8d16bad614f50e16b8471480bc16a74b)

4 years agoipsec: DES/3DES fixing the iv_len for openssl crypto 49/27249/1
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)

4 years agomisc: 19.08.2 Release Notes 15/26815/2 v19.08.2
Andrew Yourtchenko [Thu, 30 Apr 2020 18:05:47 +0000 (18:05 +0000)]
misc: 19.08.2 Release Notes

Change-Id: I78f9edf9c15e9f4a2451be084c04c6318fbb978d
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agoipsec: Add/Del SA not MP safe 99/26799/1
Neale Ranns [Thu, 30 Apr 2020 13:30:57 +0000 (13:30 +0000)]
ipsec: Add/Del SA not MP safe

Type: fix

some crytto engines store key data indexed by SA index. Creating new SAs
means this store reallocs with packets inflight; bad stuff ensues.

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

4 years agol2: l2_patch_main should not be static 95/26795/1
Vratko Polak [Thu, 21 Nov 2019 09:29:40 +0000 (10:29 +0100)]
l2: l2_patch_main should not be static

Without understanding what is going on,
a pattern from l2_fwd.c is applied to l2_patch.c file.

Type: fix
Fixes: d770cfc96257f9bd9e0c96c8ebe50e4531dc1bc5
Ticket: VPP-1799

Change-Id: Ia97d448f9d1846549f57ea69044ae15fa39bb942
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 3be9351e5e5c54f76544836044c6e81df8a0b899)

4 years agovlib: add ASSERT to vlib_time_now(...) 89/26789/2
Dave Barach [Tue, 28 Apr 2020 22:00:21 +0000 (18:00 -0400)]
vlib: add ASSERT to vlib_time_now(...)

Calling vlib_time_now (&vlib_global_main) from a worker thread is a bad
mistake. ASSERT (vm->thread_index == __os_thread_index) will catch it.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I55af6de84e06143f8f43adc62103b77267a7a441
(cherry picked from commit 77d98382824ca211fb55fcf842931930ccfb3baa)

4 years agodhcp: fix unicast pkts, clean up state machine 88/26488/1
Dave Barach [Mon, 13 Apr 2020 20:44:09 +0000 (16:44 -0400)]
dhcp: fix unicast pkts, clean up state machine

Nominally a bug-fix cherry-pick, but completely manual. Closer to a
full feature backport minus binary api changes.

Send dhcp unicast packets to ip4-lookup. Otherwise, these packets
won't reach a dhcp server on a different subnet.

Do an immediate client scan after processing wakeup events.

Calculate the next process wakeup time by scanning all
clients.

Increase maximum (idle, no-clients-configured) timeout to 1000
seconds.

Reduce log spew.

Type: fix

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

4 years agoping: fix buffer allocator error handling 70/26470/2
Dave Barach [Wed, 8 Apr 2020 16:03:32 +0000 (12:03 -0400)]
ping: fix buffer allocator error handling

The code sets f->n_vectors = n_to_send, but it can bail out of the
loop if vlib_buffer_copy(...) returns 0.

Need to fix f->n_vectors in the error return path, or we enqueue some
number of 0xfefefefe buffer indices in a debug image or worse in a
production image.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I2d886266006c6c1c2f9ef8e3b95eb46ac6c0b3df
(cherry picked from commit 8324c55f95dd5ddbf1f5f9c47907204a12e152ef)

4 years agol2: handle complete clone fail in l2_flood 67/26467/2
Dave Barach [Tue, 7 Apr 2020 14:52:43 +0000 (10:52 -0400)]
l2: handle complete clone fail in l2_flood

vlib_buffer_clone(...) may not manage to produce any buffer clones at
all.

vlib_buffer_clone_256 should not smash the original buffer reference
count if no clones are produced.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I14d9d53637a220485c7a0036cfc75a4149b264ea
(cherry picked from commit 95e19253320ab07748787f4c8a7620704563f6b8)

4 years agomisc: check return values from vlib_buffer_copy(...) 72/26472/1
Dave Barach [Fri, 10 Apr 2020 14:18:35 +0000 (10:18 -0400)]
misc: check return values from vlib_buffer_copy(...)

vlib_buffer_copy(...) returns NULL if the system is temporarily out of
buffers.

This is NOT correct. Please don't be this person:

   c0 = vlib_buffer_copy (vm, p0);
   ci0 = vlib_get_buffer_index (vm, c0);

Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit c25ef58965871ea5d2b40904df9506803f69e47e)
Change-Id: I6cd4f289c4fadc3f36c3203b53546e9a788ef99b

4 years agodocs: pin down sphinx to avoid crash with Sphinx 3.0.0 92/26392/2
Andrew Yourtchenko [Tue, 7 Apr 2020 10:19:51 +0000 (10:19 +0000)]
docs: pin down sphinx to avoid crash with Sphinx 3.0.0

Using requirements.txt did not work, just specify the version
in the pip install within the makefile.

For the master and stable/2001,
see change Id98c0f94104e455ea819aacec62f605e53db13ce

Change-Id: I1f6ff53d8d52dc8bad42041932421fc12d7ddebf
Type: fix
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
4 years agovirtio: vhost checksum problem for ipv6 64/26364/2
Steven Luong [Sun, 5 Apr 2020 23:09:17 +0000 (16:09 -0700)]
virtio: vhost checksum problem for ipv6

When checksum is enable for IPv6, it erroneously set the flag
VNET_BUFFER_F_OFFLOAD_IP_CKSUM. That flag is meant for ip4 packets only.

Type: fix
Ticket: VPP-1857

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

4 years agoapi: ipsec: add missing IS_INBOUND flag 74/25674/2
Christian Hopps [Wed, 26 Feb 2020 10:40:40 +0000 (05:40 -0500)]
api: ipsec: add missing IS_INBOUND flag

External IKE daemons need to be able to flag an SA as inbound (just as
the included ike plugin does). This commit adds this flag to the API.
This change is backward bug-compatible as not setting the flag (old
clients) continues to mean all SAs are created as outbound and fib nodes
are created for them. The addition of this flag inhibits this forwarding
node creation as well as properly flagging the SA as inbound.

Ticket: VPP-1845
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Ifa6fd664587380aa53e95d0e4eb2e1a4b1df7909

4 years agomisc: fix ip6_neighbor_cmd 48/26248/3
Dave Barach [Mon, 30 Mar 2020 15:06:46 +0000 (11:06 -0400)]
misc: fix ip6_neighbor_cmd

The option parsing loop had "break" statements included in each
'if (unformat (line_input, "this-option ...") option_values=xxx;'
statement.

Result: the code would silently ignore all but the first
option. Probably broken forever, not easy to spot because the code
looks OK even though it's badly broken.

Manual cherrypick: the function name has changed, the code has
moved to a different file, and the MAINTAINERS file entry doesn't
exist in 19.08.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 7249b90ab21c20138907e692dcb6032aea9e2f0f)
Change-Id: Ie06bb083645302848a19ecc9ad2934927de01f62

4 years agovppinfra: fix typo in dlmalloc.c 45/26245/1
Dave Barach [Sat, 21 Mar 2020 15:15:48 +0000 (11:15 -0400)]
vppinfra: fix typo in dlmalloc.c

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Idc567717494b4c40c307f20a40d5e10cd26b0a46
(cherry picked from commit 6e6968f06435727e6887abef4669715c9e59de6b)

4 years agovppinfra: correct fixed pool header size calculation 11/26211/2
Dave Barach [Mon, 24 Feb 2020 14:19:12 +0000 (09:19 -0500)]
vppinfra: correct fixed pool header size calculation

Remove duplicate space allocation for the pool header. Not significant
w/ CLIB_CACHE_LINE_BYTES >= 64 since the code rounds the size of the
pool header to an even multiple of the cache line size.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I923f2a60e7565cf2dfbc18d78264bf82ff30c926
(cherry picked from commit 6e495ce428e110665ee9616e0951015963502cac)

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

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

Type: fix

Change-Id: I9e07709ddd7093f91ffef87808abbab264b8aa5a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 8921dc675458b238fc03c5aed53d3462bcdbdb3c)

4 years agovppinfra: manual cherrypick timebase fixes 16/26216/2
Dave Barach [Fri, 27 Mar 2020 15:14:59 +0000 (11:14 -0400)]
vppinfra: manual cherrypick timebase fixes

Gerrit Headline
------ --------
25729  fix corner cases in tw_timer_expire
25763  improve timebase resilience
25837  remove time jump workaround

Automatic cherry-picking failed miserably.

Type: fix
Ticket: VPP-1852

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

4 years agovirtio: fix link up/down flag 41/26141/2
Mohsin Kazmi [Thu, 19 Mar 2020 13:03:31 +0000 (14:03 +0100)]
virtio: fix link up/down flag

Type: fix

"set int state <interface> down" puts the virtio device link
down. It will not put the link in "UP" state, when
"set int state <interface up>" will be used again to change
the interface admin up. This patch fixes it.

To test:
create tap
set int state tap0 up
set int state tap0 down
sh hardware
sh int
set int state tap0 up
sh int
sh hardware

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

4 years agovirtio: fix the out of order descriptors in tx 24/25924/3
Mohsin Kazmi [Mon, 16 Mar 2020 16:57:22 +0000 (16:57 +0000)]
virtio: fix the out of order descriptors in tx

Type: fix

Some vhost-backends give used descriptors back in
out-of-order. This patch fixes the native virtio to
handle out-of-order descriptors.

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

4 years agordma: fix bug related to ring buffer 57/25757/1
Elias Rudberg [Tue, 18 Feb 2020 11:12:25 +0000 (12:12 +0100)]
rdma: fix bug related to ring buffer

Fix a bug that caused some input packets to be dropped due to errors of
the type 'ip4 length > l2 length'. The change is related to the second
call to the rdma_device_input_bufs() function that happens when the end
of the ring buffer is reached.

Type: fix
Change-Id: I332d69ab22242b3443a0baca6e5dd86349a54765
Signed-off-by: Elias Rudberg <elias.rudberg@bahnhof.net>
(cherry picked from commit e5ecf3ea4b456afb710f4ed903cd7e4c1ae87859)

4 years agompls: adjust mpls-frag size to account for mpls header 82/25582/2
John Lo [Mon, 2 Mar 2020 20:44:51 +0000 (15:44 -0500)]
mpls: adjust mpls-frag size to account for mpls header

Type: fix

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

4 years agotap: misc fixes 42/25542/2
Mohsin Kazmi [Fri, 28 Feb 2020 13:21:25 +0000 (14:21 +0100)]
tap: misc fixes

Ticket: VPPSUPP-58

1) Previously, host mtu can't be set if tap interface is in namespace.
2) generate the host mac address, if it is not provided.
3) fix the parameters for tap_create_v2 in vat.
4) fix the pretty print of parameters for tap_create_v2 in custom dump.

Type: fix

Change-Id: I18898af90dbd37d773a40b6535dd9c03c9984679
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agodpdk: TSO does not work for Cisco VIC 55/25055/2
Steven Luong [Thu, 13 Feb 2020 02:45:09 +0000 (18:45 -0800)]
dpdk: TSO does not work for Cisco VIC

While TSO is supported for Intel NIC, Cisco VIC does not work.
The problem is due to txmode offloads is not properly set for
the Cisco VIC when enable-tcp-udp-checksum is configured.

Type: fix
Ticket: VPP-1838

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

4 years agoavf: Handle chain buffer in TX properly 18/25518/1
Steven Luong [Thu, 13 Feb 2020 17:27:38 +0000 (09:27 -0800)]
avf: Handle chain buffer in TX properly

For chain buffer, need to traverse b->next_buffer to transmit all buffers
in the chain. Only set EOP at the last descriptor in the chain to signal
this is a chain descriptor.

Introduce slow path to handle ring wrap. This is needed because chain
buffer may consist of multiple pieces and it may span from near the end of
the ring to the beginning of the ring.

Type: fix
Ticket: VPP-1843

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

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

Type: fix

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

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

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

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

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

Type: fix

Change-Id: Iae1a68bf8f9e666856b7c7d62ebfe22defc5dfe1
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 6df2c7954126a316f86908526c3bb4d649f06597)

4 years agopapi: introduce read_blocking 50/24850/2
Vratko Polak [Tue, 10 Sep 2019 11:35:11 +0000 (13:35 +0200)]
papi: introduce read_blocking

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

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

Type: feature

Change-Id: Id49792dfa57c00b1a14a198031c5398d09a9ba20
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 0938547eaaf5440de28877fa4f873c21bcb8cfbf)

4 years agoapi: comment, simplify and fix api socket read 51/24851/2
Vratko Polak [Mon, 7 Oct 2019 12:52:53 +0000 (14:52 +0200)]
api: comment, simplify and fix api socket read

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

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

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

Improve:
+ Early exit on EAGAIN.

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

Type: fix
Ticket: VPP-1785

Change-Id: I256e34b435be06844458744a13ea37a0e86a96f9
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 6a6af6ea1a77b5818e717047b5d01251ef6d024a)

4 years agoclassify: fix "show classify filter" debug CLI 01/25101/1
Dave Barach [Wed, 12 Feb 2020 19:42:57 +0000 (14:42 -0500)]
classify: fix "show classify filter" debug CLI

Null pointer bug, memory leak. D'oh!

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic2865757ed9cbb7f48d23c7c30b64299eb5f6674
(cherry picked from commit 104112f2d412a4576b5e0d3bbb20665d2b5bd615)

4 years agoikev2: correct byte order in api handlers 69/23669/2
Aleksander Djuric [Mon, 11 Nov 2019 12:30:24 +0000 (15:30 +0300)]
ikev2: correct byte order in api handlers

Type: fix

Signed-off-by: Aleksander Djuric <aleksander.djuric@gmail.com>
Change-Id: I186286b8959ae138528a5171c22d3e1b00f46baf
Signed-off-by: Aleksander Djuric <aleksander.djuric@gmail.com>
(cherry picked from commit 50c99b4a8679e6c0d6f48677a5b91455bb612c86)

4 years agoclassify: "classify filter ..." debug CLI cleanup 49/25049/2
Dave Barach [Tue, 24 Dec 2019 21:59:38 +0000 (16:59 -0500)]
classify: "classify filter ..." debug CLI cleanup

The pcap trace filter initial table index lives in
cm->filter_set_by_sw_if_index [0], which corresponds to the "local0"
interface. Debug cli makes sure that folks don't accidentally specify
the "local0" interface. At least it does now...

Fix the "vlib format.c code coverage" test in test/test_vlib.py.

Type: fix
Change-Id: I35320bc2c8f0c6f1f8c12e3529d1938548185151
Signed-off-by: Dave Barach <dave@barachs.net>
(cherry picked from commit 29c6132108be68feb11c8d9bfaaf674cba86ee33)

4 years agoclassify: vpp packet tracer support 13/25013/2
Dave Barach [Wed, 4 Dec 2019 22:19:12 +0000 (17:19 -0500)]
classify: vpp packet tracer support

Configure n-tuple classifier filters which apply to the vpp packet
tracer.

Update the documentation to reflect the new feature.

Add a test vector.

Type: feature

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Iefa911716c670fc12e4825b937b62044433fec36
(cherry picked from commit 87d24db65facb89ca524c951b8379ca2ec4dbc7a)

4 years agovppinfra: fix typo in tw_timer_template.c 67/24767/2
Dave Barach [Mon, 3 Feb 2020 16:57:41 +0000 (11:57 -0500)]
vppinfra: fix typo in tw_timer_template.c

Fix minor memory leak

Type: fix
Ticket: VPP-1833
Fixes: 4af9ba1dab

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

4 years agovppinfra: preserve total_cpu_time across clock freq adjustment 78/24378/2
Dave Barach [Sun, 1 Dec 2019 13:59:03 +0000 (08:59 -0500)]
vppinfra: preserve total_cpu_time across clock freq adjustment

If clib_time_verify_frequency() adjusts the clock frequency, transform
total_cpu_time to the new time coordinate space. Otherwise, we break
comparisons with previous clib_time_now() value.

Without this correction, time jumps in one direction or the other
depending on the sign of the frequency change. Reasonably harmless in
most cases, but under perfect storm conditions the wheels fall off.

Type: fix

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

4 years agopmalloc: always lock pages 28/24428/2
Damjan Marion [Wed, 30 Oct 2019 17:07:35 +0000 (18:07 +0100)]
pmalloc: always lock pages

Type: feature

Change-Id: I5bbf37969c9c51e40a013d1fc3ab966838eeb80d
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 801c7016ad90e5f5618f523b3f9284daee0b696c)

4 years agolb: lb_add_del_vip and lb_add_del_as doesn't work. 78/23678/2
Hongjun Ni [Tue, 26 Nov 2019 11:36:17 +0000 (19:36 +0800)]
lb: lb_add_del_vip and lb_add_del_as doesn't work.

Ticket: FDIO-753
Type: fix

Change-Id: I4a8cf06970b658dfa15768459a3ff76571d6dfff
Signed-off-by: Hongjun Ni <hongjun.ni@intel.com>
(cherry picked from commit e69f4714323e1f7e7754fef58a2d75949e146317)

4 years agovlib: autogenerate <node> before <last-in-arc> constraints 77/23677/2
Dave Barach [Fri, 22 Nov 2019 22:42:58 +0000 (17:42 -0500)]
vlib: autogenerate <node> before <last-in-arc> constraints

If an arc declaration includes '.last_in_arc = "some-node"', assume
that folks mean it and add explicit ordering constraints.

Fix the "arp" arc declaration which claimed that the arc ends at
arp-disabled, but the arc really ends at error-drop.

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ie2de1fb30091671cbc7c62770903a2e05987f141
(cherry picked from commit 5f9f3c8de8d5d9f83a437661a98e5cc2453705f9)

4 years agoikev2: fix memory leak in child SA 74/23674/2
Filip Tehlar [Wed, 23 Oct 2019 20:39:38 +0000 (20:39 +0000)]
ikev2: fix memory leak in child SA

traffic selector vector isn't freed when freeing child SA

Type: fix

Change-Id: Icf6c240db5093f45d141451bad6f6627a61821cf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
(cherry picked from commit 99eefc2cfee4f71e1aaad1d420e6d9335072eb2c)

4 years agoapi: configurable binary api client rx pthread fcn 70/23670/2
Dave Barach [Thu, 14 Nov 2019 13:03:48 +0000 (08:03 -0500)]
api: configurable binary api client rx pthread fcn

Add vl_client_connect_to_vlib_thread_fn (...) and export the
memory_client_main_t definition.

If you use this new API, make sure not to miss the setjmp / longjmp
dance shown in .../src/vlibmemory/memory_client.c:rx_thread_fn(...),
which is required for the rx pthread to terminate cleanly; please
process client delete reply messages in the rx thread...

Type: refactor

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ia67038ec59e2e14b174c67afca15b2c3f67a4d20
(cherry picked from commit 920180e5e0722c78c258ff26476fd5efa434032d)

4 years agosession: extra checks in session validation 71/23671/2
Srikanth Akula [Mon, 18 Nov 2019 19:49:58 +0000 (11:49 -0800)]
session: extra checks in session validation

Type: fix

Adding few extra checks while doign session validationwq!

Signed-off-by: Srikanth Akula <srakula@cisco.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4d18b5ad97d1802ce38a07aeb56b5f35939c1187
(cherry picked from commit e140d5d0255b80f8dda945daf7202b5698d81d9b)

4 years agovirtio: feature arc have higher priority than redirect 68/23668/2
Damjan Marion [Wed, 13 Nov 2019 09:12:53 +0000 (10:12 +0100)]
virtio: feature arc have higher priority than redirect

Type: fix
Fixes: 8389fb9

Change-Id: Ie159eb444b28b36a7af86049b80fba4e49be93cb
Signed-off-by: Damjan Marion <damarion@cisco.com>
(cherry picked from commit 06c194d91b6d2d888ed2b0c5cf0df1cdbc7c53a4)

4 years agotcp: improve lost rxt heuristic 65/23665/2
Florin Coras [Wed, 30 Oct 2019 16:22:14 +0000 (09:22 -0700)]
tcp: improve lost rxt heuristic

Type: feature

- retransmit first unacked segment if newer retransmitted packets
are acked
- avoid spurious retransmits if recovery ends with sacked bytes

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

4 years agosession: re-set tx fifo event if out of buffers 08/23508/2
Florin Coras [Fri, 8 Nov 2019 23:32:05 +0000 (15:32 -0800)]
session: re-set tx fifo event if out of buffers

Type: fix

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

4 years agolacp: add actor steady state check prior to skip processing lacp pdu 97/22997/2
Steven Luong [Fri, 25 Oct 2019 16:52:19 +0000 (09:52 -0700)]
lacp: add actor steady state check prior to skip processing lacp pdu

In a rare event, we may be skipping processing lacp pdu's when the it is
not in steady state.

Type: fix

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

4 years agofib: refresh adj pointer after fib_walk_sync due to possible realloc 45/24645/2
Steven Luong [Wed, 29 Jan 2020 21:26:47 +0000 (13:26 -0800)]
fib: refresh adj pointer after fib_walk_sync due to possible realloc

fib_walk_sync may call adj_alloc which may cause adj_pool to expand. When
that happens, any previous frame which still use the old adj pointer needs to
refresh. Failure to do so may access or update to the old adj memory
unintentionally and crash mysteriously.

Type: fix
Ticket: VPPSUPP-54

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

4 years agodevices: vhost: fix data offset on input 98/24598/2
Benoît Ganne [Fri, 24 Jan 2020 17:06:01 +0000 (18:06 +0100)]
devices: vhost: fix data offset on input

Regardless of whether the virtio_net_hdr is sent as a separate
descriptors or in the same descriptor as the data, we always want to
skip the header length - maybe moving to the next descriptor along the
way.

Type: fix

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

4 years agobfd: reset peer discriminator on timeout 14/24614/2
Klement Sekera [Fri, 17 Jan 2020 10:01:52 +0000 (10:01 +0000)]
bfd: reset peer discriminator on timeout

More RFC compliance.

Ticket: VPP-1816 BFD: peer discriminator not reset on timeout
Type: fix

Change-Id: I68063c18097d282b3527e3fb485c1d0d1fd1b0c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
4 years agobonding: Add GSO support 06/24206/5
Steven Luong [Mon, 6 Jan 2020 23:14:46 +0000 (15:14 -0800)]
bonding: Add GSO support

Add GSO support, configurable from the CLI.

Type: feature
Ticket: VPP-1820

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

4 years agobonding: process lacp when bond is admin down 90/24290/4
Matthew Smith [Tue, 7 Jan 2020 17:34:43 +0000 (11:34 -0600)]
bonding: process lacp when bond is admin down

Ticket: VPP-1821
Type: fix
Fixes: 6dfd3785e4

When a bond interface is administratively down but the slaves are
up, process inbound LACP packets received over the slaves. This
was the old behavior with bond interfaces in LACP mode and was
altered unintentionally by another change. Restore the old behavior.

Change-Id: I61b0b700211dea4859b6ee447ab83b33197d9d11
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 854eb6e3ff87ace211a45a8053424d8432bd5755)

4 years agofib: Reload the adj after possible realloc (VPP-1822) 00/24500/2
Neale Ranns [Thu, 23 Jan 2020 22:46:06 +0000 (22:46 +0000)]
fib: Reload the adj after possible realloc (VPP-1822)

Type: fix
Fixes: 418b225931634f6d113d2971cb9550837d69929d

Change-Id: Ia5f4ea24188c4f3de87e06a7fd07b40bcb47cfc1
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agoapi: mark api_trace_command_fn thread-safe 98/24498/1
Dave Barach [Thu, 23 Jan 2020 13:44:40 +0000 (08:44 -0500)]
api: mark api_trace_command_fn thread-safe

Binary API trace replay with multiple worker threads depends in many
cases on worker thread graph replica maintenance. If we (implicitly)
assert a worker thread barrier at the debug CLI level, all graph
replica changes are deferred until the replay operation completes. If
an interface is deleted, the wheels may fall off.

Type: fix
Ticket: VPP-1824

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

4 years agofib: Adjacency realloc during rewrite update walk (VPP-1822) 93/24293/3
Neale Ranns [Sun, 12 Jan 2020 21:16:55 +0000 (21:16 +0000)]
fib: Adjacency realloc during rewrite update walk (VPP-1822)

Type: fix

Change-Id: I0e826284c50713d322ee7943d87fd3363cfbdfbc
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agofib: FIB crash removing labelled route (VPP-1818) 19/24419/4
Neale Ranns [Mon, 20 Jan 2020 02:28:00 +0000 (02:28 +0000)]
fib: FIB crash removing labelled route (VPP-1818)

Type: fix

The crash occured trying to retreive a NULL path list to walk the path
extensions. A walk shoul not be required, because there should be no
extensins, since all paths are removed. The problem is that when the
paths were added, they were not sorted, hence neither were the
extensions and when they were updated, duplicate extensions were added,
and hence a path removal did not remove them all.
Fix is to make sure paths are sorted.

Change-Id: I069d937de8e7bc8aae3d92f588db4daff727d863
Signed-off-by: Neale Ranns <nranns@cisco.com>
4 years agol2: fix MAC learn counter update on adding MAC entry 44/24244/1
John Lo [Tue, 7 Jan 2020 21:35:29 +0000 (16:35 -0500)]
l2: fix MAC learn counter update on adding MAC entry

Type: fix

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

4 years agobonding: drop traffic on backup interface for active-backup mode 79/24079/2
Steven Luong [Sat, 7 Dec 2019 05:12:41 +0000 (21:12 -0800)]
bonding: drop traffic on backup interface for active-backup mode

For active-backup mode, we transmit on one and only one interface. However,
we might still receive traffic on the backup interface. We should drop them
and strictly process incoming traffic on only the active interface.

Type: fix

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: Idb6b798b30033e84044b151c616be3c157329731
(cherry picked from commit 6dfd3785e4d65418f4330a73bf837912c37b8ec2)

4 years agogso: fix the number of buffers required for segmentation 24/24124/2
Mohsin Kazmi [Tue, 24 Dec 2019 22:00:49 +0000 (23:00 +0100)]
gso: fix the number of buffers required for segmentation

Ticket: VPPSUPP-51
Type: fix

Change-Id: I34d4237eb0644705ce0f523fdd0d6b70308e8bcd
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 years agofib: Adjacency walk fix for IPv6 26/24026/2
Neale Ranns [Mon, 16 Dec 2019 23:14:14 +0000 (23:14 +0000)]
fib: Adjacency walk fix for IPv6

Type: fix

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