vpp.git
3 years agotcp: req app deq notification on fifo full 35/32035/7
Florin Coras [Mon, 19 Apr 2021 17:17:26 +0000 (10:17 -0700)]
tcp: req app deq notification on fifo full

If fifo full, default to requesting an app deq notification and forcing
an ack (window update) if zero rcv window sent is still active.

Type: improvement

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

3 years agocrypto: support async handlers for 3des and md5 32/31032/4
Alexander Chernavin [Mon, 1 Feb 2021 10:17:24 +0000 (05:17 -0500)]
crypto: support async handlers for 3des and md5

With this change, add support for 3DES and MD5 in IPsec async mode.

After changes in foreach_crypto_link_async_alg, the last combination in
the list (aes-256-cbc-hmac-sha-512) started to fail during decription.
That was also fixed by proper vector size validation.

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

3 years agonat: nat44-ed i2o & o2i trace fix 64/32064/2
Filip Varga [Tue, 20 Apr 2021 14:39:07 +0000 (16:39 +0200)]
nat: nat44-ed i2o & o2i trace fix

If cache used than we don't print in trace session index.

Type: fix

Change-Id: Ib965cd8632b5217f8b2dd8b6cc6af3286c747582
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agoipsec: remove WITH_LIBSSL macros 34/32034/4
Damjan Marion [Mon, 19 Apr 2021 16:15:31 +0000 (18:15 +0200)]
ipsec: remove WITH_LIBSSL macros

We don't use libssl anymore... At least not directly.

Type: improvement
Change-Id: I9a0fab6e3c576d945498ce46f030bd26c1a14d15
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agodpdk: fix mlx4 mlx5 detection in plugin build 42/32042/1
Mohammed Hawari [Tue, 20 Apr 2021 08:05:52 +0000 (10:05 +0200)]
dpdk: fix mlx4 mlx5 detection in plugin build

Since the move to DPDK 21.02, compatibility build symbols were depreca-
ted, breaking the static linkage of the DPDK plugin to libibverbs.

Change-Id: I2fec0807e4c0eb00268618f1495af862eede9081
Type: fix
Fixes: 5f35a185d5afee2c364fe84f33922bac1a808113
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
3 years agovlib: remove unused code 38/32038/2
Damjan Marion [Mon, 19 Apr 2021 19:47:24 +0000 (21:47 +0200)]
vlib: remove unused code

Type: refactor
Change-Id: I01dba12a7f8aa2fa6d2e4113c91dc97e638aca77
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: momve clib_sysfs_list_to_bitmap to sysfs.c 37/32037/1
Damjan Marion [Mon, 19 Apr 2021 19:44:21 +0000 (21:44 +0200)]
vppinfra: momve clib_sysfs_list_to_bitmap to sysfs.c

Type: refactor
Change-Id: Ia5a7ebd5c8492326f5bf2f1264f1c5ef38ccb4dc
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip: fix offload flags handling 02/32002/4
Aloys Augustin [Thu, 15 Apr 2021 16:12:51 +0000 (18:12 +0200)]
ip: fix offload flags handling

The per-protocol offload flags only make sense if F_OFFLOAD is set on
the vlib buffer main flags.
vnet_calc_checksums_inline is called from many places which should do
this check and don't, moving the check to this function is less error
prone and shouldn't have an impact on performance since the function
is always_inline.

Type: fix
Change-Id: I0297f109f31e409f07bfbaea3cd8b90c659658c4
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
3 years agointerface: interface-output end node rework 07/32007/2
Damjan Marion [Fri, 16 Apr 2021 09:49:26 +0000 (11:49 +0200)]
interface: interface-output end node rework

 - rename node to more meaningful name
 - introduce lookup tables
 - enable multiarch
 - quad-loop node
 - enqqueue to next instead of enqueueing to node

Type: improvement
Change-Id: Ibb208047ae04bb6cfe56db558d3b8938bc14b4fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoip: remove dead code from ip_csum 24/32024/2
Damjan Marion [Sun, 18 Apr 2021 19:03:24 +0000 (21:03 +0200)]
ip: remove dead code from ip_csum

Type: fix
Change-Id: I3b37257e86175743a7bac80c531491565f0a8dcd
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: remove outdated and unused unix format functions 22/32022/3
Damjan Marion [Sun, 18 Apr 2021 13:33:39 +0000 (15:33 +0200)]
vppinfra: remove outdated and unused unix format functions

Type: refactor
Change-Id: If1772980dbdbde1fbf3d1989daa40599e9f23e8c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovppinfra: remove linux/syscall.h 21/32021/2
Damjan Marion [Fri, 9 Oct 2020 15:16:55 +0000 (17:16 +0200)]
vppinfra: remove linux/syscall.h

For portabiliy reasons it is better to have all wrapped in clib code.
I.e. instead of using getcpu() we have clib_get_current_numa_node () and
clib_get_current_cpu_id().

Type: refactor
Change-Id: I29b52d7f29bc7f93873402c4070561f564b71c63
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoclassify: honor pcap interface filter also when classify filter is used 65/31465/8
Benoît Ganne [Fri, 26 Feb 2021 12:47:41 +0000 (13:47 +0100)]
classify: honor pcap interface filter also when classify filter is used

Type: fix

Change-Id: Ic32550ee9c5d76d232d8b67a7810611f6c8b9177
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotests: cpus awareness 50/31950/14
Klement Sekera [Thu, 8 Apr 2021 17:37:41 +0000 (19:37 +0200)]
tests: cpus awareness

Introduce MAX_CPUS parameters to control maximum number of CPUs used by
VPP(s) during testing, with default value 'auto' corresponding to all
CPUs available.

Calculate test CPU requirements by taking into account the number of
workers, so a test requires 1 (main thread) + # of worker CPUs.

When running tests, keep track of both running test jobs (controlled by
TEST_JOBS parameter) and free CPUs. This then causes two limits in the
system - to not exceed number of jobs in parallel but also to not exceed
number of CPUs available.

Skip tests which require more CPUs than are available in system (or more
than MAX_CPUS) and print a warning message.

Type: improvement
Change-Id: Ib8fda54e4c6a36179d64160bb87fbd3a0011762d
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agovlib: make vlib_pending_frame_t smaller 03/32003/1
Damjan Marion [Thu, 15 Apr 2021 17:54:44 +0000 (19:54 +0200)]
vlib: make vlib_pending_frame_t smaller

Type: improvement
Change-Id: I8715631718dca9bc7d7b364451b137484aadd58e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotcp: support for rate sample attr flag 01/32001/3
Florin Coras [Thu, 15 Apr 2021 15:50:00 +0000 (08:50 -0700)]
tcp: support for rate sample attr flag

Type: fix

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

3 years agovrrp: refactor test 00/32000/3
Paul Vinciguerra [Thu, 15 Apr 2021 15:37:44 +0000 (11:37 -0400)]
vrrp:  refactor test

Move scapy packet generation code out of vpp object and into the test
case.

Type: test

Change-Id: Ib4de7409eefb79fc59f9815bed3befe5ecde483c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
3 years agovcl: validate fs before cleanup 82/31982/2
Florin Coras [Thu, 15 Apr 2021 00:55:02 +0000 (17:55 -0700)]
vcl: validate fs before cleanup

Type: fix

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

3 years agopapi: fix ubuntu 1804 make test socket.close error 72/31972/5
Tianyu Li [Wed, 14 Apr 2021 04:36:20 +0000 (12:36 +0800)]
papi: fix ubuntu 1804 make test socket.close error

make test failed on ubuntu 18.04
  File "/vpp/src/vpp-api/python/vpp_papi/vpp_stats.py", line 135, in connect
    socket.close(mfd)
AttributeError: module 'socket' has no attribute 'close'

Due to ubuntu 18.04 using python3.6 and
socket.close() is introduced since python3.7

Using os.close to replace socket.close as mfd is a memory fd

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I6d980fc87ae6c77bbed416879f9b2fcd0a0abe6a

3 years agovppinfra: move bitmap format functions to .c file, add format_bitmap_list 94/31994/2
Damjan Marion [Thu, 15 Apr 2021 14:13:20 +0000 (16:13 +0200)]
vppinfra: move bitmap format functions to .c file, add format_bitmap_list

Type: improvement
Change-Id: I9baa845ecab8655e0623453666092d2dbc674b0f
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: fix tx path segfault 95/31995/2
Radu Nicolau [Thu, 15 Apr 2021 14:11:49 +0000 (14:11 +0000)]
avf: fix tx path segfault

Type: fix
Fixes: ca1812dbe714fc8e4de13f88df2d3b830d95a2c9
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Change-Id: I657be40689caa0c9e202fb411da6323aafeab57e

3 years agovppinfra: correct intrinsic called by u16x16_from_u8x16 85/31985/2
Lijian.Zhang [Wed, 14 Apr 2021 08:12:28 +0000 (16:12 +0800)]
vppinfra: correct intrinsic called by u16x16_from_u8x16

u16x16_from_u8x16() and i16x16_from_i8x16() call intrisics
_mm256_cvtepu8_epi64 and _mm256_cvtepi8_epi64. But they are not seems
doing the right data conversion from the name of the wrappers.
The correct intrinsics been called should be _mm256_cvtepu8_epi16
and _mm256_cvtepi8_epi16.

Type: fix

Change-Id: Id71de6ae1a266a370f11c33a46684202be766c43
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
3 years agoavf: remove the vxlan flow support 84/31984/1
Chenmin Sun [Thu, 15 Apr 2021 10:51:24 +0000 (18:51 +0800)]
avf: remove the vxlan flow support

This patch fixes a vxlan flow type checking bug which is introduced in
commit 7a016e87e473.
It is the native avf instead of dpdk that doesn't support vxlan flow offloading.
So this patch removes Vxlan flow supporting in native avf_plugin and adds
the vxlan flow back to dpdk_plugin.

Type: fix

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

3 years agosession: fix next node add on transport registration 79/31979/2
Florin Coras [Wed, 14 Apr 2021 18:23:55 +0000 (11:23 -0700)]
session: fix next node add on transport registration

Type: fix

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

3 years agovlib: fix access before check issue in foreach_vlib_main macro 80/31980/3
Damjan Marion [Wed, 14 Apr 2021 17:07:13 +0000 (19:07 +0200)]
vlib: fix access before check issue in foreach_vlib_main macro

Type: fix
Change-Id: Iefb150a60b39d419d7dde35c80fbcba3a3a0d1e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agomisc: clang-12 support 78/31978/1
Damjan Marion [Wed, 14 Apr 2021 16:48:22 +0000 (18:48 +0200)]
misc: clang-12 support

Type: improvement
Change-Id: Ie8ebbbcf5e93337036998d6ba8dac393b20ebc72
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agosession tcp vcl: api to update connection attributes 59/31959/11
Florin Coras [Tue, 13 Apr 2021 02:55:37 +0000 (19:55 -0700)]
session tcp vcl: api to update connection attributes

Type: feature

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

3 years agodpdk: add RSS capability flag to iavf PMD in dpdk_plugin 55/31955/3
Chenmin Sun [Mon, 12 Apr 2021 16:54:45 +0000 (00:54 +0800)]
dpdk: add RSS capability flag to iavf PMD in dpdk_plugin

Type: fix

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

3 years agordma: remove redundant memory registration 72/31672/4
Benoît Ganne [Wed, 17 Mar 2021 15:16:16 +0000 (16:16 +0100)]
rdma: remove redundant memory registration

The memory region is already registered right above, looks like a
copy/paste error.

Type: fix

Change-Id: I97aed821e719e1a34ac38c86d0473a8fdd671d4e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agonat: test dynamic translation between two vrfs 66/31966/5
Filip Varga [Tue, 13 Apr 2021 15:47:13 +0000 (17:47 +0200)]
nat: test dynamic translation between two vrfs

Adding test for NAT44-ED subplugin.

Type: test

Change-Id: I10ce3d3ca8cb976ee9879efe77cb600df0102147
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agordma: fix skip_ipv4_cksum behavior in scalar path 60/31960/2
Tianyu Li [Fri, 9 Apr 2021 07:51:46 +0000 (15:51 +0800)]
rdma: fix skip_ipv4_cksum behavior in scalar path

Current rdma input L3 validating behavior for scalar path is:
if any packet L3_OK flag matches, then unset skip_ip4_cksum.
The correct behavior should be if any packet L3_OK NOT match,
then unset skip_ip4_cksum. The logic is also different from
the vector path. This patch fixes the wrong behavior for scalar path.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I5ca5ed3aa0c07d441f3c87b33f03ea8f7a3c9826

3 years agohsa: fix coverity warnings 70/31970/2
Florin Coras [Tue, 13 Apr 2021 22:45:54 +0000 (15:45 -0700)]
hsa: fix coverity warnings

Type: fix

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

3 years agotls: fix coverity warning 71/31971/2
Florin Coras [Tue, 13 Apr 2021 22:56:41 +0000 (15:56 -0700)]
tls: fix coverity warning

Type: fix

Avoid complaint that we're potentially incrementing ii which could be
null.

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

3 years agoflow: The type of vni in VxLAN flow should be u32 20/30320/5
Chenmin Sun [Mon, 7 Dec 2020 16:42:43 +0000 (00:42 +0800)]
flow: The type of vni in VxLAN flow should be u32

Type: fix

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

3 years agoavf: rework TX one-by-one loop 67/31967/3
Damjan Marion [Tue, 13 Apr 2021 18:13:07 +0000 (18:13 +0000)]
avf: rework TX one-by-one loop

Type: improvement
Change-Id: I466fd0324d53e8d68b53a2c84d97a722be90f4a0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avoid placeholder buffer alloc in datapath 48/31948/4
Damjan Marion [Fri, 9 Apr 2021 15:38:31 +0000 (17:38 +0200)]
avf: avoid placeholder buffer alloc in datapath

Type: improvement
Change-Id: I0ad0fa42f056b5797ba71d6972a44273c13bb97e
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avoid ring wrap in the tx path 46/31946/8
Damjan Marion [Thu, 8 Apr 2021 14:34:28 +0000 (16:34 +0200)]
avf: avoid ring wrap in the tx path

Type: improvement
Change-Id: I91ecf0bff2ddd43ab5cf0f03ed2882882154557b
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoavf: avf flow bug fix 54/31954/2
Chenmin Sun [Mon, 12 Apr 2021 12:42:42 +0000 (20:42 +0800)]
avf: avf flow bug fix

This patch fixes the below bugs in avf flow:
  1. remove the VXLAN flow as it is not yet supported
  2. fix a typo in IPv6 flow
  3. fix the wrong type of the AH flows

Also did some cleanup in this patch

Type: fix

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

3 years agogeneve: fix options len parsing as 32-bits words 43/31843/2
Mohammed Hawari [Wed, 31 Mar 2021 15:26:19 +0000 (17:26 +0200)]
geneve: fix options len parsing as 32-bits words

See https://tools.ietf.org/html/rfc8926 3.4. second paragraph Opt Len

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

3 years agotests: support attaching to existing vpp 63/31663/20
Klement Sekera [Tue, 16 Mar 2021 11:52:12 +0000 (12:52 +0100)]
tests: support attaching to existing vpp

Introduce a new option DEBUG=attach to run a test against existing
already running vpp. A new target 'make test-start-gdb' will spawn VPP
in gdb for this purpose. Customization options explained in test-help.

Type: improvement
Change-Id: Ia160a85b33da3b2df292d44bb95729af9dd9da96
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agotests: improve naming 65/31865/2
Klement Sekera [Thu, 1 Apr 2021 16:19:29 +0000 (18:19 +0200)]
tests: improve naming

Change capture to pcap to remove confusion in framework.py

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

3 years agodpdk: selection of cryptodev engine data-path 03/31703/7
Fan Zhang [Tue, 30 Mar 2021 16:31:38 +0000 (17:31 +0100)]
dpdk: selection of cryptodev engine data-path

Type: improvement

This patch combined cryptodev op and cryptodev raw API data
paths into one and makes the engine run-timely select which
data path is used: if all cryptodev devices support
RTE_CRYPTODEV_FF_SYM_RAW_DP feature flag, the raw data path
API is used, otherwise the traditional data path is used.

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

3 years agodevices: af_packet - use netlink to get/set mtu 18/31818/3
Aloys Augustin [Mon, 29 Mar 2021 20:08:09 +0000 (22:08 +0200)]
devices: af_packet - use netlink to get/set mtu

The /sys filesystem is not always accurate when switching network
namespaces. Using netlink should work in more situations.

Type: improvement
Change-Id: I71611f14319820469ea7794eec5b7c6c70e2be6d
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
3 years agomemif: Use log_debug for clib_file_add and clib_file_del 75/31875/3
Steven Luong [Fri, 2 Apr 2021 19:23:05 +0000 (12:23 -0700)]
memif: Use log_debug for clib_file_add and clib_file_del

It is more appropriate to use log_debug instead of log_warn when inoking
clib_file_add and clib_file_del.

Type: fix

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

3 years agoavf: correctly set VL_API_AVF_DELETE is_mp_safe 35/31935/3
Steven Luong [Thu, 8 Apr 2021 17:17:26 +0000 (10:17 -0700)]
avf: correctly set VL_API_AVF_DELETE is_mp_safe

Need to add msg_id_base with VL_API_AVF_DELETE to properly set the
correct is_mp_safe variable.

Type: fix

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

3 years agoavf: crash on avf interface delete 34/31934/1
Steven Luong [Thu, 8 Apr 2021 16:31:27 +0000 (09:31 -0700)]
avf: crash on avf interface delete

When deleting an avf interface which is not the very first interface
that was created (dev_instance == 0), VPP crashes.

The reason is every avf interface delete always removes the very first
device instance due to ad->dev_instance was wiped out prior to the
statement pool_put_index (am->devices, ad->dev_instance)

Type: fix

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

3 years agovcl: use per worker mem bapi context 22/31922/2
Florin Coras [Thu, 8 Apr 2021 00:03:01 +0000 (17:03 -0700)]
vcl: use per worker mem bapi context

Type: fix

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

3 years agomisc: add build_static_vppctl.sh 96/31896/3
Damjan Marion [Fri, 2 Apr 2021 21:04:05 +0000 (23:04 +0200)]
misc: add build_static_vppctl.sh

Type: make
Change-Id: I47cf68ecd546cad05732a572579569594f96a1ff
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovcl: fix worker cleanup cb function 15/31915/2
Florin Coras [Wed, 7 Apr 2021 07:16:37 +0000 (00:16 -0700)]
vcl: fix worker cleanup cb function

Type: fix

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

3 years agosession: fix coverity warning 13/31913/2
Florin Coras [Tue, 6 Apr 2021 22:54:14 +0000 (15:54 -0700)]
session: fix coverity warning

Type: fix

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

3 years agocrypto: fix ops flags in crypto sw scheduler 50/31550/7
Benoît Ganne [Fri, 22 Jan 2021 17:11:37 +0000 (18:11 +0100)]
crypto: fix ops flags in crypto sw scheduler

The crypto op flags must be reset to frame flags minus invalid values
depending of the operation, instead of forcing them to specific values.

Type: fix

Change-Id: Ib02c2a738bbca6962394b3c03088d516d0da56a0
Signed-off-by: Benoît Ganne <bganne@cisco.com>
3 years agotests: remove wrappers 35/31835/6
Klement Sekera [Tue, 30 Mar 2021 18:29:05 +0000 (20:29 +0200)]
tests: remove wrappers

Improve the code by removing another kind of wrappers.

Type: improvement
Change-Id: I5292ef6c1761e3c6c2edd15f2aa625dac26c3732
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agosession: basic support for interrupt mode 85/31685/34
Florin Coras [Thu, 18 Mar 2021 22:04:34 +0000 (15:04 -0700)]
session: basic support for interrupt mode

Experimental support for session layer interrupt mode.  When enabled
(use-private-rx-mqs must be set) session queue node switches to
interrupt state when lightly loaded, i.e., no events and less than 1
vector/dispatch.

Because transport protocols require a periodic time update, when in
interrupt state the session queue node workers register a timerfd with
the unix-epoll-input node that when triggered signals, i.e., wakes up,
the queue node. Under light load, the timer is set to trigger every 1ms
whereas if no session is allocated, the worker moves to idle state and
the timeout is set to 100ms.

Type: feature

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

3 years agobuffers: performance improvement 62/31662/8
Radu Nicolau [Tue, 16 Mar 2021 12:45:01 +0000 (12:45 +0000)]
buffers: performance improvement

Initialize the local variables as to prevent first fall
through one by one processing; skip prefetching rather
than doing one by one when count below 12.

Type: improvement

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Change-Id: If02935da081e24f7cfe408811ccf6922cf982092

3 years agotcp: time infra improvements 98/31898/10
Florin Coras [Sat, 3 Apr 2021 01:32:00 +0000 (18:32 -0700)]
tcp: time infra improvements

Type: improvement

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

3 years agovhost: Crash upon disconnect 99/31899/2
Steven Luong [Sat, 3 Apr 2021 05:42:26 +0000 (22:42 -0700)]
vhost: Crash upon disconnect

Patch 24601 introduced description into template. In vhost_user_process,
template is reused inside the while loop to call clib_file_add. But
description is allocated outside of the loop only once. As a result, the
same storage for description is being referenced by all instances of call
to clib_file_add. As long as we don't call clib_file_del, we may be
good with multiple fds sharing the same storage for the description. When
one of the fds disconnects and frees the description, the other fds is
holding onto the free memory pointer. Bad news eventually happens when
another fd disconnects and frees the description that was already free
previously.

The fix is to move the allocation of description inside the loop to avoid
sharing.

Type: fix
Fixes: gerrit.fd.io/r/c/vpp/+/24601

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

3 years agoarping: coverity woe on COPY_PASTE_ERROR 73/31873/2
Steven Luong [Fri, 2 Apr 2021 15:51:17 +0000 (08:51 -0700)]
arping: coverity woe on COPY_PASTE_ERROR

coverity is trying to outsmart human by guessing on COPY_PASTE_ERROR.
Have it your way.

Type: fix

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

3 years agocnat: explicit BIHASH_USE_HEAP setting 00/31900/2
Dave Barach [Sat, 3 Apr 2021 12:52:02 +0000 (08:52 -0400)]
cnat: explicit BIHASH_USE_HEAP setting

The session db (bihash_40_56_t) was inheriting BIHASH_USE_HEAP=1 from
vppinfra/bihash_24_8.h through a convoluted set of #includes. Set
BIHASH_USE_HEAP in cnat_bihash.h, to avoid a surprise long after
anyone remembers the story.

Type: improvement

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

3 years agoip6-nd: Solicitation reply only if target is our link-local 70/31870/2
Neale Ranns [Fri, 2 Apr 2021 07:34:39 +0000 (07:34 +0000)]
ip6-nd: Solicitation reply only if target is our link-local

Type: fix

The fib source IP6_ND is used for all link-local entries, hence
solicitation responses were sent for a peer's address. Constrain the
source check to also in clude the LOCAL flag, which indicates that the
link-local address is ours.

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

3 years agosvm: lock-free fifo chunk list push and pop 57/31857/7
Florin Coras [Thu, 1 Apr 2021 02:36:49 +0000 (19:36 -0700)]
svm: lock-free fifo chunk list push and pop

This avoids chunk allocation/collection deadlocks if either of the sides
crashes.

Type: improvement

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

3 years agobuild: create _objs target for each library 72/31872/2
Damjan Marion [Fri, 2 Apr 2021 15:35:13 +0000 (17:35 +0200)]
build: create _objs target for each library

Type: improvement
Change-Id: I260580cf2d32ff949f44d80c764937ee6102486c
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoarping: add arping command 78/31278/16
Steven Luong [Sun, 14 Feb 2021 19:37:02 +0000 (11:37 -0800)]
arping: add arping command

Add linux similar arping command to VPP.
syntax: arping [gratuitous] <address> <interface> [repeat <count>] [interval <secs>]

Type: feature

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

3 years agoip-neighbor: suppress unsolicited clib_warning when sending garp 15/31715/2
Steven Luong [Tue, 23 Mar 2021 18:55:33 +0000 (11:55 -0700)]
ip-neighbor: suppress unsolicited clib_warning when sending garp

Replace clib_warning with vlog_log_debug when sending garp. There is nothing
to alert/warn the operator about sending garp. vlib_log is more appropriate.

Type: fix

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

3 years agomisc: update INFO.yaml 67/31867/1
Damjan Marion [Thu, 1 Apr 2021 15:41:27 +0000 (17:41 +0200)]
misc: update INFO.yaml

Type: make
Change-Id: I20e1509092e79a91cc015b932a06af4b466bfc84
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agotests: support injecting multiple worker pcaps on one PG 39/31839/3
Klement Sekera [Wed, 31 Mar 2021 11:36:38 +0000 (13:36 +0200)]
tests: support injecting multiple worker pcaps on one PG

This change allows one to inject multiple streams for different workers
on the same PG interface at the same time.

Type: improvement
Change-Id: I29d80369aabada261eda466e5a5d8d3518bb8bc8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agosession: always clean rx mqs on app detach 58/31858/3
Florin Coras [Thu, 1 Apr 2021 04:05:24 +0000 (21:05 -0700)]
session: always clean rx mqs on app detach

Type: fix

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

3 years agoavf: disable VLAN stripping on E810 using V2 VLAN APIs 30/31830/3
Damjan Marion [Tue, 30 Mar 2021 12:41:35 +0000 (14:41 +0200)]
avf: disable VLAN stripping on E810 using V2 VLAN APIs

Type: fix
Change-Id: I9bb19a5c9b5b48825f19a4ac124a3628ceaa081d
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agonat: fix ordering of feature nodes 60/31860/2
Klement Sekera [Thu, 1 Apr 2021 11:10:25 +0000 (13:10 +0200)]
nat: fix ordering of feature nodes

Fix ordering of feature nodes so that ACL runs after NAT in in2out
direction so it can properly track stuff like ports after NAT rewrite.

Type: fix
Change-Id: I2c689b64765628e9bc77108914f74c6c801d8ce2
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoperfmon: combined set and start command. 17/31617/5
Ray Kinsella [Wed, 10 Mar 2021 15:12:02 +0000 (15:12 +0000)]
perfmon: combined set and start command.

Original set, start, stop, reset, show etc interface was somewhat cumbersome, we
can improve slightly by combining set and start.

Type: improvement

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

3 years agoip: extend show cmd of ip reassembly configuration 20/31320/3
Anton Nikolaev [Wed, 17 Feb 2021 09:45:40 +0000 (14:45 +0500)]
ip: extend show cmd of ip reassembly configuration

Type: feature

Add output of field maximum reassembly length with others
ip reassembly configuration fields. This field can be configured
via vpp API, but there was no output of this field in vpp cli.

Output added for ipv4/ipv6 and full/shallow virtual nodes.

Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
Change-Id: Ibbd61aab26189d4a93d32e047d8f4e589fe9f8a5

3 years agolacp: correctly set is_mp_safe for VL_API_SW_INTERFACE_LACP_DUMP 85/31785/4
Steven Luong [Fri, 26 Mar 2021 17:08:28 +0000 (10:08 -0700)]
lacp: correctly set is_mp_safe for VL_API_SW_INTERFACE_LACP_DUMP

Need to add msg_id_base to the index

Type: fix

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

3 years agoperfmon: % power level per node 78/30878/9
Ray Kinsella [Thu, 21 Jan 2021 18:29:42 +0000 (18:29 +0000)]
perfmon: % power level per node

Show % time spent per graph node in power level 0, 1 and 2.

Type: improvement

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

3 years agodpdk: Update version to 21.02 44/31844/2
Kepka, Krzysztof [Wed, 31 Mar 2021 11:32:49 +0000 (13:32 +0200)]
dpdk: Update version to 21.02

Update of DPDK to latest stable release.
As this introduces new build dependency, it also adds install
of pyelftools to the build step. (note however that flush of pip downloads
cache dir is required)
https://doc.dpdk.org/guides-21.02/rel_notes/release_21_02.html

Type: improvement
Signed-off-by: Kepka, Krzysztof <krzysztof.kepka@intel.com>
Change-Id: I7ed2ca965f01c1062f5abc25ea428e8c1a016366

3 years agofib: Move the adjacency midchain nodes into a separate file 37/31837/3
Neale Ranns [Wed, 31 Mar 2021 07:36:33 +0000 (07:36 +0000)]
fib: Move the adjacency midchain nodes into a separate file

Type: refactor

It's only the nodes that require compiling for each arch,

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

3 years agonat: enable multiworker tests 53/31753/5
Klement Sekera [Wed, 10 Mar 2021 10:18:11 +0000 (11:18 +0100)]
nat: enable multiworker tests

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

3 years agodpdk: fix packet offset for GCM crypto ops 27/31827/2
Robert Shearman [Tue, 30 Mar 2021 10:14:41 +0000 (11:14 +0100)]
dpdk: fix packet offset for GCM crypto ops

The crypto op data offset passed into DPDK is relative to the mbuf
buffer address plus the mbuf data offset, therefore the mbuf data
offset needs to be set rather than left at whatever previous value it
was at, which is likely to be incorrect and result in the wrong
portion of the packet being encrypted/decrypted for GCM.

The fe->crypto_start_offset field is relative to the start of the vlib
buffer (as opposed to the current data pointer), so set the mbuf
data_off field to VLIB_BUFFER_PRE_DATA_SIZE when performing a GCM
crypto op enqueue to match the crypto_start_offset semantics. This
then matches the behaviour in the non-GCM case.

Type: fix
Change-Id: I0ac2a44139387158765a3e04cfcaa5ee6f11d395
Signed-off-by: Robert Shearman <robertshearman@gmail.com>
3 years agonat: fix test for multi-worker scenario 49/31749/10
Klement Sekera [Wed, 24 Mar 2021 16:25:14 +0000 (17:25 +0100)]
nat: fix test for multi-worker scenario

Type: fix
Change-Id: I170f9d8c685f59b7ccf6f9ee7fdc1dcdf2a54fe1
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agoavf: improve capabilities handling 95/31795/7
Damjan Marion [Mon, 29 Mar 2021 16:22:22 +0000 (18:22 +0200)]
avf: improve capabilities handling

Type: improvement
Change-Id: If35b40168414807e928cb3026633ae9d2fa703ed
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agoperfmon: add branch mispredictions 77/30877/9
Ray Kinsella [Thu, 21 Jan 2021 18:25:26 +0000 (18:25 +0000)]
perfmon: add branch mispredictions

Add branches, branches taken (a meteric for branchy code), and branch
misses.

Type: improvement

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

3 years agosrv6-ad-flow: SRv6 Per-Flow Dynamic Proxy 93/29593/12
Francois Clad [Fri, 3 Apr 2020 09:33:02 +0000 (11:33 +0200)]
srv6-ad-flow: SRv6 Per-Flow Dynamic Proxy

Type: feature
Change-Id: Ibfc412200ef5932fa40423075967df6d9156f3ed
Signed-off-by: Francois Clad <fclad@cisco.com>
3 years agonat: correct thread index usage 52/31752/5
Klement Sekera [Wed, 24 Mar 2021 16:29:23 +0000 (17:29 +0100)]
nat: correct thread index usage

Use actual thread index from hash table instead of doing calculation.
Calculated index might be different and could lead to crash.

Type: fix
Change-Id: Iede9a67fbe541cb44eccd0d6ddf4e2c51eb35423
Signed-off-by: Klement Sekera <ksekera@cisco.com>
3 years agonat: avoid creating negative zero checksum 73/31773/4
Klement Sekera [Thu, 25 Mar 2021 17:47:48 +0000 (18:47 +0100)]
nat: avoid creating negative zero checksum

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

3 years agonat: NAT44-ED unused value removal 09/31709/4
Filip Varga [Tue, 23 Mar 2021 11:10:55 +0000 (12:10 +0100)]
nat: NAT44-ED unused value removal

Type: fix

Coverity scan issue fix.

Change-Id: I9036fade15fd381da9c1e6b575f250fdcb21f876
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agonat: NAT66 plugin enable&disable calls update 44/31744/4
Filip Varga [Tue, 23 Mar 2021 11:57:58 +0000 (12:57 +0100)]
nat: NAT66 plugin enable&disable calls update

Type: improvement

Adding support for enable&disable calls
(dynamic plugin configuration).
API (nat66_plugin_enable_disable) and
CLI (nat66 plugin enable/nat66 plugin disable) with support for
outside_vrf id configuration.

Change-Id: I5637ff1621d6662adc3b7c6f7f8176d84a4b492b
Signed-off-by: Filip Varga <fivarga@cisco.com>
3 years agotests: call venv module directly 34/31834/3
Klement Sekera [Tue, 30 Mar 2021 17:46:06 +0000 (19:46 +0200)]
tests: call venv module directly

This avoids

ModuleNotFoundError: No module named 'virtualenv.seed.embed.via_app_data'

https://github.com/pypa/virtualenv/issues/1873

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

3 years agosession: interrupt mode for session node on main thread 75/31675/8
Florin Coras [Thu, 18 Mar 2021 04:52:49 +0000 (21:52 -0700)]
session: interrupt mode for session node on main thread

Signal, and implicitly run, main thread session queue node via
interrupts instead of the queue process node.

Process node still needed for timers.

Type: improvement

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

3 years agointerface: fix coverity 29/31829/2
Damjan Marion [Tue, 30 Mar 2021 12:34:44 +0000 (14:34 +0200)]
interface: fix coverity

Type: fix
Change-Id: Ia7652fe8e8c20f4f7a019ab7ca0649c2180c7e90
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agostats: python: handle when pattern is not list in ls 17/31817/3
Ole Troan [Mon, 29 Mar 2021 19:12:53 +0000 (21:12 +0200)]
stats: python: handle when pattern is not list in ls

The reimplementation of python stats module mishandled the case
where pattern to ls was not a list.

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I9ba189423a76f2fd4298c4c4b19a0875f705d719

3 years agosvm: cleanup mq private data on fifo segment cleanup 23/31823/3
Florin Coras [Tue, 30 Mar 2021 07:23:54 +0000 (00:23 -0700)]
svm: cleanup mq private data on fifo segment cleanup

Type: fix

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

3 years agomisc: vpptop makefile target 84/30384/19
Vladimir Lavor [Fri, 11 Dec 2020 09:28:49 +0000 (10:28 +0100)]
misc: vpptop makefile target

Type: feature

Added make target to install VPPTop - real-time
viewer of VPP metrics.

New targets in /extras/vpptop/Makefile:
* make start - starts the installed VPPTop binary
* make install - does the installation using the local VPP API
* make cleanup - removes the VPPTop local directory
* make help - prints the VPPTop help info

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

3 years agonat: fix HA multi-worker issues 46/31646/17
Klement Sekera [Mon, 15 Mar 2021 15:34:01 +0000 (16:34 +0100)]
nat: fix HA multi-worker issues

Use correct vlib_main() in various code parts. Fix tests.

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

3 years agoavf: fix coverity issues 92/31792/3
Chenmin Sun [Mon, 29 Mar 2021 19:50:02 +0000 (03:50 +0800)]
avf: fix coverity issues

CID #220403 ~ 220406

Type: fix

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

3 years agomap: tune dump/details test for socket transport 20/31820/2
Ole Troan [Mon, 29 Mar 2021 22:51:41 +0000 (00:51 +0200)]
map: tune dump/details test for socket transport

Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id3ad783a7b0321a8fa37b4e606c0c4551ca4edd4

3 years agosvm session vcl: per app rx message queues 64/30864/37
Florin Coras [Fri, 15 Jan 2021 21:49:33 +0000 (13:49 -0800)]
svm session vcl: per app rx message queues

Add option to use per app private segments for app to vpp message
queues, as opposed to exposing internal message queues segment.

When so configured, internal message queues are still polled by the
session queue node but external app message queues are handled by a new
input node (appsl-rx-mqs-input) that runs in interrupt state. Signaling
of the node, when mqs receive new messages, is done through eventfds
epolled by worker epoll input nodes.

Type: feature

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

3 years agotls: fix app_worker_connect_notify param error 87/31787/2
yedg [Sat, 27 Mar 2021 22:33:00 +0000 (06:33 +0800)]
tls: fix app_worker_connect_notify param error

Type: fix
Signed-off-by: yedongggang <yedg@wangsu.com>
Change-Id: I5ec690e71fa9119a7bf1cfcb6e36263aa732eff0

3 years agotests: move vxlan tests to src/vnet/vxlan/tests 47/30647/5
Dave Wallace [Wed, 6 Jan 2021 15:48:45 +0000 (10:48 -0500)]
tests: move vxlan tests to src/vnet/vxlan/tests

- 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: I66379dfe671628e39dfc9685c4fd70fa0e566f6f

3 years agovcl: fix only first epoll listen session be registered 79/31779/5
nandfan [Fri, 26 Mar 2021 08:46:58 +0000 (16:46 +0800)]
vcl: fix only first epoll listen session be registered

If configure listen port more than 1 with epoll in nginx, only first
listen port can be registered successed in nginx worker process.

Type: fix

Signed-off-by: nandfan <fanyufei521@outlook.com>
Change-Id: Iec2e058ee972a2cd5b2d1d7d20d373dc17084ce1

3 years agovlib: convert foreach_vlib_main macro to be more gdb and clang-format friendly 81/31781/6
Damjan Marion [Fri, 26 Mar 2021 10:38:01 +0000 (11:38 +0100)]
vlib: convert foreach_vlib_main macro to be more gdb and clang-format friendly

Type: improvement
Change-Id: I1152e58d7bfcb3c4347147f87a834d45ad51cdfe
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: split vlib_main_t into global and per-thread 23/31623/10
Damjan Marion [Sat, 6 Mar 2021 11:26:28 +0000 (12:26 +0100)]
vlib: split vlib_main_t into global and per-thread

Type: refactor
Change-Id: I8b273bc3bf16aa360f031f1b2692f766e5fc4613
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 years agovlib: introduce vlib_get_elog_main() 83/31783/4
Damjan Marion [Fri, 26 Mar 2021 12:45:37 +0000 (13:45 +0100)]
vlib: introduce vlib_get_elog_main()

Type: improvement
Change-Id: I73383eb15186021cd6527d112da8443a0082f129
Signed-off-by: Damjan Marion <damarion@cisco.com>