vpp.git
3 years agobonding lacp: replace slave string with member 17/27917/7
Steven Luong [Wed, 15 Jul 2020 15:44:54 +0000 (08:44 -0700)]
bonding lacp: replace slave string with member

- Replace textual string slave with member except APIs.
- For APIs, mark the existing APIs as deprecated and introduce new APIs
- While introducing sw_bond_interface_dump, add the optional filter by
  sw_if_index and enhance the testcases to make use of it.

Type: improvement

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

3 years agoikev2: fix session re-initiate after SA expires 80/28080/1
Filip Tehlar [Tue, 28 Jul 2020 07:25:08 +0000 (07:25 +0000)]
ikev2: fix session re-initiate after SA expires

Type: fix

Change-Id: Ie3d24b3df02d08fbb74d97f4e5ab0d79c35b0c0d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agonat: limit resource consumption when out of ports 71/28071/2
Klement Sekera [Mon, 27 Jul 2020 12:21:54 +0000 (12:21 +0000)]
nat: limit resource consumption when out of ports

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

3 years agotcp: fix tcp_connection_cleanup() with uninitialized elog 74/28074/3
Ivan Shvedunov [Mon, 27 Jul 2020 16:59:38 +0000 (19:59 +0300)]
tcp: fix tcp_connection_cleanup() with uninitialized elog

This fixes TCP connection cleanup crash when TCP debugging is enabled.
It could happen if session_stream_accept() returned an error.

Type: fix

Signed-off-by: Ivan Shvedunov <ivan4th@gmail.com>
Change-Id: I0df08969d82bb0f44def81b9e47195bd15502831

3 years agolacp: fix vector overflow 60/27960/2
Benoît Ganne [Fri, 17 Jul 2020 09:42:07 +0000 (11:42 +0200)]
lacp: fix vector overflow

Type: fix

Change-Id: I8f776ce10ee8c29689db5ceef70df42dfb6b747c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agointerface: fix show/clear hardware-interfaces string overflow 56/28056/2
Benoît Ganne [Fri, 24 Jul 2020 07:57:11 +0000 (09:57 +0200)]
interface: fix show/clear hardware-interfaces string overflow

Type: fix

Change-Id: Iab99bc1f6c309fae6eaa714b484274fe7072a4cb
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agopci: fix non NULL-terminated vector used as C string overflow 60/28060/2
Benoît Ganne [Fri, 24 Jul 2020 15:04:06 +0000 (17:04 +0200)]
pci: fix non NULL-terminated vector used as C string overflow

Type: fix

Change-Id: Iab512ba8c72c9e20aeba2d4265276bcabf095d46
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agosession: cleanup lookup table for rejected session 64/28064/3
Florin Coras [Fri, 24 Jul 2020 17:09:07 +0000 (10:09 -0700)]
session: cleanup lookup table for rejected session

Type: fix

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

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

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

Type: fix

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

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

Type: feature
Ticket: VPP-1897

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

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

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

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

Type: feature

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

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

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

Type: fix

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

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

Type: fix

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

Type: fix

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

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

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

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

Type: fix
Ticket: VPP-1923

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

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

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

Type: fix

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

Type: fix

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

make the change backwards compatible

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

Type: improvement

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

Type: feature

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

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

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

Type: fix
Fixes: f539578bac8b64886b57c460c9d74273e6613f8b

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

Free the existing vectors prior to losing them.

Type: fix
Ticket: VPPSUPP-94

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

Type: refactor

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

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

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

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

Save the packet trace dump pg setup script.

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

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

Type: fix

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

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

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

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

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

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

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

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

Found with AFL + ASAN.

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

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

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

Type: refactor

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

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

CID 211153

Type: fix

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

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

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

Type: fix
Fixes: cea46522e79637f6ec37c03ec3fbeb87b160a378

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

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

Type: fix

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

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

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

Type: fix

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

Type: feature

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

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

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

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

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

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

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

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

Type: fix

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

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

Type: fix

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

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

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

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

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

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

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

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

Type: feature
Ticket: VPP-1920

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

Type: fix

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

Type: refactor

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

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

Type: fix

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

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

Type: fix

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

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

Type: fix

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

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

Also fix session test app name registrations

Type: improvement

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

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

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

Type: fix
Fixes: dfb19cabe20ccf1cbd1aa714f493ccd322839b91

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

Type: fix

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

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

Type: improvement

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

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

Type: fix

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

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

3 years agoikev2: per thread usage of openssl context 00/27800/2
Filip Tehlar [Mon, 6 Jul 2020 14:52:25 +0000 (14:52 +0000)]
ikev2: per thread usage of openssl context

Type: refactor

Change-Id: I04af90b4d86c00092ce1732aeb3c0517af1808e0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agodocs: Reflect the fact that the DPDK is now a plugin 02/27802/1
John DeNisco [Mon, 6 Jul 2020 16:27:58 +0000 (12:27 -0400)]
docs: Reflect the fact that the DPDK is now a plugin

Type: Improvement

Signed-off-by: John DeNisco <jdenisco@cisco.com>
Change-Id: Ic1253f601ee515392902a21b92e1dfd3962cc0a4

3 years agoikev2: add profile dump API 21/27721/9
Jan Cavojsky [Fri, 26 Jun 2020 13:05:10 +0000 (15:05 +0200)]
ikev2: add profile dump API

Type: feature
Signed-off-by: Jan Cavojsky <Jan.Cavojsky@pantheon.tech>
Change-Id: I84776a50b520134e8a3ca6ae41b4cc29009e6319

3 years agoikev2: add more ikev2 tests 97/27797/2
Filip Tehlar [Wed, 1 Jul 2020 08:56:59 +0000 (08:56 +0000)]
ikev2: add more ikev2 tests

Tests for AES-GCM and AES-CBC with different key lengths

Type: test

Change-Id: Ie7eeebb0f7e8331a717866475cb4ee00042857ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoip: set ip4 mask for ip_copy and ip_set when dealing with ip4 type 26/27626/5
jiangxiaoming [Mon, 22 Jun 2020 01:06:16 +0000 (09:06 +0800)]
ip: set ip4 mask for ip_copy and ip_set when dealing with ip4 type

Type: fix

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

3 years agofib: fix debug preprocessor directives 88/27788/2
Matthew Smith [Thu, 2 Jul 2020 22:24:17 +0000 (17:24 -0500)]
fib: fix debug preprocessor directives

Type: fix

Some debugging declarations were wrapped in an 'ifdef CLIB_DEBUG'.
This seems to always evaluate true because clib.h defines CLIB_DEBUG
to 0 if its not defined.

The result is that if a route table is added and a route is added to
it and then the table is deleted, VPP exits because the debug function
fib_table_assert_empty() gets called whether VPP was started using a
debug build or a release build.

Change the ifdef to 'if CLIB_DEBUG > 0'.

Change-Id: I357dc2c299e81b95244f2f7efaadb8e0de27627a
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agotcp: fix coverity warning 87/27787/1
Florin Coras [Thu, 2 Jul 2020 21:52:34 +0000 (14:52 -0700)]
tcp: fix coverity warning

Type: fix

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

3 years agotcp: cli to dump half-open connections 85/27785/5
Florin Coras [Thu, 2 Jul 2020 16:44:21 +0000 (09:44 -0700)]
tcp: cli to dump half-open connections

Type: improvement

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

3 years agovrrp: fix feature declaration for v6 accept-mode 83/27783/2
Matthew Smith [Mon, 29 Jun 2020 17:13:21 +0000 (12:13 -0500)]
vrrp: fix feature declaration for v6 accept-mode

Type: fix

The v6 accept mode input feature was being declared with
the node added to ip4-multicast instead of ip6-multicast. Add to
the correct arc.

Change-Id: I08f6e5e7dde84a37687fa0af750a7a16fe537ea6
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agoikev2: use remote proposals when installing tunnel 84/27784/2
Filip Tehlar [Tue, 30 Jun 2020 10:38:26 +0000 (10:38 +0000)]
ikev2: use remote proposals when installing tunnel

Change-Id: Ib9c5dff6c825f495400a73869d429b9c2df670fc
Type: fix
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agotap: fix dump for TUN interfaces 36/27736/2
Mohsin Kazmi [Tue, 30 Jun 2020 13:28:01 +0000 (15:28 +0200)]
tap: fix dump for TUN interfaces

Type: fix

Change-Id: I3bcc8ff1cf0a828ce3ba112694d38e3287d38d8d
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: 20.05 Release Notes 51/27751/2
Andrew Yourtchenko [Mon, 18 May 2020 15:04:47 +0000 (15:04 +0000)]
misc: 20.05 Release Notes

Change-Id: If68e419b00f8961c814727713f989fd0d72f6f1b
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit ab572152d9cbed7944442d07a6bd21c43ad1c83d)

3 years agonat: nat66 to plugin 53/27753/7
Ole Troan [Wed, 1 Jul 2020 11:16:16 +0000 (13:16 +0200)]
nat: nat66 to plugin

Type: refactor
Change-Id: I8c1f0c02a4522c1f9e461ddadd59938579ec00c6
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agoip: fix the order in ip4 punt redirect 60/27760/1
Mohsin Kazmi [Thu, 2 Jul 2020 08:56:57 +0000 (10:56 +0200)]
ip: fix the order in ip4 punt redirect

Type: fix
Fixes: a84cb715f5a4366dd2f32de18ad92bec566924da

Change-Id: Id448d6ae9cfdd3122e8187121c509412835117c5
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovlib: wake up workers if interrupts are posted 43/27743/4
Benoît Ganne [Tue, 30 Jun 2020 16:17:06 +0000 (18:17 +0200)]
vlib: wake up workers if interrupts are posted

Type: fix

Change-Id: If8dbbcb46193fd057fe8d704058609a3a8787d6c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoclassify: fix debug CLI 34/27734/1
Dave Barach [Tue, 30 Jun 2020 12:28:06 +0000 (08:28 -0400)]
classify: fix debug CLI

unformat_ip6_mask wasn't accounting for customized field names
when deciding if it managed to parse at least one field.

Type: fix

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

3 years agotests: ikev2: add nat traversal & cert based auth test 63/27663/4
Filip Tehlar [Tue, 23 Jun 2020 20:35:58 +0000 (20:35 +0000)]
tests: ikev2: add nat traversal & cert based auth test

Type: test

Change-Id: I3e8e451c5deaf04f519a471369370c383d9cda3b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agotcp: avoid rcv wnd more than RX fifo can enqueue 54/27654/4
Ryujiro Shibuya [Wed, 24 Jun 2020 07:36:14 +0000 (08:36 +0100)]
tcp: avoid rcv wnd more than RX fifo can enqueue

Type: fix

Signed-off-by: Ryujiro Shibuya <ryujiro.shibuya@owmobility.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie358b731f8ecb1fcaebd6e79f5ce5c10802c2814

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

Type: fix

Change-Id: I4f91175444dec9800d651aa5a5e0472359de63d1
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agoudp: align udp_encap_t_ to 2 cachelines 25/27525/3
Vadym Martsynovskyy [Fri, 12 Jun 2020 16:50:50 +0000 (09:50 -0700)]
udp: align udp_encap_t_ to 2 cachelines

Based on the comments in the struct, udp_encap_t_ is meant to span 2
cachelines. Due to the 64 bit alignment of dpo_id_t, the struct spanned
3 cachelines. This caused fetching ue_ip_proto to trigger an additional
cache miss. This patch rearranges the ordering of the struct fields
so that udp_encap_t_ only spans 2 cachelines as intended.

before:
(gdb) print (int)&((struct udp_encap_t_*)0)->cacheline1
$8 = 128

after:
(gdb) print (int)&((struct udp_encap_t_*)0)->cacheline1
$1 = 64

Type: fix
Signed-off-by: Vadym Martsynovskyy <vmartsyn@fb.com>
Change-Id: I066c08654d4a8ef3e2d3954e957d4c5d382b209f

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

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

3 years agol2: performance enhancement in l2input 91/27191/9
Zhiyong Yang [Fri, 15 May 2020 14:32:34 +0000 (22:32 +0800)]
l2: performance enhancement in l2input

Short Load/Stores combined with prefetching in the beginning of the loop
place too much pressure on AGUs and memory accesses.
The patch interleaves load/store operations with computational operations
to alleviate the pain point.

vlib_get_buffers is also leveraged.

Redefine u8 dst_and_src[12] instead of dst[6] and src[6] in struct
l2input_trace_t in order to merge two copys into one.

Type: improvement

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

3 years agovrrp: backup processes priority 255 advertisement 63/27563/3
Matthew Smith [Mon, 15 Jun 2020 15:58:23 +0000 (10:58 -0500)]
vrrp: backup processes priority 255 advertisement

Type: fix

When accept mode is enabled, a backup VR will configure the VR virtual
addresses locally and respond to packets sent to those addresses. This
did not work when the primary VR is the address owner and sends
advertisements using the virtual address as the source address. It
also did not work when NAT was configured on the interface with the
virtual address as the NAT pool address. In both cases, advertisements
from other VRs would arrive and be dropped because they appeared to
be spoofed - the source address would be an address that is
configured as an interface address on the instance receiving it.

When accept mode is enabled for a VR and the VR enters the master state,
add an input feature on ip[46]-multicast for the interface which looks
for VRRP advertisements, figures out whether they are for a VR which
is configured with accept mode and is in the master state  and kicks
them straight to the VRRP nodes to avoid dropping them.

Change-Id: I240ba1ee0b3fd6d693de729698c1181dc71bb08b
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agolacp: add unit test 05/27105/7
Steven Luong [Fri, 15 May 2020 19:21:50 +0000 (12:21 -0700)]
lacp: add unit test

add test_lacp.py to cover basic lacp unit test

Type: fix

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

3 years agonat: replace speculative buffer enqueue model 96/27596/6
Klement Sekera [Wed, 17 Jun 2020 13:46:41 +0000 (13:46 +0000)]
nat: replace speculative buffer enqueue model

Replace speculative buffer enqueue coding model with
vlib_get_buffers(...)/vlib_buffer_enqueue_to_next(...).

Type: improvement
Change-Id: I7dbfac2234a7bd754c599857eb1d5b601da5bc7c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoikev2: add FEATURE.yaml 67/27667/3
Benoît Ganne [Wed, 24 Jun 2020 16:03:09 +0000 (18:03 +0200)]
ikev2: add FEATURE.yaml

Type: docs

Change-Id: Ie7836543e52bee08d12c565fbb6238d3e82ea3ce
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoflow: add IPSec ESP/AH flow 28/27628/4
Chenmin Sun [Mon, 22 Jun 2020 10:21:31 +0000 (18:21 +0800)]
flow: add IPSec ESP/AH flow

This patch adds the IPSec ESP/AH type flow support
Have tested on E810 with Intel iAVF driver

Type: feature

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

3 years agovirtio: add tx trace 10/27710/2
Mohsin Kazmi [Fri, 26 Jun 2020 13:48:26 +0000 (13:48 +0000)]
virtio: add tx trace

Type: improvement

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

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

Type: fix

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

3 years agoikev2: remove unused field 07/27707/2
Filip Tehlar [Wed, 24 Jun 2020 20:18:50 +0000 (20:18 +0000)]
ikev2: remove unused field

Type: improvement

Change-Id: I0893d7cd8b8ab9958f585ac564bd0638bc60e78a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agoip: fix the punt redirect for ip4 75/27675/2
Mohsin Kazmi [Thu, 25 Jun 2020 11:43:52 +0000 (13:43 +0200)]
ip: fix the punt redirect for ip4

Type: fix

Change-Id: I39341f201209931392f315ead5adfddd8b567caf
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: add gdb macros 52/27652/3
Dave Barach [Tue, 23 Jun 2020 21:36:12 +0000 (17:36 -0400)]
misc: add gdb macros

These gdb macros should prove very helpul when poking around in core files.

Pifi (pool_is_free_index) is not straighforward. Best to work it out
once.

Others:
 bitmap_get = clib_bitmap_get
 vl = vec_len
 pe = pool_elts
 node_name_from_index, as described
 vnet_buffer_opaque, prints the primary buffer opaque
 vnet_buffer_opaque2, prints the secondary buffer opaque

Fix vppinfra unit-test compile error

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

3 years agonat: avoid division by zero 61/27661/2
Klement Sekera [Wed, 24 Jun 2020 13:13:46 +0000 (13:13 +0000)]
nat: avoid division by zero

Return error instead of dividing by zero.

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

3 years agotests: fix deps pinning / patching 57/27657/3
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>
3 years agovirtio: fix the vlib buffer flags 64/27664/1
Mohsin Kazmi [Wed, 24 Jun 2020 14:19:19 +0000 (16:19 +0200)]
virtio: fix the vlib buffer flags

Type: fix

Change-Id: I92e8e30e4175229e24dd92471016e9095b5cc83e
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agonat: deterministic: disallow invalid config 48/27648/3
Klement Sekera [Tue, 23 Jun 2020 13:12:33 +0000 (13:12 +0000)]
nat: deterministic: disallow invalid config

Prevent overflow if input network prefix is too small and crash on
packet #1 due to vector not being allocated/initialized.

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

3 years agoudp: jump over ip4 options 51/27651/3
Florin Coras [Tue, 23 Jun 2020 21:11:01 +0000 (14:11 -0700)]
udp: jump over ip4 options

Type: improvement

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

3 years agovppinfra: fix u32x4_gather definition 50/27650/1
Damjan Marion [Tue, 23 Jun 2020 17:01:56 +0000 (19:01 +0200)]
vppinfra: fix u32x4_gather definition

Type: fix
Change-Id: I3df8d3f277bfadee95bfc329e8ce8b929a986af6
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: debug CLI macro expander, part deux 40/27640/2
Dave Barach [Mon, 22 Jun 2020 14:02:25 +0000 (10:02 -0400)]
vlib: debug CLI macro expander, part deux

Deal with circular macro definitions instead of crashing due to stack
overflow.

Separate macro tables, per CLI session

Add documentation to the Sphinx docs

Type: improvement

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

3 years agonat: fix broken test 39/27639/2
Klement Sekera [Mon, 22 Jun 2020 13:15:41 +0000 (13:15 +0000)]
nat: fix broken test

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

3 years agoip6-nd: punt neighbor advertisements 99/27499/2
Alexander Chernavin [Thu, 11 Jun 2020 13:57:33 +0000 (09:57 -0400)]
ip6-nd: punt neighbor advertisements

With this change, punt received neighbor advertisements instead of drop
in order to give other elements of the system an opportunity to handle
them.

Type: improvement
Change-Id: Ie6cde9eebc83e42029967141cb32ebc459fd3680
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agonat: set buf error if can't create user 38/27638/1
Klement Sekera [Mon, 22 Jun 2020 12:52:29 +0000 (12:52 +0000)]
nat: set buf error if can't create user

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

3 years agoikev2: use both local and remote ID for profile lookup 85/27085/3
Filip Tehlar [Sun, 10 May 2020 05:18:37 +0000 (05:18 +0000)]
ikev2: use both local and remote ID for profile lookup

Type: fix
Ticket: VPP-1890

Change-Id: I9441d5afc38df7dabf6cccaead69dd32646d2a9e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>