vpp.git
3 years agofeature: add [verbose] to show features help 54/28254/1
Paul Vinciguerra [Wed, 6 Nov 2019 20:41:45 +0000 (15:41 -0500)]
feature: add [verbose] to show features help

Type: fix

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

3 years agovlib: fix startup-config-process stack overflow 53/28253/1
GordonNoonan [Wed, 4 Dec 2019 15:16:40 +0000 (15:16 +0000)]
vlib: fix startup-config-process stack overflow

Type: fix

Startup config setting an i40e/ice interface
up in Debug VPP consumes more than the currently
available stack space.

Signed-off-by: GordonNoonan <gordon.noonan@intel.com>
Change-Id: I98b52c5596799017b97f802a8661b76cd1bb3245
(cherry picked from commit b2dbb36fc265b8996fc7fa310dda447d5b0479cb)

3 years agovlib: fix an issue with show pci 48/28248/2
Vratko Polak [Fri, 6 Dec 2019 15:49:36 +0000 (16:49 +0100)]
vlib: fix an issue with show pci

The fix has been received over e-mail from Lijian Zhang.
https://lists.fd.io/g/vpp-dev/message/14808

Type: fix
Ticket: VPP-1805

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

3 years agobuild: Allow to override build date with SOURCE_DATE_EPOCH 47/28247/2
Bernhard M. Wiedemann [Thu, 5 Dec 2019 15:51:26 +0000 (16:51 +0100)]
build: Allow to override build date with SOURCE_DATE_EPOCH

and make host and user overridable
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Also switch to UTC to be independent of timezone.
Also use ISO 8601 date format to be easier to parse.
This is similar to c9f40227836b827b71a6cbc4744d4b7151b2fcef
and df82ec8fe7d91467c8b479bba74c761c0a6ffc59
which was lost in the move away from automake.

Note: This date call is designed to work with different flavors
of date (GNU, BSD and others).
If only GNU (Linux) support is needed, the patch can be simplified.

This PR was done while working on reproducible builds for openSUSE.

Type: fix

Change-Id: If4cab12320e6b5fcb1f2842fac5d745b33b01ed7
Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
(cherry picked from commit 3d14f036199d9b3098268821424b4e6f5e8f46dc)

3 years agovlib: fix vector-as-C-string overflow 46/28246/2
Benoît Ganne [Mon, 16 Dec 2019 14:49:47 +0000 (15:49 +0100)]
vlib: fix vector-as-C-string overflow

Type: fix

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

3 years agoclassify: forbid invalid match config 45/28245/2
Benoît Ganne [Tue, 10 Dec 2019 11:44:46 +0000 (12:44 +0100)]
classify: forbid invalid match config

Forbid too long match to be configured.

Type: fix

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

3 years agovppinfra: fix cpu flag string overflow 44/28244/2
Benoît Ganne [Mon, 16 Dec 2019 15:00:14 +0000 (16:00 +0100)]
vppinfra: fix cpu flag string overflow

Type: fix

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

3 years agol2: fix l2input_feat_names overflow 43/28243/2
Benoît Ganne [Mon, 16 Dec 2019 14:51:38 +0000 (15:51 +0100)]
l2: fix l2input_feat_names overflow

Type: fix

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

3 years agoipsec: Init salt value in SA creation CLI (so it's not random) 42/28242/2
Neale Ranns [Tue, 10 Dec 2019 01:08:19 +0000 (01:08 +0000)]
ipsec: Init salt value in SA creation CLI (so it's not random)

Type: fix

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

3 years agoapi: fix sock reg passing on read event 41/28241/2
Florin Coras [Sat, 7 Dec 2019 01:05:08 +0000 (17:05 -0800)]
api: fix sock reg passing on read event

Type: fix

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

3 years agoipsec: make sure pad_bytes does not exceed pad data size 40/28240/2
Benoît Ganne [Sat, 7 Dec 2019 16:14:27 +0000 (09:14 -0700)]
ipsec: make sure pad_bytes does not exceed pad data size

This helps GCC understand the memcpy will not overflow pad_data. GCC-6
(default on Debian 9) in particular got confused.

Type: fix

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

3 years agoip: coverity fix 39/28239/2
johny [Fri, 6 Dec 2019 12:58:35 +0000 (13:58 +0100)]
ip: coverity fix

Delete Null-checking "p0" in function ip6_tcp_udp_icmp_bad_length,
because it's not necessary.

Type: fix

Signed-off-by: johny <jan.cavojsky@pantheon.tech>
Change-Id: I2bf43a60c1c1d76e42581df27f2285c9e9563093
(cherry picked from commit a633a4318bea2f9edcb80d9685b0f811cac679ea)

3 years agoapi: fix free socket process args 38/28238/2
Florin Coras [Fri, 6 Dec 2019 04:10:53 +0000 (20:10 -0800)]
api: fix free socket process args

Type: fix

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

3 years agovcl: RX event may lost when accept session repeatedly 37/28237/2
wanghanlin [Mon, 16 Dec 2019 11:14:39 +0000 (19:14 +0800)]
vcl: RX event may lost when accept session repeatedly

Type: fix

Some applications may call accept repeatedly to process all connect
request until get EAGIAIN error. Subsequent call may get RX event of
previous accepted session, then should process it rather than just
discard it.

Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: Ice53442de66289a62591b79a9cc31e883e894c23
(cherry picked from commit 96453fd2417ebd1d69354a7fb692976129cea80e)

3 years agosession: close for reset replies independent of state 36/28236/2
Florin Coras [Thu, 5 Dec 2019 20:05:57 +0000 (12:05 -0800)]
session: close for reset replies independent of state

Type: fix

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

3 years agotcp: fix tail rescue with sacks 35/28235/2
Florin Coras [Sat, 16 Nov 2019 01:56:48 +0000 (17:56 -0800)]
tcp: fix tail rescue with sacks

Type: fix

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

3 years agoip: fix cancel termination after receive malformed ip6 packet 34/28234/2
johny [Fri, 11 Oct 2019 16:28:51 +0000 (18:28 +0200)]
ip: fix cancel termination after receive malformed ip6 packet

This fix is for cancel termination of vpp after receive malformed
packet type of ip6.To avoid termination of vpp are checked if are
missing data in packet. This occours, when payload length in ip6
header packet is more than real count of data in packet. When
this error occours, packet is ignore.

Type: fix
Ticket: VPP-1693, VPP-1694

Change-Id: I9d9ecea7b75c8702cb31aa8051c8d4d7ce19659d
Signed-off-by: johny <jan.cavojsky@pantheon.tech>
(cherry picked from commit 17478e4eb81d384f171ca27c9110a051cd434f16)

3 years agotests: fix wrong checksum error message 33/28233/2
Klement Sekera [Thu, 5 Dec 2019 13:13:21 +0000 (13:13 +0000)]
tests: fix wrong checksum error message

This change fixes the error message, which would previously report
mismatch on IPv6 layer instead of TCP layer.

Type: fix

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

3 years agovcl: resolve VCL part session cleanup issue 32/28232/2
Yu Ping [Tue, 3 Dec 2019 22:49:04 +0000 (06:49 +0800)]
vcl: resolve VCL part session cleanup issue

In Nginx performance test, we notice that there are so many session kept
open with the state of TRANSPORT_DELETE, and it is root caused that
vppcom fails to return close state.

Type: fix

Change-Id: Ia30f959e0e5adb5b8bcfa13fb1dd7b2cb410a31b
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit b2955355cc9a654447d8647e33def67cd27892f6)

3 years agotls: change SSL_has_pending to avoid BIO check error 31/28231/2
Yu Ping [Thu, 28 Nov 2019 19:14:42 +0000 (03:14 +0800)]
tls: change SSL_has_pending to avoid BIO check error

Type: fix

Change-Id: I454aff1b187b75a1328c90e30b9b487377ae5f68
Signed-off-by: Yu Ping <ping.yu@intel.com>
(cherry picked from commit ce9bdfe5fcfa6e2acd670ea0063ce5e0fde15096)

3 years agomap: Fix a coverity MAP dead-code issue. 30/28230/2
Jon Loeliger [Wed, 4 Dec 2019 17:46:52 +0000 (11:46 -0600)]
map: Fix a coverity MAP dead-code issue.

Type: fix

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

3 years agomap: Avoid null dereference in 'map show' and 'map del' 28/28228/2
Jon Loeliger [Thu, 21 Nov 2019 17:15:53 +0000 (11:15 -0600)]
map: Avoid null dereference in 'map show' and 'map del'

If a map domain is created without a tag name, inspecting
the map data will segfault looking for an unset name in
the so-called "domain extras" vector.

Enhance "show map domain" to show all map domains.

Type: fix
Change-Id: Ic55662b84eec58221816da270b2ef9e89c3a31c3
Signed-off-by: Jon Loeliger <jdl@netgate.com>
(cherry picked from commit 4a6d093e7ef72b06b35ffee911d35033dfde0171)

3 years agoip: init l3_hdr_offset when pushing an ip4 header 27/28227/2
Florin Coras [Wed, 27 Nov 2019 02:43:25 +0000 (18:43 -0800)]
ip: init l3_hdr_offset when pushing an ip4 header

Type: fix

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

3 years agotests: display stdout and stderr when output caching is disabled 25/28225/2
Benoît Ganne [Thu, 21 Nov 2019 15:50:24 +0000 (16:50 +0100)]
tests: display stdout and stderr when output caching is disabled

Type: fix

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

3 years agoflow: fix several crash issues 81/23681/4
Chenmin Sun [Thu, 21 Nov 2019 21:33:40 +0000 (05:33 +0800)]
flow: fix several crash issues

Type: fix

This patch fixes crash issues(marked in brackets) in the below test cases

test flow enable index 0 1/1 -> [crash]
test flow disable index 0 1/1 -> [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow disable index 0 1/1 - [crash]

test flow add src-ip 192.168.8.8 proto udp redirect-to-queue 8
test flow enable index 0 1/1
test flow enable index 0 1/2
test flow del index 0 -> [crash]

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

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)