vpp.git
3 years agovppinfra: fix x86 packs / packus wrappers 25/32225/1
Damjan Marion [Wed, 5 May 2021 17:31:41 +0000 (19:31 +0200)]
vppinfra: fix x86 packs / packus wrappers

They both take signed value as input.

Type: fix
Change-Id: If3d8ec4e0b1c02d7d65262bdd9db49ff7fbfef39
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: remove dead store 15/32215/2
Damjan Marion [Wed, 5 May 2021 12:36:04 +0000 (14:36 +0200)]
avf: remove dead store

Type: fix
Change-Id: Ic8d965aecea6b5b729e3f414235e676d62de779a
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: fix adaptive mode flag unset on nodes reforking 92/31992/4
Maxime Peim [Thu, 15 Apr 2021 11:52:12 +0000 (13:52 +0200)]
vlib: fix adaptive mode flag unset on nodes reforking

The adaptive mode flag is being unset on
nodes reforking. The flag is copied in order
to avoid this issue.

Old flags are copied for all nodes.

Type: fix
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: Ic29b20fc0e4454ce4b3765c478f55bf650b4572a

3 years agonat: cli commands parsing fix 92/32192/6
Filip Varga [Mon, 3 May 2021 11:45:16 +0000 (13:45 +0200)]
nat: cli commands parsing fix

Newline get's ignored when parsing configuration file.

Type: fix

Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: Ib4f86177150dfe3bc085231a9268cf730490ea81

3 years agonat: fixing cfg file parsing cli issues 12/32212/3
Filip Varga [Tue, 4 May 2021 14:27:33 +0000 (16:27 +0200)]
nat: fixing cfg file parsing cli issues

Type: fix

Change-Id: I35012bb2f7af1996c954641af40f3223bc7f37e4
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agobuild: set CMAKE_EXPORT_COMPILE_COMMANDS 13/32213/1
Damjan Marion [Wed, 5 May 2021 08:24:38 +0000 (10:24 +0200)]
build: set CMAKE_EXPORT_COMPILE_COMMANDS

Type: make
Change-Id: I8c59c91b4af49efcfcf7544df01b3d20511abe52
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: move offload flags to 1st cacheline in vlib_buffer_t 04/32104/3
Mohsin Kazmi [Fri, 23 Apr 2021 13:16:50 +0000 (15:16 +0200)]
vlib: move offload flags to 1st cacheline in vlib_buffer_t

Type: improvement

Some tests i.e. ipsec see performance regression when offload flags
are moved to 2nd cacheline. This patch moves them back to 1st cacheline.

Change-Id: I6ead45ff6d2c467b0d248f409e27c2ba31758741
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agomisc: ipfix process node wait time adjustment 61/32161/4
Matthew Smith [Wed, 28 Apr 2021 16:48:39 +0000 (11:48 -0500)]
misc: ipfix process node wait time adjustment

Type: fix

The ipfix process node has a hardcoded 5s sleep between sending packets.
The interval between template packets is configurable, but the timing
of packets being sent does not match configuration because of the time
being hardcoded. E.g. -

With template interval set to 3s, a packet will be sent every 5s.
With template interval set to 8s, a packet will be sent every 10s.

Honor the configuration by reducing the wait time to less than 5s if a
template will need to be sent less than 5s from the current time.

Change-Id: I8c11f7bc502ce5b20b6e82a7e7a135a8805a2bad
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agoapi: fix crash in custom dump 10/32210/2
Paul Vinciguerra [Wed, 5 May 2021 04:19:00 +0000 (00:19 -0400)]
api: fix crash in custom dump

Change-Id: Iffc52b4f52c235b0b5d13d2b42467cb2be0bf934
Type: fix
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agocrypto crypto-openssl: support hashing operations 02/32202/5
Filip Tehlar [Mon, 3 May 2021 15:29:56 +0000 (15:29 +0000)]
crypto crypto-openssl: support hashing operations

Type: feature

Change-Id: I36041fe5c5f0ff129aee42516189807e96f62123
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
3 years agotcp: cleanup rcv-process and bulk buffer translation 09/32209/3
Florin Coras [Wed, 5 May 2021 02:30:58 +0000 (19:30 -0700)]
tcp: cleanup rcv-process and bulk buffer translation

Type: improvement

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

3 years agotcp: cleanup listen node and bulk buffer translation 07/32207/2
Florin Coras [Tue, 4 May 2021 21:53:25 +0000 (14:53 -0700)]
tcp: cleanup listen node and bulk buffer translation

Type: improvement

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

3 years agotcp: cleanup syn-sent and bulk buffer translation 08/32208/2
Florin Coras [Wed, 5 May 2021 00:08:49 +0000 (17:08 -0700)]
tcp: cleanup syn-sent and bulk buffer translation

Type: improvement

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

3 years agotcp: cleanup established and bulk buffer translation 97/32097/6
Florin Coras [Fri, 23 Apr 2021 01:53:30 +0000 (18:53 -0700)]
tcp: cleanup established and bulk buffer translation

Type: improvement

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

3 years agovirtio: add simple drop counter for interface 06/32206/2
Mohsin Kazmi [Tue, 4 May 2021 14:36:09 +0000 (16:36 +0200)]
virtio: add simple drop counter for interface

Type: improvement

Change-Id: I4ac6b1a6553e26a5c26b6761fa3c4cc5d4925486
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agovirtio: fix the interrupt 67/32167/8
Mohsin Kazmi [Wed, 28 Apr 2021 16:55:45 +0000 (18:55 +0200)]
virtio: fix the interrupt

Type: fix

virtio/tap interfaces set the empty buffers in the input node
for receiving data. Backend uses those buffers, fills them with
data and notifies the virtio/tap driver. But virtio/tap driver
gets into stall state if interface is created and configured
through exec script on VPP startup.conf and put the interface in
interrupt mode while VPP is only configured with main thread.

This patch fixes the problem by prefilling buffers during the
interface creation.

Change-Id: Ibc4d0e70e127ccc4b7cf8b2b18406ae4b02c73b4
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
3 years agostats: adding symlinks for nodes and interfaces in the stat segment 36/31636/18
Arthur de Kerhor [Thu, 11 Mar 2021 18:26:54 +0000 (10:26 -0800)]
stats: adding symlinks for nodes and interfaces in the stat segment

A given interface counter (e.g rx) can be accessed via
/interfaces/<interface_name>/<counter_name>.
Same goes with nodes: /nodes/<node_name>/<counter_name>
As interfaces may contain '/' in their names,
these are replaced by '_' in symlinks
Also added 2 tests for the stat segment

Type: feature

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I27da252e7b3dc177815616ca46b5c200a456bf0f
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agodpdk: allow configuration of max-simd-bitwidth 04/32204/3
Ray Kinsella [Tue, 4 May 2021 09:07:26 +0000 (10:07 +0100)]
dpdk: allow configuration of max-simd-bitwidth

Enable configuration of DPDK's max-simd-bitwidth through the startup.conf

Type: improvement
Change-Id: I455148714ffc7caa257931526f310dbefd7ab01c
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
3 years agomisc: improve src detection in configure script 01/32201/3
Mohammed Hawari [Tue, 4 May 2021 09:34:37 +0000 (11:34 +0200)]
misc: improve src detection in configure script

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

3 years agoavf: fix simultaneous txq wrap and tx retry 00/32200/1
Mohammed Hawari [Tue, 4 May 2021 08:15:32 +0000 (10:15 +0200)]
avf: fix simultaneous txq wrap and tx retry

Change-Id: Ic2b853cda98c3010d2abb5c7ada1b1f6c5bc9f74
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
Fixes: ca1812dbe714fc8e4de13f88df2d3b830d95a2c9
Ticket: VPP-1980

3 years agordma: add support for RSS configuration 71/31671/4
Benoît Ganne [Wed, 17 Mar 2021 13:41:33 +0000 (14:41 +0100)]
rdma: add support for RSS configuration

Type: feature

Change-Id: I911ee94b624ef5edf46b34666597eff93df1d1ed
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agordma: support non-power-of-2 number of rxq 94/32194/2
Benoît Ganne [Mon, 3 May 2021 15:02:39 +0000 (17:02 +0200)]
rdma: support non-power-of-2 number of rxq

Type: improvement

Change-Id: I7b78a8470aa3fd271120587d08e82afb23cb195b
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: add set-build-type-* targets to CMake 90/32190/4
Damjan Marion [Mon, 3 May 2021 10:40:27 +0000 (12:40 +0200)]
build: add set-build-type-* targets to CMake

Type: make
Change-Id: Icf37873b461cd034567dc1b99e23d1bbb3f4b9f0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoquic: fix coverity warning 95/32195/1
Florin Coras [Mon, 3 May 2021 15:34:53 +0000 (08:34 -0700)]
quic: fix coverity warning

Type: fix

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

3 years agosession: lookup listener with iface address 73/32173/6
liuyacan [Fri, 30 Apr 2021 08:57:37 +0000 (08:57 +0000)]
session: lookup listener with iface address

We add interface address to the global lookup table, so we should
use it as the key when lookup listener. Otherwise, when multiple
threads listen on 0.0.0.0 (local scope disable), duplicate
listeners and sessions would be allocated but only one works.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I86f36475c16e217c6c5293a62c4fb5c9477a191e

3 years agordma: avoid unnencessary inlining 42/32142/2
Damjan Marion [Tue, 27 Apr 2021 16:23:20 +0000 (18:23 +0200)]
rdma: avoid unnencessary inlining

Type: fix
Change-Id: Ifc4b30675365ebb5d69c018a34fd17a5090b30e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: multiarch vlib_frame_queue_dequeue() 85/32185/3
Damjan Marion [Sat, 1 May 2021 12:56:13 +0000 (14:56 +0200)]
vlib: multiarch vlib_frame_queue_dequeue()

Fact that it needs to copy buffer indices justifies this move.

Type: improvement
Change-Id: I5eb815ccc4cca0ef70b092eb83a49b713efdcbeb
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoquic: improve udp dgram write 84/32184/5
Florin Coras [Sat, 1 May 2021 00:50:29 +0000 (17:50 -0700)]
quic: improve udp dgram write

Type: improvement

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

3 years agotls: cleanup dtls migrated context 87/32187/4
Florin Coras [Sun, 2 May 2021 02:01:42 +0000 (19:01 -0700)]
tls: cleanup dtls migrated context

Type: fix

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

3 years agovcl: attr api to set endpt ext config 86/32186/5
Florin Coras [Sat, 1 May 2021 23:01:40 +0000 (16:01 -0700)]
vcl: attr api to set endpt ext config

Type: improvement

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

3 years agovlib: refactor trajectory trace debug feature 28/31528/4
Benoît Ganne [Thu, 4 Mar 2021 13:31:03 +0000 (14:31 +0100)]
vlib: refactor trajectory trace debug feature

trajectory trace has been broken for a while because we used to save the
buffer trajectory in a vector pointed to in opaque2. This does not work
well when opaque2 is copied (eg. because of a clone) as 2 buffers end up
sharing the same vector.
This dedicates a full cacheline in the buffer metadata instead when
trajectory is compiled in. No dynamic allocation, no sharing, no tears.

Type: refactor

Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agobuild: add option to turn off some march variants 83/32183/2
Damjan Marion [Fri, 30 Apr 2021 17:31:09 +0000 (19:31 +0200)]
build: add option to turn off some march variants

Type: make
Change-Id: I53f7995c7e7a7ff829c662d71f37d88780bdd140
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agobuild: declare some CMake variables as advanced 82/32182/1
Damjan Marion [Fri, 30 Apr 2021 18:27:53 +0000 (20:27 +0200)]
build: declare some CMake variables as advanced

Type: make
Change-Id: I780c1c81a50cb92bc89c05856efd8ef88479c0ab
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: experimental configure script 77/32177/7
Damjan Marion [Thu, 29 Apr 2021 16:47:25 +0000 (18:47 +0200)]
misc: experimental configure script

Type: make
Change-Id: Iaeb9d22eec9a7a763b63899814a44e78c8050f1f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoquic: report number of packets sent on custom tx 69/32169/4
Florin Coras [Fri, 30 Apr 2021 00:07:06 +0000 (17:07 -0700)]
quic: report number of packets sent on custom tx

A transport's custom_tx function must report the number of segments that
it enqueued.

Type: fix

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

3 years agohsa: vcl test client incremental stats 71/32171/6
Florin Coras [Fri, 30 Apr 2021 04:28:03 +0000 (21:28 -0700)]
hsa: vcl test client incremental stats

Add option to print per second tx stats

Type: improvement

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

3 years agobuild: switch release build to -O3 74/32174/1
Damjan Marion [Fri, 30 Apr 2021 09:11:08 +0000 (11:11 +0200)]
build: switch release build to -O3

Type: make
Change-Id: Ia39c2f847e7b4907fdd3fcac75897b8b4c545a65
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosession: accept notifies for sessions in created state 68/32168/2
Florin Coras [Thu, 29 Apr 2021 18:55:23 +0000 (11:55 -0700)]
session: accept notifies for sessions in created state

Makes sure we don't notify apps of sessions that are closing or multiple
times for the same session.

Type: improvement

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

3 years agosession: cleanup CREATED sessions when listener goes down 59/32159/6
liuyacan [Wed, 28 Apr 2021 11:34:03 +0000 (11:34 +0000)]
session: cleanup CREATED sessions when listener goes down

We should cleanup sessions in CREATED state when listener goes
down, otherwise they may use unpredictable sessions as listeners
later.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: Ifbd0a0fb46275bd9d89e5aee19a70c1d01d15764

3 years agocrypto: fix chained buffer integrity support 85/31585/5
Benoît Ganne [Mon, 8 Mar 2021 09:22:51 +0000 (10:22 +0100)]
crypto: fix chained buffer integrity support

Type: fix

Change-Id: I984a3e577a4209e41d046eaf3a8eef8986dc6147
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agohsa: vcl test perf improvements 63/32163/13
Florin Coras [Wed, 28 Apr 2021 20:02:33 +0000 (13:02 -0700)]
hsa: vcl test perf improvements

- poll session events in server
- init session buffers based on config
- cleanup some of the data structures

Type: improvement

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

3 years agovcl: fix epoll wait with indefinite timeout 62/32162/4
Florin Coras [Wed, 28 Apr 2021 20:01:06 +0000 (13:01 -0700)]
vcl: fix epoll wait with indefinite timeout

Also avoid syscalls if timeout is 0.

Type: fix

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

3 years agovppinfra: AArch64 NEON implementation of clib_compare_u16_x64() 60/32160/3
Damjan Marion [Wed, 28 Apr 2021 17:31:22 +0000 (19:31 +0200)]
vppinfra: AArch64 NEON implementation of clib_compare_u16_x64()

Type: improvement
Change-Id: I1382813211ea20c6204d7a3b6e6d470aa51aed69
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: add worker count to class description 64/31764/12
Klement Sekera [Thu, 25 Mar 2021 13:03:44 +0000 (14:03 +0100)]
tests: add worker count to class description

While running test:

==============================================================================
NAT44ED Test Case
==============================================================================

==>

==============================================================================
NAT44ED Test Case [main thread only]
==============================================================================

==============================================================================
NAT44ED Test Case [1 worker thread]
==============================================================================

==============================================================================
NAT44ED Test Case [4 worker threads]
==============================================================================

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

3 years agovppinfra: don't fail if config.h is missing, fallback to defaults instead 57/32157/2
Damjan Marion [Wed, 28 Apr 2021 15:30:51 +0000 (17:30 +0200)]
vppinfra: don't fail if config.h is missing, fallback to defaults instead

Type: improvement
Change-Id: Idc82d40a16cbc8a401a8fb359bc63083f47361b9
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agopapi: change default to use socket transport instead of shared memory transport 96/31996/6
Ole Troan [Thu, 15 Apr 2021 14:53:39 +0000 (16:53 +0200)]
papi: change default to use socket transport instead of shared memory transport

In preparation for removing Python shared memory support, change the default to use sockets.
This may affect users of PAPI. E.g. if running against instances of VPP where
the API socket is in a different location or disabled.

Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I96308ed70b9ff314c9b487722174f5e4b14efdd2
Signed-off-by: Ole Troan <ot@cisco.com>
3 years agopg: exec file fixes 28/32028/7
mdr78 [Tue, 23 Mar 2021 12:40:21 +0000 (12:40 +0000)]
pg: exec file fixes

A number of the pg commands were being passed the whole exec file,
instead of just a line from the file.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I2f96e7648b9b7d501088eddff7e4a761973e71f4

3 years agohsa: fix quic vcl test 51/32151/5
Florin Coras [Wed, 28 Apr 2021 00:03:24 +0000 (17:03 -0700)]
hsa: fix quic vcl test

Type: fix

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

3 years agohsa: support sigint in vcl test client 53/32153/5
Florin Coras [Wed, 28 Apr 2021 07:04:33 +0000 (00:04 -0700)]
hsa: support sigint in vcl test client

Type: improvement

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

3 years agoip: extend the punt cli to accept reason filter for sockets registration 58/31958/3
Arthur de Kerhor [Mon, 12 Apr 2021 15:16:56 +0000 (08:16 -0700)]
ip: extend the punt cli to accept reason filter for sockets registration

Type: improvement
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I769db1213b0936abbf304bc6cf9dbcfbbebf06aa

3 years agonat: fix byte order on ipfix message fields 25/32125/3
Matthew Smith [Wed, 4 Nov 2020 17:18:10 +0000 (11:18 -0600)]
nat: fix byte order on ipfix message fields

Type: fix

The code for quota exceeded events is a u32 and was being copied
into ipfix packets in host byte order. Same for the limit field.

Swap the order before copying into packet buffer.

This change was applied once before but had to be reverted. This was
because between the time the change was uploaded/reviewed and the
time it was merged, a different patch was merged which activated a
NAT ipfix unit test that had formerly only been run as part of the
extended tests. The test was expecting the values to be in host byte
order so it failed with this patch applied. This time around, that
test has also been updated to expect network byte order.

Change-Id: If5413b1f806d664f6786e56ba13c3eee573c26d2
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agogre: Remove the debugging logging from the mGRE tests 38/32138/4
Neale Ranns [Tue, 27 Apr 2021 13:54:46 +0000 (13:54 +0000)]
gre: Remove the debugging logging from the mGRE tests

Type: test

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I5c540b3a2f26689973daec80372c5a935a455a12

3 years agobuild: Makefile cleanup 50/32150/2
Damjan Marion [Tue, 27 Apr 2021 22:11:33 +0000 (00:11 +0200)]
build: Makefile cleanup

Type: make
Change-Id: I751b0a25161c6eb8614ca19f7c77a4de82401f3d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: fix dead stores 48/32148/2
Damjan Marion [Tue, 27 Apr 2021 17:41:45 +0000 (19:41 +0200)]
misc: fix dead stores

Type: fix
Change-Id: I08969e1c4a78f8ac92ec066a3b67e64dc931bc16
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: improve enqueue_to_next buffer indices extraction 95/32095/10
Damjan Marion [Thu, 22 Apr 2021 16:08:28 +0000 (18:08 +0200)]
vlib: improve enqueue_to_next buffer indices extraction

Type: improvement

Change-Id: Ib7b2fa7d821f6d2708f6dc378a0f36f68c843f57
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agohsa: custom proto vfts for vcl tests 30/32130/12
Florin Coras [Tue, 27 Apr 2021 01:43:20 +0000 (18:43 -0700)]
hsa: custom proto vfts for vcl tests

Define custom connect, listen, accept, close handlers for transport
protos under test.

Type: improvement

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

3 years agosession: fix mq ext config cleanup 45/32145/2
Florin Coras [Tue, 27 Apr 2021 20:30:37 +0000 (13:30 -0700)]
session: fix mq ext config cleanup

Type: fix

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

3 years agomisc: add StatementMacros to .clang-format 11/32111/6
Damjan Marion [Sun, 25 Apr 2021 08:46:26 +0000 (10:46 +0200)]
misc: add StatementMacros to .clang-format

Type: make
Change-Id: I79d8d0aa8b8349df0b3c1f338861350e8df31ca6
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: silence coverity warnings related to clib_memcpy_u32() 31/32131/2
Damjan Marion [Tue, 27 Apr 2021 09:00:54 +0000 (11:00 +0200)]
vppinfra: silence coverity warnings related to clib_memcpy_u32()

Type: fix
Change-Id: I17e7b3fca390c0b0150c4606f7c93771ee9bdbdc
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: update arp and ip6-nd files location 80/32080/2
Steven Luong [Wed, 21 Apr 2021 18:11:41 +0000 (11:11 -0700)]
misc: update arp and ip6-nd files location

arp and ip6-nd are not plugins [yet]. Change the files location to
reflect its current correct locations.

Type: fix

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

3 years agovppinfra: Fix a bug related to path_search 84/32084/3
Ryo Nishikawa [Thu, 22 Apr 2021 14:31:09 +0000 (23:31 +0900)]
vppinfra: Fix a bug related to path_search

Type: fix
Signed-off-by: Ryo Nishikawa <nishikawa0320@gmail.com>
Change-Id: Iabf7e088245395ea3fff62a22266a31de3fc305e

3 years agovrrp: increase stack size of process node 19/32019/3
Matthew Smith [Fri, 16 Apr 2021 19:13:58 +0000 (14:13 -0500)]
vrrp: increase stack size of process node

Type: fix

The process node which wakes up when a timer expires and transitions
a backup node to master state may call a function to add a MAC address
to an interface. This works fine for some devices, but with DPDK 20.11
on i40e interfaces, the i40e PMD functions which enact the change cause
the stack to be exhausted. Increase the stack size for the node.

Change-Id: I824603e162f4f6d680486706210986572f0d9845
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
3 years agomisc: auto-generate go bindings 30/31930/8
Vladimir Lavor [Thu, 8 Apr 2021 11:08:04 +0000 (13:08 +0200)]
misc: auto-generate go bindings

Type: feature

Added target 'make go-api-files' creating compatible go bindings
using JSON API definition and GoVPP binary API generator.

Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Change-Id: I5bae113b85eaf5ebda8e292d34c9826075ef19b5

3 years agoperfmon: top down level 1 support 29/32029/9
mdr78 [Fri, 19 Mar 2021 19:03:54 +0000 (19:03 +0000)]
perfmon: top down level 1 support

Adding perfmon node TMAM support on ICX.

Type: improvement

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I48a9a9ff6a72efc28eaf0cb11ef39fb62cebb126

3 years agohsa: use only one conn type for vcl tests 28/32128/8
Florin Coras [Mon, 26 Apr 2021 19:10:21 +0000 (12:10 -0700)]
hsa: use only one conn type for vcl tests

Type: refactor

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

3 years agovapi: silence warnings 29/32129/1
Damjan Marion [Mon, 26 Apr 2021 21:25:08 +0000 (23:25 +0200)]
vapi: silence warnings

Type: fix
Change-Id: I91d7bfbfaafc7b780f91dec7c9e5ce07241e6394
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agohsa: use tcp for vcl test control channel 10/32110/12
Florin Coras [Fri, 23 Apr 2021 21:01:01 +0000 (14:01 -0700)]
hsa: use tcp for vcl test control channel

Also, only exchange config over control session.

Type: improvement

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

3 years agovppinfra: clib_memcpy_u32() utilizing SIMD mask loads/stores 81/32081/13
Damjan Marion [Wed, 21 Apr 2021 19:11:35 +0000 (21:11 +0200)]
vppinfra: clib_memcpy_u32() utilizing SIMD mask loads/stores

Type: improvement
Change-Id: I55c4688bd1feffae139ce12a66d15885373e5cd7
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agopg: fix packet coalescing cli 32/31632/11
Ray Kinsella [Fri, 12 Mar 2021 14:29:48 +0000 (14:29 +0000)]
pg: fix packet coalescing cli

Small fix to the packet coalescing cli.

Type: fix

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I1edbf6e43937aa0345185f06437095e0558dba31

3 years agovppapigen: remove flag day code 45/30345/5
Paul Vinciguerra [Tue, 8 Dec 2020 15:56:15 +0000 (15:56 +0000)]
vppapigen:  remove flag day code

The flag day for the crc algorithm change has long passed and
should not be carried into the next release.

Type: refactor

Change-Id: I1b1027139a778907926e48a8a553b908a79db08f
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agotests: clean up gbp calls from vpp_papi_provider 16/32116/3
Paul Vinciguerra [Mon, 26 Apr 2021 01:50:38 +0000 (21:50 -0400)]
tests: clean up gbp calls from vpp_papi_provider

Move info from vpp_papi_provider to .api/vpp_objects

Change-Id: Iaf46483fda2840dfec8d37e0b9262e1c9912be59
Type: test
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agosession: fix race condition in fifo allocation 15/32115/5
liuyacan [Sun, 25 Apr 2021 12:11:30 +0000 (20:11 +0800)]
session: fix race condition in fifo allocation

Under some timing conditions,VCL may receive CONNECTED/ACCEPTED
event before ADD_SEGMENT event.

Timing example:

2 threads call segment_manager_alloc_session_fifos() parallelly

         Thread 1                Thread 2

       sm read lock                 |
            |                       |
     try to alloc fifo =>failed     |
            |                       |
       sm read unlock               |
            |                       |
       sm write lock                |
            |                       |
       add segment                  |
            |                       |
       sm write unlock              |
            |                  sm read lock
            |                       |
            |               try to alloc fifo=>successful
       sm read lock                 |
            |                  sm read unlock
            |                       |
            |                 emit CONNECTED/ACCEPTED
   emit ADD_SEGMENT event
            |
       sm read unlock

This commit move ADD_SEGMENT notification under the protection
of the write lock in some scenarios.

Type: fix

Signed-off-by: liuyacan <liuyacan@corp.netease.com>
Change-Id: I25d5475c5e6d37cfccefa9506f6030c26ce8ee9b

3 years agovppinfra: add COMPILE_TIME_CONST() macro 13/32113/2
Damjan Marion [Sun, 25 Apr 2021 08:55:53 +0000 (10:55 +0200)]
vppinfra: add COMPILE_TIME_CONST() macro

Type: improvement
Change-Id: I10d7489f57bc60eb92049962b4e6ea84974f17b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: AVX512 mask load/stores and compress store 12/32112/2
Damjan Marion [Sun, 25 Apr 2021 08:51:51 +0000 (10:51 +0200)]
vppinfra: AVX512 mask load/stores and compress store

Type: improvement
Change-Id: Id6be598aade072653e408cca465e62931d060233
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: add clear_lowest_set_bit() function, use BMI2 if available 14/32114/1
Damjan Marion [Sun, 25 Apr 2021 08:58:07 +0000 (10:58 +0200)]
vppinfra: add clear_lowest_set_bit() function, use BMI2 if available

Type: improvement
Change-Id: I973cacd0cade0ca98e6261c1fb026a5eb38b44d3
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: correct detection of icmp bypass presence 89/32089/3
Klement Sekera [Thu, 22 Apr 2021 11:38:58 +0000 (13:38 +0200)]
nat: correct detection of icmp bypass presence

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

3 years agovxlan: Fix L3 mode 85/32085/5
Nathan Skrzypczak [Wed, 21 Apr 2021 17:56:34 +0000 (19:56 +0200)]
vxlan: Fix L3 mode

Type: fix

Partially revert fix SEGV reported in VPP-1962
[commit a4b0541f64eef02fa0d003d8f831cfdeb45d3668]

This adds an is_l3 option to choose between L2 & L3
mode add tunnel creation time

Change-Id: Ia2c91a1099074b7d23fc031b78ed0f68628eeabe
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agosession: set connected session index for ct 05/32105/3
Florin Coras [Fri, 23 Apr 2021 15:58:57 +0000 (08:58 -0700)]
session: set connected session index for ct

Set connected session index for ct as well.

Type: fix

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

3 years agodpdk: support md5 async handler in dpdk cryptodev 86/32086/3
Alexander Chernavin [Thu, 22 Apr 2021 08:48:34 +0000 (04:48 -0400)]
dpdk: support md5 async handler in dpdk cryptodev

With this change, enable MD5 with AES-CBC support in dpdk cryptodev.

Type: improvement
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
Change-Id: Ic587aaa1fa0dc102e36eb34f329ef21a16156f26

3 years agotcp: try to update sack list only if not empty 00/32100/3
Florin Coras [Fri, 23 Apr 2021 04:10:02 +0000 (21:10 -0700)]
tcp: try to update sack list only if not empty

Type: fix

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

3 years agotcp: reorganize connection members 96/32096/5
Florin Coras [Thu, 22 Apr 2021 23:58:23 +0000 (16:58 -0700)]
tcp: reorganize connection members

Optimize connection size and move timestamp_delta closer to other
timestamp related members.

Type: refactor

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

3 years agotls quic: improve error reporting 94/32094/5
Florin Coras [Thu, 22 Apr 2021 18:48:35 +0000 (11:48 -0700)]
tls quic: improve error reporting

Type: improvement

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

3 years agosession: set fifo's session index before vcl attach 99/32099/3
liuyacan [Fri, 23 Apr 2021 01:38:38 +0000 (09:38 +0800)]
session: set fifo's session index before vcl attach

Current implementation may have timing issue:

1. The TCP 3-way-handshake is completed but the app is busy and
   does not process the CONNECTED event.
2. VPP receive some data from peer and try to send a RX event to
   VCL, but the fifo's client session index is not initialized yet.
   So this event will be sent to incorrect session 0.

Type: fix

Change-Id: I54f222232968bfaea5f4745284a1cfacc89482a9
Signed-off-by: liuyacan <liuyacan@corp.netease.com>
3 years agosession: remove unused connect/listen msg members 93/32093/2
Florin Coras [Thu, 22 Apr 2021 17:58:17 +0000 (10:58 -0700)]
session: remove unused connect/listen msg members

Type: refactor

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

3 years agovcl session: refactor passing of crypto context 76/32076/14
Florin Coras [Wed, 21 Apr 2021 16:05:56 +0000 (09:05 -0700)]
vcl session: refactor passing of crypto context

Pass tls/quic crypto context using extended config instead of bloating
conect/listen messages.

Type: refactor

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

3 years agoflow: Add API implementation of IP4/IP6, IP4_VXLAN/IP6_VXLAN 71/28671/7
Chenmin Sun [Thu, 3 Sep 2020 22:50:22 +0000 (06:50 +0800)]
flow: Add API implementation of IP4/IP6, IP4_VXLAN/IP6_VXLAN

This patch adds the API handler implementation of the below flows:
    FLOW_TYPE_IP4,
    FLOW_TYPE_IP6,
    FLOW_TYPE_IP4_VXLAN,
    FLOW_TYPE_IP6_VXLAN

Type: feature

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

3 years agotls: tlspicotls require version when building 88/32088/2
Nathan Skrzypczak [Thu, 22 Apr 2021 11:23:13 +0000 (13:23 +0200)]
tls: tlspicotls require version when building

Type: fix

When building the tlspicotls plugin, we rely
on vpp-ext-deps having installed quicly & picotls.
We add a dependancy on the version installed thus
ensuring that people with older vpp-ext-deps version
installed don't have their build fail.

This has the drawback that picotls doesn't have its
own versionning scheme

Change-Id: I9e2ccfc00b3c37af2bc2483a791eb05f994dd4a4
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agovcl session: extended connect/listen configuration 41/32041/11
Florin Coras [Tue, 20 Apr 2021 00:34:54 +0000 (17:34 -0700)]
vcl session: extended connect/listen configuration

Type: feature

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

3 years agomisc: add filter for specific error for pcap trace 93/31493/10
Benoît Ganne [Wed, 3 Mar 2021 16:37:25 +0000 (17:37 +0100)]
misc: add filter for specific error for pcap trace

Type: feature

Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agoip: remove unnecesary inlining in ip4-rewrite node 82/32082/2
Damjan Marion [Wed, 21 Apr 2021 21:44:40 +0000 (23:44 +0200)]
ip: remove unnecesary inlining in ip4-rewrite node

Type: refactor
Change-Id: Ifbaf42ef88a7e0f1715b7b5e342af790e3b6acd9
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoquic: update quicly to v0.1.3 74/31874/4
Mathias Raoul [Fri, 2 Apr 2021 18:02:24 +0000 (18:02 +0000)]
quic: update quicly to v0.1.3

This bumps quicly version to v0.1.3 ( sha
d44c089364067dbcdfbad7fb2c821900fb4aef5e in
https://github.com/h2o/quicly )

Also simplifies the build to only make needed
dependancies, and silence compiletime warnings

Type: feature

Change-Id: Ie00ec7e408d234464871b68ddc79bb33dc4179ed
Signed-off-by: Mathias Raoul <mathias.raoul@gmail.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agodocs: document "make test-help" 60/32060/2
Dave Barach [Tue, 20 Apr 2021 11:52:38 +0000 (07:52 -0400)]
docs: document "make test-help"

Type: docs

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

3 years agobuffers: vlib_get_buffers() with 512-bit SIMD 74/32074/3
Damjan Marion [Wed, 21 Apr 2021 13:25:47 +0000 (15:25 +0200)]
buffers: vlib_get_buffers() with 512-bit SIMD

Type: improvement
Change-Id: Id8ce3ffc1299a38171b82a7082454412c840a40c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: don't inline vlib_buffer_enqueue_to_* 75/32075/3
Damjan Marion [Wed, 21 Apr 2021 10:55:15 +0000 (12:55 +0200)]
vlib: don't inline vlib_buffer_enqueue_to_*

Function call in this case is not bad thing, as those functions
are called once per frame.

Type: improvement
Change-Id: I7bd61cf746b905e2c8e3085ebb2ff001c0a52da8
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: more avx512 inlines (compress, expand, from, is_equal_mask) 71/32071/3
Damjan Marion [Tue, 20 Apr 2021 19:28:45 +0000 (21:28 +0200)]
vppinfra: more avx512 inlines (compress, expand, from, is_equal_mask)

Type: improvement

Change-Id: I4cb86cafba92ae70cea160b9bf45f28a916ab6db
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agocnat: Fix session flag initialization 05/31905/5
Nathan Skrzypczak [Tue, 6 Apr 2021 15:58:18 +0000 (17:58 +0200)]
cnat: Fix session flag initialization

Type: fix

Sometimes session->value.flags wasn't initialized
leading to next_node index corruption.
Also added a debug flag to tell session/rsessions appart

Change-Id: I80da50f2267e03a4552e8c9efc8e3aa08bc5569d
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
3 years agonat: fix multi worker scenarios 64/31864/17
Klement Sekera [Wed, 31 Mar 2021 11:38:09 +0000 (13:38 +0200)]
nat: fix multi worker scenarios

Properly select worker from hash table in out2in direction, increase
number of worker threads in MW test to 4 to test these cases.

Type: fix
Change-Id: I76eda5761ff497b85b031dd913a64b7fcb53b33a
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agosvm: allow external chunk alloc on segment 66/32066/2
Florin Coras [Tue, 20 Apr 2021 21:26:46 +0000 (14:26 -0700)]
svm: allow external chunk alloc on segment

Type: improvement

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

3 years agopmalloc: tolerate move_pages failure on numa node #0 65/32065/2
Klement Sekera [Tue, 20 Apr 2021 16:08:45 +0000 (18:08 +0200)]
pmalloc: tolerate move_pages failure on numa node #0

Type: fix
Change-Id: I65dbc4f3db47c745a0187e015845e07b3b0568e5
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agonat: fixing cli bug for nat44-ei and nat44-ed 63/32063/3
Filip Varga [Tue, 20 Apr 2021 14:25:16 +0000 (16:25 +0200)]
nat: fixing cli bug for nat44-ei and nat44-ed

Removing obsolete optional parameters.

Type: fix

Change-Id: I135eb4767979ab81636da16e91752a2ad80e0a45
Signed-off-by: Filip Varga <fivarga@cisco.com>