vpp.git
3 years agopapi: add support for enumflag part 1 of 2 66/30266/4
Paul Vinciguerra [Fri, 4 Dec 2020 02:06:28 +0000 (21:06 -0500)]
papi:  add support for enumflag part 1 of 2

Allow for papi to accept the new enumflag type.

Change-Id: I8d8dc8fdb122e9a1b1881f5b2558635c75e4a299
Type: feature
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 299abebe2942b4c78b85f9f3b8843f8213bf1efe)

3 years agovppapigen: add parser support for enumflags 18/30118/12
Paul Vinciguerra [Wed, 25 Nov 2020 04:26:06 +0000 (23:26 -0500)]
vppapigen:  add parser support for enumflags

Type: improvement

Change-Id: I0f15862cc8399a4f7c8a81fe44ba8b27d8772278
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Signed-off-by: Ole Troan <ot@cisco.com>
(cherry picked from commit e15523297bb3905f2e0eef4272fc69a8a92463cc)

3 years agostats: fix coverity issues 71/30271/2
Andrew Yourtchenko [Fri, 4 Dec 2020 07:22:01 +0000 (07:22 +0000)]
stats: fix coverity issues

Usage of the possibly negative value with subsequent check on it
makes coverity very unhappy, so put the check before use.

Change-Id: I731fbe6246f9e4212d546fd9277bc1ddcd3c2ec1
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
3 years agolisp: .api dont set defaults in reply messages 32/26932/2
Paul Vinciguerra [Wed, 6 May 2020 19:11:42 +0000 (15:11 -0400)]
lisp:  .api dont set defaults in reply messages

Type: fix

Change-Id: I39afa6ee048dd293c5e17120fa661052eb3477d1
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotls: allow picotls to use secp elliptic curves 58/30258/2
Vladimir Medvedkin [Wed, 2 Dec 2020 17:39:01 +0000 (17:39 +0000)]
tls: allow picotls to use secp elliptic curves

Fix typos in macros for elliptic curves over prime field.

Type: fix
Fixes: f83194c2f4

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Change-Id: I657a7feaf1d1fdf3f2ca74fb3787977c65891a20

3 years agovirtio: fix the offloads in tx path 56/30256/2
Mohsin Kazmi [Thu, 3 Dec 2020 15:35:20 +0000 (16:35 +0100)]
virtio: fix the offloads in tx path

Type: fix

Change-Id: I1f1f0b6e8c5ef8bc9f2aca4bdc78e89fa951b841
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agonat: fix forwarding handoff workaround 94/29594/13
Filip Varga [Thu, 22 Oct 2020 09:13:00 +0000 (11:13 +0200)]
nat: fix forwarding handoff workaround

A special case when out2in packet needs to
be handoffed to other worker thread. We are
not able to determine which thread they belong
to in the first processing of nat handoff node.
These packets needs to go through out2in slowpath
before we are able to tell where to handoff them.

Type: fix
Ticket: VPP-1941

Change-Id: I7173bda970ce6a91d81f48fc72aa2457586a076f
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agotests: remove py2/py3 six compatability library 44/30244/4
Paul Vinciguerra [Thu, 3 Dec 2020 05:42:46 +0000 (00:42 -0500)]
tests: remove py2/py3 six compatability library

Type: test

Change-Id: Idb6b8169845e0239e639429ccfd02a683212b7e6
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotls: fix passed argument in openssl plugin 57/30257/2
Vladimir Medvedkin [Wed, 2 Dec 2020 17:56:12 +0000 (17:56 +0000)]
tls: fix passed argument in openssl plugin

Thread index used in qat_init_thread() is passed via a pointer
to a variable located on a stack that does not exist
when qat_init_thread is actually executed.

Type: fix
Fixes: f4a92f6a1c

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Change-Id: I65dd4e604b78fcb1cf0452d707f47f9785e6371d

3 years agosvm: fix mutex consistency on trylock 33/30233/4
Florin Coras [Wed, 2 Dec 2020 15:57:00 +0000 (07:57 -0800)]
svm: fix mutex consistency on trylock

Type: fix

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

3 years agopapi: remove python2 patterns 40/30240/3
Paul Vinciguerra [Wed, 2 Dec 2020 19:34:27 +0000 (14:34 -0500)]
papi: remove python2 patterns

Type: refactor

Change-Id: I541759b4b788acf08599661eb9e7abc58e9283d2
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agopapi: allow client control over loggers 42/30242/2
Paul Vinciguerra [Wed, 2 Dec 2020 22:43:59 +0000 (17:43 -0500)]
papi: allow client control over loggers

This change enables a client to set debug levels
globally as well as individually.

exposes loggers as
  vpp_papi
  vpp_papi.serializer
  vpp_papi.transport

Type: improvement

Change-Id: Ib6bd1a1f552b51a22c9fe3de819a5fb970963ae5
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agostats: char-pointer arithmetic style-up 36/30236/3
Vratko Polak [Wed, 2 Dec 2020 17:45:16 +0000 (18:45 +0100)]
stats: char-pointer arithmetic style-up

Char* typed shared_header value appears multiple times,
so store it is a variable.
Pointer "p" value is used more frequently casted to char*,
so use that type for it, and convert to void* only at return.

Type: style
Fixes: 41f15ae1dfd4ac1777b684fdc763d12496209418

Change-Id: I7b3f1e6a43c020acd7ae561f87d12237b07fcd66
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agonat: fix incorrect session removal case 37/30237/3
Klement Sekera [Wed, 2 Dec 2020 18:27:24 +0000 (18:27 +0000)]
nat: fix incorrect session removal case

Add a condition where a TCP session in transitory timeout is kept
instead of being erroneously deleted.

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

3 years agotests: fix typo in numbered list in documentation 50/30250/1
Elias Rudberg [Thu, 3 Dec 2020 12:29:38 +0000 (13:29 +0100)]
tests: fix typo in numbered list in documentation

Fix a typo in numbered list in the documentation. Also mention
possibility of using TEST= to run a specific test.

Type: fix

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

3 years agotests: remove aenum library 45/30245/1
Paul Vinciguerra [Thu, 3 Dec 2020 05:46:03 +0000 (00:46 -0500)]
tests:  remove aenum library

the aenum library was used to provide intflag functionality
for python versions earlier than 3.6

Type: test

Change-Id: I914d390ee5364f337006c1c59abafe4b9a3c1bde
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotests: add type annotations to the vpp object abstract class 22/30222/2
Paul Vinciguerra [Tue, 1 Dec 2020 16:33:28 +0000 (11:33 -0500)]
tests: add type annotations to the vpp object abstract class

make it easier to detect logical mistakes.

Type: test

Change-Id: I853748ffaeebc545c8d31299f0d105405ad80bba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agonat: use correct per-thread vlib_main 35/30135/2
Benoît Ganne [Wed, 25 Nov 2020 13:32:53 +0000 (14:32 +0100)]
nat: use correct per-thread vlib_main

Using vlib_main of another thread is prohibited.

Type: fix

Change-Id: I9a85a5fee5c6665d423b4306faf3b3f2c5e22f99
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agopapi: improve unit testability 08/30208/4
Paul Vinciguerra [Tue, 1 Dec 2020 07:00:35 +0000 (02:00 -0500)]
papi:  improve unit testability

refactor the code so that snippets of json can be used to test vpp_papi
example unit test provided

Type: improvement

Change-Id: Ibec608fd2e5b12515aa4db17d85d4319134c22ea
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agostats: void-pointer arithmetic fix 07/30207/2
Elias Rudberg [Tue, 1 Dec 2020 06:52:48 +0000 (07:52 +0100)]
stats: void-pointer arithmetic fix

Cast to (char *) to avoid pointer arithmetic for (void *) pointers.

Type: fix

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

3 years agopapi: fix copy/paste error 25/30225/2
Paul Vinciguerra [Wed, 2 Dec 2020 04:45:38 +0000 (23:45 -0500)]
papi: fix copy/paste error

Type: fix

Change-Id: I8bd20fb38e132f6ab8cbc0e73095b649b5946498
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agoikev2: fix nat traversal 21/30221/3
Filip Tehlar [Tue, 1 Dec 2020 14:51:09 +0000 (14:51 +0000)]
ikev2: fix nat traversal

Type: fix

Change-Id: Ie723cf680745ec2292a15e2df05c1821436dba19
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agosession: make pacer worker load aware 19/29919/7
Florin Coras [Thu, 12 Nov 2020 18:20:05 +0000 (10:20 -0800)]
session: make pacer worker load aware

Type: improvement

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

3 years agosession: allow small pacer bursts 27/29727/13
Florin Coras [Tue, 3 Nov 2020 02:00:32 +0000 (18:00 -0800)]
session: allow small pacer bursts

Instead of enforcing a "strict" release of data, which relies on
frequent rescheduling of sessions, allow some pacer coalescing, i.e.,
short bursts, that can minimize load on scheduler/session layer and
potentially leverage tso.

Type: improvement

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

3 years agowireguard: return public key in api 46/30146/4
Nathan Skrzypczak [Thu, 26 Nov 2020 08:27:01 +0000 (09:27 +0100)]
wireguard: return public key in api

Type: feature

Change-Id: Iacb0da8bc738ed400678f9bb40e70e0031c6588e
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotests: remove ip_punt from vpp_papi_provider and add ip_punt object models 12/30212/2
Jakub Grajciar [Tue, 1 Dec 2020 10:23:44 +0000 (11:23 +0100)]
tests: remove ip_punt from vpp_papi_provider and add ip_punt object models

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I1bf53c2554e6b313467f618717698ed158db9065
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
3 years agoipsec: change prediction 79/29979/4
Fan Zhang [Wed, 18 Nov 2020 09:46:39 +0000 (09:46 +0000)]
ipsec: change prediction

Type: improvement

This patch changes the prediction of the comparison between
SA owner thread index and the current thread index.

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

3 years agoavf: add TSO support 30/29930/6
Mohammed Hawari [Tue, 10 Nov 2020 09:26:45 +0000 (10:26 +0100)]
avf: add TSO support

Change-Id: Ica663e1d07225acf53fd74b0051a5a2a34174960
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement

3 years agoebuild: perform build and install at the same time for external.mk 01/30201/2
Mohammed Hawari [Mon, 30 Nov 2020 14:04:43 +0000 (15:04 +0100)]
ebuild: perform build and install at the same time for external.mk

Change-Id: I65379f346fe3f881ce4196d99882cd6013e5e154
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agotests: Fix unversioned python shebang lines 05/30205/1
Dave Wallace [Mon, 30 Nov 2020 21:56:43 +0000 (16:56 -0500)]
tests: Fix unversioned python shebang lines

- Unversioned python shebang lines may cause
  mixed python 2.7 and python 3 execution in
  make test.

Type: fix

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

3 years agosvm: make svm queue mutex robust 85/30185/4
Florin Coras [Fri, 27 Nov 2020 17:49:10 +0000 (09:49 -0800)]
svm: make svm queue mutex robust

Type: improvement

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

3 years agotests: IPv6 multicast over GRE 47/30047/2
Neale Ranns [Fri, 20 Nov 2020 14:32:56 +0000 (14:32 +0000)]
tests: IPv6 multicast over GRE

Type: test

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

3 years agomap: add include guard to map.h 87/30187/2
Paul Vinciguerra [Sun, 29 Nov 2020 21:05:42 +0000 (16:05 -0500)]
map:  add include guard to map.h

Type: fix

Change-Id: I26c3640d9fe82d4cf22f19935eeca1411f9a1c3b
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agodpdk: fix cryptodev compile 78/30178/6
Fan Zhang [Thu, 26 Nov 2020 16:14:53 +0000 (16:14 +0000)]
dpdk: fix cryptodev compile

Type: fix

VPP 20.09 used new cryptodev raw APIs in cryptodev_dp_api.c
provided by the DPDK 20.08 patch attached.

The APIs has been updated between now and then and will cause
Cryptodev engine compile failed when bumping DPDK to 20.11
due to the incompatible API formats.

As a temp solution to successfully bumping DPDK version this patch
makes the newer DPDK version using old cryptodev APIs by compiling
cryptodev.c instead.

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

3 years agoip: Sub Address Family types. Feature enable for each SAFI 76/30176/4
Neale Ranns [Thu, 26 Nov 2020 14:15:33 +0000 (14:15 +0000)]
ip: Sub Address Family types. Feature enable for each SAFI

Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I318424ffa569d9a09187066d6ba15576757c1cf6

3 years agovlib: fix vlib log elog vector overrun 81/30181/2
Benoît Ganne [Thu, 26 Nov 2020 18:56:44 +0000 (19:56 +0100)]
vlib: fix vlib log elog vector overrun

vlib log strings are vectors not necessarily null-terminated C-string.

Type: fix
Fixes: bc867c3d2137dab4b1395196c1936233517980ab

Change-Id: Ia805ecdf4e76ccb1001dc93647161ee1c3adebc9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto: improve ipsecmb engine performance 80/30180/2
Fan Zhang [Thu, 26 Nov 2020 17:01:05 +0000 (17:01 +0000)]
crypto: improve ipsecmb engine performance

Type: improvement

This patch improves ipsecmb engine performance by disabling
safety features: SAFE_DATA, SAFE_PARAM, and SAFE_LOOKUP.

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

3 years agodocs: fix bihash doc bugs 51/30151/2
Dave Barach [Thu, 26 Nov 2020 12:47:48 +0000 (07:47 -0500)]
docs: fix bihash doc bugs

Change hash -> hash_table in the pro forma main_t structure.
Remove trailing whitespace.

Type: docs

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

3 years agosvm: use internal function to prealloc fifo hdrs 82/30182/2
Florin Coras [Thu, 26 Nov 2020 19:34:38 +0000 (11:34 -0800)]
svm: use internal function to prealloc fifo hdrs

Type: improvement

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

3 years agonat: fix tests 94/29994/3
Filip Varga [Thu, 19 Nov 2020 09:58:42 +0000 (10:58 +0100)]
nat: fix tests

Fixed nat_ha and ipfix tests. Removed obsolete tests
and moved extended tests to standard tests.

Type: fix
Change-Id: I2d7f4c4fa4c52a4aa10d70c956e085a0fe00b911
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agovcl: avoid coalescing dgrams on read 44/30144/2
Florin Coras [Thu, 26 Nov 2020 04:26:32 +0000 (20:26 -0800)]
vcl: avoid coalescing dgrams on read

Type: improvement

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

3 years agosvm: only try to pre-allocate requested number of fifo pairs 36/30136/4
Benoît Ganne [Wed, 25 Nov 2020 14:06:01 +0000 (15:06 +0100)]
svm: only try to pre-allocate requested number of fifo pairs

Type: fix

Change-Id: I6f7679fd48d0ed98677c58f8c08d7e969e8e8220
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovlib: clean up event-logger CLI 24/30124/6
Dave Barach [Wed, 25 Nov 2020 12:23:42 +0000 (07:23 -0500)]
vlib: clean up event-logger CLI

Change "elog trace" to "event-logger trace"; corresponding change in
test/test_vlib.py, verified that the vlib test vectors still pass even
though they're not run on a regular basis ("make GCOV_TESTS=yes
TEST=test_vlib ...")

Type: improvement

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

3 years agogre: Move to new API generated types/messages 55/30155/2
Neale Ranns [Thu, 26 Nov 2020 13:12:37 +0000 (13:12 +0000)]
gre: Move to new API generated types/messages

Type: improvement

also clean up GRE includes across the code base.

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

3 years agofib: Expressive type for walk return code. Honour code. 48/30148/2
Neale Ranns [Thu, 26 Nov 2020 09:34:39 +0000 (09:34 +0000)]
fib: Expressive type for walk return code. Honour code.

Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I487e698555545fce85d02d55deaaf7bb0007e388

3 years agofib: DPO layout add u64 parameter. 49/30149/2
Neale Ranns [Thu, 26 Nov 2020 09:41:01 +0000 (09:41 +0000)]
fib: DPO layout add u64 parameter.

Type: improvement

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: Iee04af801814b6360b045cf7dc8bcad6f517229e

3 years agoikev2: better handling when no IKE DH configured 22/30122/3
Filip Tehlar [Sat, 21 Nov 2020 21:30:45 +0000 (21:30 +0000)]
ikev2: better handling when no IKE DH configured

Type: improvement

Change-Id: I4289d20adaa3f2872889d5dbaafd9c025df8aca8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoip: reassembly - fix handoff for custom node 39/28739/7
Klement Sekera [Thu, 10 Sep 2020 12:03:54 +0000 (12:03 +0000)]
ip: reassembly - fix handoff for custom node

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

3 years agoip: trace icmp echo request/reply id 40/30140/2
Klement Sekera [Wed, 25 Nov 2020 16:47:00 +0000 (16:47 +0000)]
ip: trace icmp echo request/reply id

Type: improvement
Change-Id: Ie3a5b182e446c407f258c043c22d1cf25eb7ee59
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agofib: Only track cover if activated 20/30120/2
Neale Ranns [Wed, 25 Nov 2020 09:14:22 +0000 (09:14 +0000)]
fib: Only track cover if activated

Type: fix

also cleanup any tracking at delete

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

3 years agoipsec: A P2MP ipsec interface is NBMA 42/30142/1
Neale Ranns [Wed, 25 Nov 2020 19:35:38 +0000 (19:35 +0000)]
ipsec: A P2MP ipsec interface is NBMA

Type: fix

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

3 years agosession: add startup option to poll in main 39/30139/7
Florin Coras [Wed, 25 Nov 2020 16:44:16 +0000 (08:44 -0800)]
session: add startup option to poll in main

Type: improvement

Needed to support multi-worker tests

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

3 years agovlib: add elog events for vlib log entries 32/30132/2
Dave Barach [Wed, 25 Nov 2020 15:07:09 +0000 (10:07 -0500)]
vlib: add elog events for vlib log entries

Pretty interesting to see how long plugins take to load.

Type: improvement

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

3 years agodns: use correct per-thread vlib_main 37/30137/4
Benoît Ganne [Wed, 25 Nov 2020 15:43:13 +0000 (16:43 +0100)]
dns: use correct per-thread vlib_main

Using vlib_main of another thread is prohibited.

Type: fix

Change-Id: I7ae294dfaf2526738e91408c9b4865ef9f801b8a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosyslog: use per-thread vlib_main 33/30133/2
Benoît Ganne [Wed, 25 Nov 2020 12:51:33 +0000 (13:51 +0100)]
syslog: use per-thread vlib_main

We should not use main thread vlib_main in workers.

Type: fix

Change-Id: I58c0a8cadf2dc7f768b20ac90e7ec7921e2e8ca4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotcp: enable lc if any other debug option enabled 16/30116/4
Florin Coras [Wed, 25 Nov 2020 01:29:17 +0000 (17:29 -0800)]
tcp: enable lc if any other debug option enabled

Also fix debug build after snd_una_nxt removal.

Type: fix

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

3 years agopci: add PCIe Gen4 link speed 38/30138/2
Damjan Marion [Wed, 25 Nov 2020 16:13:38 +0000 (17:13 +0100)]
pci: add PCIe Gen4 link speed

Type: improvement
Change-Id: Iccf4fabe912ab7ac45b6fc082824a67d4fd9f216
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agodns: fix double-unlock 34/30134/1
Benoît Ganne [Wed, 25 Nov 2020 12:53:21 +0000 (13:53 +0100)]
dns: fix double-unlock

dns cache should no longer be unlocked by caller.

Type: fix
Fixes: 84a563ae4050cc0389dcd438fbe9ea882f2b8404

Change-Id: I3708718ae8f00e4e4f4e04381caa0095c8494b82
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoip-neighbor: Send API event when neighbor is removed 45/30045/3
Neale Ranns [Fri, 20 Nov 2020 13:05:59 +0000 (13:05 +0000)]
ip-neighbor: Send API event when neighbor is removed

Type: fix

Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Change-Id: I9952497a108bac26445af95c28d4eed46099c2fc

3 years agoikev2: fix issue when sending multiple requests at once 91/30091/3
Filip Tehlar [Thu, 19 Nov 2020 21:34:48 +0000 (21:34 +0000)]
ikev2: fix issue when sending multiple requests at once

Type: fix

Change-Id: I8ed556de4370a03d10c56cce101cd5ea0d0aaf8b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agodpdk: patch broken virtio macro 90/29990/2
Matthew Smith [Wed, 18 Nov 2020 19:40:31 +0000 (13:40 -0600)]
dpdk: patch broken virtio macro

Type: fix

In DPDK 20.08, the macro ASSIGN_UNLESS_EQUAL(), which is defined in the
virtio PMD code, is broken. It does not actually set the variable that is
passed in to the value that is passed in. It just assigns the value
to a local variable that it declares. This results in
virtqueue_clear_net_hdr() failing to clear the fields in the virtio
net header. This can cause packets which were sent over an IPsec tunnel
and are subsequently transmitted on a virtio interface to have garbage
in the virtio net header.

Apply a post-20.08 patch from upstream to fix it.

Change-Id: Ic53e89d859db628e26a3c1988e53b626fede94d7
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agordma: fixed UAR writing at tx 15/30115/3
Mohammed Hawari [Tue, 24 Nov 2020 17:36:33 +0000 (18:36 +0100)]
rdma: fixed UAR writing at tx

Change-Id: Id81b4d27845c4e91cef90a4b8649662942d3cba1
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix

3 years agoapi: vat2 and json autogeneration for api messages 90/29890/13
Ole Troan [Wed, 18 Nov 2020 18:17:48 +0000 (19:17 +0100)]
api: vat2 and json autogeneration for api messages

VAT2: A completely auto-generated replacement of VAT.
Reads input message in JSON from stdin and outputs received messages in JSON.

A VAT2 plugin is automatically built for a .api file.
There no longer a need for a separate _test.c.

Example:
vat2 show_version {}
{
        "_msgname":     "show_version_reply",
        "retval":       0,
        "program":      "vpe",
        "version":      "21.01-rc0~411-gf6eb348a6",
        "build_date":   "2020-11-19T09:49:25",
        "build_directory":      "/vpp/autogen3"
}

vat2 sw_interface_dump '{"sw_if_index": -1,
                         "name_filter_valid": 0,
                         "name_filter": ""}'
[{
                "_msgname":     "sw_interface_details",
                "sw_if_index":  0,
                "sup_sw_if_index":      0,
                "l2_address":   "00:00:00:00:00:00",
                "flags":        "Invalid ENUM",
                "type": "IF_API_TYPE_HARDWARE",
                "link_duplex":  "LINK_DUPLEX_API_UNKNOWN",
                "link_speed":   0,
                "link_mtu":     0,
                "mtu":  [0, 0, 0, 0],
                "sub_id":       0,
                "sub_number_of_tags":   0,
                "sub_outer_vlan_id":    0,
                "sub_inner_vlan_id":    0,
                "sub_if_flags": "Invalid ENUM",
                "vtr_op":       0,
                "vtr_push_dot1q":       0,
                "vtr_tag1":     0,
                "vtr_tag2":     0,
                "outer_tag":    0,
                "b_dmac":       "00:00:00:00:00:00",
                "b_smac":       "00:00:00:00:00:00",
                "b_vlanid":     0,
                "i_sid":        0,
                "interface_name":       "local0",
                "interface_dev_type":   "local",
                "tag":  ""
        }]

This is the first phase and vat2 is not integrated in packaging yet.

Type: feature
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Ib45ddeafb180ea7da8c5dc274a9274d7a4edc876
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agosvm: support for multi-segment enqueues 12/30112/7
Florin Coras [Tue, 24 Nov 2020 16:41:17 +0000 (08:41 -0800)]
svm: support for multi-segment enqueues

Type: feature

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

3 years agobuffers: add page-size config 93/30093/4
Nathan Skrzypczak [Mon, 23 Nov 2020 15:25:21 +0000 (16:25 +0100)]
buffers: add page-size config

Type: feature

Add a `buffers {page-size}` parameter to specify page size
for buffers. This also fixes an issue with the parsing in
unformat_log2_page_size.

Change-Id: I7d7b1fa0bb7febaa7509cf2c625882f07eeafaad
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agodpdk: fix eal in nohugtlb mode 92/30092/3
Nathan Skrzypczak [Mon, 23 Nov 2020 15:23:11 +0000 (16:23 +0100)]
dpdk: fix eal in nohugtlb mode

When running with `dpdk { no-hugetlb }` dont try
to allocate hugepages and remove --in-memory as
this seems to be rejected by DPDK

Type: fix

Change-Id: I02c56ade0b4e706b3f76331745e2af64bb62f6e0
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agotests: remove bond, pipe, session and api_namespace from vpp_papi_provider 04/30104/1
Jakub Grajciar [Tue, 24 Nov 2020 10:22:01 +0000 (11:22 +0100)]
tests: remove bond, pipe, session and api_namespace from vpp_papi_provider

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I5052fc1fd82b5d17c1ed66fee5185addf60b9eb6

3 years agosession: init lookup before dgram accept notification 01/30101/2
Florin Coras [Mon, 23 Nov 2020 23:59:36 +0000 (15:59 -0800)]
session: init lookup before dgram accept notification

Avoids potential session pointer invalidation

Type: fix

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

3 years agotests: remove svs, proxy_arp and gso from vpp_papi_provider 05/30005/5
Ole Troan [Thu, 19 Nov 2020 15:01:23 +0000 (16:01 +0100)]
tests: remove svs, proxy_arp and gso from vpp_papi_provider

Type: refactor
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I916a386af48fd558b4749e206b2bc4b82a888512
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agotests: [re]enable an ARP test form incomplete 96/30096/3
Neale Ranns [Mon, 23 Nov 2020 16:25:27 +0000 (16:25 +0000)]
tests: [re]enable an ARP test form incomplete

Type: test

must have been disabled when another test of the same name was added

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

3 years agovlib: Fix sh int addr 97/30097/3
Nathan Skrzypczak [Mon, 23 Nov 2020 16:56:32 +0000 (17:56 +0100)]
vlib: Fix sh int addr

format_l2_input might return s=0 which
causes vlib_cli_output to print weird
things when calling sh int addr

Type: fix

Change-Id: I3fe747979355e41aed51656f3b44e0eb76d33ef9
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovlib: add format_vlib_thread_name 94/30094/2
Damjan Marion [Mon, 23 Nov 2020 15:50:24 +0000 (16:50 +0100)]
vlib: add format_vlib_thread_name

Type: improvement
Change-Id: I2231f8e32964868ff6ef154b8ef431d99643c6a5
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agointerface: improve logging 95/30095/2
Damjan Marion [Mon, 23 Nov 2020 15:58:05 +0000 (16:58 +0100)]
interface: improve logging

Type: improvement
Change-Id: I3ea180e643434dfd9c21b27082ea8a125f75b813
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovirtio: fix overflow in case of buffering + drop 53/30053/2
Benoît Ganne [Fri, 20 Nov 2020 18:18:41 +0000 (19:18 +0100)]
virtio: fix overflow in case of buffering + drop

Type: fix
Fixes: 2e6f624f1f82ae0351dd05ad5d930d6876105519

Change-Id: Ib41c82ea1e8430afc920250fb0d054a2fb2d08c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agocrypto-ipsecmb: bump to intel-ipsec-mb version 0.55 85/30085/1
Dariusz Kazimierski [Mon, 23 Nov 2020 08:27:55 +0000 (09:27 +0100)]
crypto-ipsecmb: bump to intel-ipsec-mb version 0.55

Type: feature

This patch bumps the intel-ipsec-mb engine version from 0.54 to 0.55,
to avail performance improvement brought by the library.

Signed-off-by: DariuszX Kazimierski <dariuszx.kazimierski@intel.com>
Signed-off-by: PiotrX Kleski <piotrx.kleski@intel.com>
Reviewed-by: Fan Zhang <roy.fan.zhang@intel.com>
Change-Id: Iea114acc6e8e55020e7409ab2d1d00f4c2081e9c

3 years agovppapigen: move import processing logic to individual plugins 77/30077/2
Paul Vinciguerra [Sat, 21 Nov 2020 04:10:09 +0000 (23:10 -0500)]
vppapigen:  move import processing logic to individual plugins

Vppapigen currently embeds the import following control logic in
the runner.  This change delegates the control to the plugins.

Type: refactor

Change-Id: Iad20341bc9d652bedb71ca7037d3957fe60c7a0d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agosvm: fix coverity warning 48/30048/2
Florin Coras [Fri, 20 Nov 2020 15:34:53 +0000 (07:34 -0800)]
svm: fix coverity warning

Type: fix

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

3 years agoip-neighbor: Use ip_address_t rather than ip46_address_t 03/28903/3
Neale Ranns [Thu, 20 Aug 2020 08:22:56 +0000 (08:22 +0000)]
ip-neighbor: Use ip_address_t rather than ip46_address_t

Type: improvement

Change-Id: Ica5f395075677bda5f38d28e704f65350af88610
Signed-off-by: Neale Ranns <nranns@cisco.com>
3 years agosvm: move chunk locks to linked list 73/29973/4
Florin Coras [Wed, 18 Nov 2020 02:42:38 +0000 (18:42 -0800)]
svm: move chunk locks to linked list

Type: improvement

We only need to protect the linked lists.

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

3 years agovcl: stop tracking vpp event queues and thread index 92/29992/7
Florin Coras [Thu, 19 Nov 2020 03:02:17 +0000 (19:02 -0800)]
vcl: stop tracking vpp event queues and thread index

Type: improvement

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

3 years agoipip: Don't crash when showing non-existant tunnel index 19/29819/2
Neale Ranns [Mon, 9 Nov 2020 10:13:24 +0000 (10:13 +0000)]
ipip: Don't crash when showing non-existant tunnel index

Type: fix

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

3 years agolldp: allow to configure restricted interfaces 87/29487/9
Dmitry Vakhrushev [Fri, 16 Oct 2020 20:39:28 +0000 (23:39 +0300)]
lldp: allow to configure restricted interfaces

  This improvement intended to allow sending of LLDP packets on an
interface even if the interface cannot support programming an extra
MAC address in order to receive LLDP messages from the attached
link peer.
  vnet_hw_interface_add_del_mac_address function fails on some
'virtio' interfaces due to limitation to set MAC addresses.

Type: improvement

Change-Id: I636de148736a0797d1fd70c6ab14759ff8fa42be
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
3 years agosvm: init chunk rb tree indices in fifo 72/29972/4
Florin Coras [Tue, 17 Nov 2020 23:56:38 +0000 (15:56 -0800)]
svm: init chunk rb tree indices in fifo

Type: improvement

Let fifo segment mainly deal with fifo and chunk allocations not
initialization.

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

3 years agoikev2: respect punting only for ipv4 92/29892/2
Benoît Ganne [Thu, 12 Nov 2020 09:29:23 +0000 (10:29 +0100)]
ikev2: respect punting only for ipv4

IPSec punting to IKEv2 is valid only for NAT-T in IPv4.
Fix coverity CID 214915.

Type: fix

Change-Id: I6f2db38abf179565316f50c5d47c78acce3a0d01
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agodpdk: Telemetry thread is off by default. 94/29794/7
Dmitry Vakrhushev [Fri, 6 Nov 2020 10:20:13 +0000 (05:20 -0500)]
dpdk: Telemetry thread is off by default.

Currently thread with telemetry is enabled by default, to prevent
to use resources, thread should be off. The thread can be switch on
back using additional option in the dpdk's stanza.

dpdk {
telemetry
}

Type: feature

Change-Id: I1c25e8ee99f31dd01dc372f54e77e81a5bb67126
Signed-off-by: Dmitry Vakrhushev <dmitry@netgate.com>
3 years agodpdk: remove dpdk_early_init 04/30004/2
Damjan Marion [Thu, 19 Nov 2020 14:12:29 +0000 (15:12 +0100)]
dpdk: remove dpdk_early_init

We cannot disable dpdk plugin if hugepages are not present, as there
are some valid uses cases where dpdk works unpriviledged without
hugepages.

Type: fix
Change-Id: If67d8c941617ac0f16d496655d2bb6e489d34ad4
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosvm: fix high segment base address for ASan 69/29969/2
Benoît Ganne [Tue, 17 Nov 2020 16:58:59 +0000 (17:58 +0100)]
svm: fix high segment base address for ASan

AddressSanitizer has specific requirements on memory map. In particular,
the range [0x00007fff8000, 0x10007fff7fff] is reserved for ASan use.

Type: fix
Fixes: f260eb97866978746ebd3f3441dc66e4ff7111cd

Change-Id: Ie96c4dd88b4f02d7fc5c24464572ff72cb6fd96b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agopapi: add paul back as maintainer 68/29968/2
Ole Troan [Tue, 17 Nov 2020 07:53:11 +0000 (08:53 +0100)]
papi: add paul back as maintainer

Paul accidentially got removed as maintainer for papi. Add him back.

Fixes: 6df2c7954126a316f86908526c3bb4d649f06597
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I697342e0c3793d9f5ea5b39a0d37a8522b34858e

3 years agobuild: bump libbpf to v0.2 53/29953/2
Benoît Ganne [Mon, 16 Nov 2020 12:30:07 +0000 (13:30 +0100)]
build: bump libbpf to v0.2

Type: improvement

Change-Id: Ic97ed8c8ef8ba3b1bf3727810e7312456c52d808
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: bump rdma-core to 31.1 54/29954/2
Benoît Ganne [Mon, 16 Nov 2020 12:36:18 +0000 (13:36 +0100)]
build: bump rdma-core to 31.1

Type: improvement

Change-Id: I434d2013763e32bedf2188aea5b0c519ea0e06bb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosvm: fifo segment cleanup 66/29966/12
Florin Coras [Tue, 17 Nov 2020 02:11:51 +0000 (18:11 -0800)]
svm: fifo segment cleanup

- consolidate chunk freelist functions
- remove redundant functions

Type: improvement

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

3 years agodpdk: change mlx5 pmd name in foreach_dpdk_pmd 26/29726/2
Matthew Smith [Fri, 13 Nov 2020 16:41:21 +0000 (10:41 -0600)]
dpdk: change mlx5 pmd name in foreach_dpdk_pmd

Type: fix

With DPDK 20.08, mlx5 devices get bound to the mlx5_pci PMD instead
of net_mlx5. Update the name in foreach_dpdk_pmd so the PMD will be
correctly recognized during initialization.

Change-Id: I1863ec55da9fcf6a289959dff22ca2dcc5d114bc
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agoikev2: fix memleak when tunnel protect fails 60/29860/4
Filip Tehlar [Tue, 10 Nov 2020 09:32:13 +0000 (09:32 +0000)]
ikev2: fix memleak when tunnel protect fails

Type: fix

Change-Id: I1d278fc2b03b948c054ff1686315635ac0278ae8
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agovirtio: virtio: implement packed queues from virtio 1.1 69/28569/11
Mohsin Kazmi [Mon, 16 Nov 2020 15:49:30 +0000 (16:49 +0100)]
virtio: virtio: implement packed queues from virtio 1.1

Type: feature

Change-Id: I12703371541298efa029903d6762b1cd1f7322ca
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agogeneve: Remove one bucket load-balance objects 18/29918/2
Neale Ranns [Thu, 12 Nov 2020 16:53:51 +0000 (16:53 +0000)]
geneve: Remove one bucket load-balance objects

Type: improvement

geneve uses the UDP source port for the flow hash to get load-balancing
over multiple paths to the tunnel destination. However, if there is only
one path, then we can elide the LB object, contributed by the resolving
FIB entry, from the dasta path.

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

3 years agopapi: remove dependency on aenum 22/27022/3
Paul Vinciguerra [Tue, 12 May 2020 14:45:17 +0000 (10:45 -0400)]
papi: remove dependency on aenum

remove the dependency on the aenum package which was used to
provide Enum.IntFlag which is now available in the python stdlib.

aenum is not provided as a .deb and causes issues in packaging.

Type: fix

Change-Id: Ie45ec2130a767345f0aad038451780a5ddc7e8db
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotests: move crypto tests to src/vnet/crypto/test 59/29959/2
Dave Wallace [Mon, 16 Nov 2020 21:54:14 +0000 (16:54 -0500)]
tests: move crypto tests to src/vnet/crypto/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move classifier tests to src/vnet/classify/test 58/29958/3
Dave Wallace [Mon, 16 Nov 2020 20:08:14 +0000 (15:08 -0500)]
tests: move classifier tests to src/vnet/classify/test

- Refactor make test code to be co-located with
  the vpp feature source code.

Type: test

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

3 years agotests: move vpp-api tests to src/vpe-api/test 63/29963/2
Dave Wallace [Mon, 16 Nov 2020 23:03:53 +0000 (18:03 -0500)]
tests: move vpp-api tests to src/vpe-api/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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

3 years agotests: move gre tests to src/vnet/gre/test 64/29964/2
Dave Wallace [Mon, 16 Nov 2020 23:10:27 +0000 (18:10 -0500)]
tests: move gre tests to src/vnet/gre/test

- Refactor make test code to be co-located with
  the vpp feature source code

Type: test

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