vpp.git
2 years agodocs: consume fd.io version list 86/34286/3
Nathan Skrzypczak [Fri, 29 Oct 2021 10:05:29 +0000 (12:05 +0200)]
docs: consume fd.io version list

Type: feature

This adds a version snippet in the
vpp docs, based on a json description
fetched from fd.io/vpp_versions.json

This relies on https://github.com/FDio/site/pull/108
being merged

Change-Id: I6dd22f09927841aef96011ed57af2cbdc5d409f5
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agoperfmon: fix coverity warning 28/34528/2
Klement Sekera [Tue, 16 Nov 2021 11:32:59 +0000 (12:32 +0100)]
perfmon: fix coverity warning

Check for possible hash lookup failure to avoid NULL dereference.

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

2 years agobuild: Remove ubuntu-18.04 install dependencies 86/34486/3
Dave Wallace [Fri, 12 Nov 2021 20:55:44 +0000 (15:55 -0500)]
build: Remove ubuntu-18.04 install dependencies

- Per agreement at VPP community meeting, end support for
  ubuntu-18.04

Type: make

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

2 years agosession: add per worker ct context 22/34522/4
Florin Coras [Mon, 15 Nov 2021 22:01:02 +0000 (14:01 -0800)]
session: add per worker ct context

Type: improvement

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

2 years agovapi: verify message size when received 19/34519/2
Klement Sekera [Mon, 15 Nov 2021 14:52:37 +0000 (15:52 +0100)]
vapi: verify message size when received

Verifying message size including VLA size allows to dismiss some
coverity warnings in generated code.

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

2 years agodocs: add jira link 35/34335/2
Nathan Skrzypczak [Thu, 4 Nov 2021 09:06:51 +0000 (10:06 +0100)]
docs: add jira link

Type: improvement

Change-Id: I9c53ff39e6d064437b5a2fdc29ecc2301b5cbd16
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2 years agosession: postpone ct segment delete 89/34489/6
Florin Coras [Sun, 14 Nov 2021 23:33:59 +0000 (15:33 -0800)]
session: postpone ct segment delete

Only delete segments only after both server and client detach.

Type: improvement

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

2 years agovcl: add DSCP support in VCL 95/34495/3
Filip Tehlar [Mon, 15 Nov 2021 10:26:56 +0000 (10:26 +0000)]
vcl: add DSCP support in VCL

Type: feature

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

2 years agomisc: vppctl - remove the dependency on vppinfra 90/34490/4
Andrew Yourtchenko [Sun, 14 Nov 2021 23:40:18 +0000 (00:40 +0100)]
misc: vppctl - remove the dependency on vppinfra

56f54af21d18f9fdd471b81db77a3942b0aa4d9c introduced the new memcpy.
It also made a vector support mandatory in order to compile anything
that depends on vppinfra.

This broke extras/scripts/build_static_vppctl.sh

Since the vppctl is just a two-pronged epoll+basic telnet client handler,
remove dependencies on the vpp infra libs, and trim the build script accordingly.

Change-Id: I394bc65c485cbf8e7143a818ca0c86367bb15d90
Type: improvement
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2 years agovppinfra: fix masks in AVX512 clib_count_equal_* 88/34488/2
Dmitry Valter [Sun, 14 Nov 2021 17:05:44 +0000 (17:05 +0000)]
vppinfra: fix masks in AVX512 clib_count_equal_*

Mask result of uAxB_is_equal_mask when buffer is masked. Otherwise it
return vector length B as a result for zeroed words.
This bug caused crashes in error_drop in tests on Ice Lake.

Type: fix
Fixes: 7459be1b3626b608e60df574343a1432a068ebce
Change-Id: I56183e77f8a8ab6c530e79b465067958de84dceb
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
2 years agomemif: fix the coverity warning 16/34516/2
Mohsin Kazmi [Mon, 15 Nov 2021 11:12:51 +0000 (11:12 +0000)]
memif: fix the coverity warning

Type: fix

Fixes: 2bae16b238bd ("memif: fix the default txq placement")

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

2 years agoperfmon: rename bundle to memory stalls 94/34494/2
Ray Kinsella [Mon, 15 Nov 2021 06:48:50 +0000 (06:48 +0000)]
perfmon: rename bundle to memory stalls

Rename the memory bandwidth bundle to memory stalls, to differentiate it
from the bundle that measures memory controller bandwidth boundedness.

Type: refactor

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

2 years agofib: re-evaluate the import/export state of a prefix. 00/34000/6
Neale Ranns [Fri, 8 Oct 2021 07:16:12 +0000 (07:16 +0000)]
fib: re-evaluate the import/export state of a prefix.

Type: fix

re-evaluate the import/export state of a prefix when the interface it is attached to rebinds to a different table.
Only attached routes have import/export requirements, so we can back walk from the glean adjacency when the interface rebinds tables.
There are two cases to consider.
 1. the rebind may change the prefix from/to import
 2. the import VRF may change

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

2 years agoflowprobe: right values in records from subinterfaces 59/34459/4
Daniel Béreš [Thu, 11 Nov 2021 09:16:44 +0000 (09:16 +0000)]
flowprobe: right values in records from subinterfaces

Skip 802.1q headers due to correct EtherType, ip addresses, ports.

Ticket: VPP-1997
Type: fix
Change-Id: I1a552fa6abe5b1459dd7d2c5ac6ad0f62c51417c
Signed-off-by: Daniel Béreš <daniel.beres@pantheon.tech>
2 years agosession: add support for DSCP 77/34477/3
Filip Tehlar [Thu, 21 Oct 2021 14:07:31 +0000 (14:07 +0000)]
session: add support for DSCP

Type: feature

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

2 years agohash: refactor crc32_5tuple 82/34482/2
Damjan Marion [Fri, 12 Nov 2021 15:00:24 +0000 (16:00 +0100)]
hash: refactor crc32_5tuple

Type: improvement
Change-Id: I31cae2367e2ec7fc89991ca0df994a73da93aaed
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agosrtp: fix uninitialized value 76/34476/3
Damjan Marion [Fri, 12 Nov 2021 11:32:47 +0000 (12:32 +0100)]
srtp: fix uninitialized value

Type: fix
Fixes: 6621abf
Change-Id: I7cd4d6344613c950cc0018bed7306b8840292221
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agobuild: remove unnecesary link deps 68/34468/3
Damjan Marion [Thu, 11 Nov 2021 18:46:08 +0000 (19:46 +0100)]
build: remove unnecesary link deps

Change-Id: I560c505ff754bf6856094c16494530a855fe287b
Type: make
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agosession: fix ct tracking of actual transport proto 63/34463/3
Florin Coras [Thu, 11 Nov 2021 17:24:34 +0000 (09:24 -0800)]
session: fix ct tracking of actual transport proto

Type: fix

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

2 years agovirtio: improve the inline of clib_memcpy_fast 65/34465/2
Mohsin Kazmi [Thu, 11 Nov 2021 18:17:27 +0000 (19:17 +0100)]
virtio: improve the inline of clib_memcpy_fast

Type: refactor

Change-Id: Ia13a9cf6480aac280f3d287c59908e84c29c3443
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 years agomemif: fix the default txq placement 62/34462/3
Mohsin Kazmi [Thu, 11 Nov 2021 15:40:10 +0000 (15:40 +0000)]
memif: fix the default txq placement

Type: fix

Fixes: 3effb4e63068 ("memif: integrate with new tx infra")

"memif: integrate with new tx infra" patch integrated memif
with new tx infra. There might be scenarios when txqs were
less than vpp threads, in which case, txqs should be shared
among threads. This patch fixes it.

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

2 years agotests: make code coverage for unit tests optional 66/34466/2
Ole Troan [Thu, 11 Nov 2021 18:22:12 +0000 (19:22 +0100)]
tests: make code coverage for unit tests optional

Add a new cmake option VPP_BUILD_TESTS_WITH_COVERAGE to enable
building unittests with clang code coverage.

Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I9cbe9e3031afdcd03bc8f9203d662b91677724ab
Signed-off-by: Ole Troan <ot@cisco.com>
2 years agovcl: notify vpp if connected inexistent session 55/34455/4
Florin Coras [Thu, 11 Nov 2021 06:44:52 +0000 (22:44 -0800)]
vcl: notify vpp if connected inexistent session

Type: improvement

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

2 years agonat: nat44-ei/ed nat objects cleanup improvements 98/34198/12
Filip Varga [Thu, 21 Oct 2021 12:27:43 +0000 (14:27 +0200)]
nat: nat44-ei/ed nat objects cleanup improvements

Improvements:
* Changed plugin disable call behavior from freeing data types
to calling appropriate nat plugin object delete calls for
pool addresses, mappings and interfaces.
* Added wrapper nat44_ei/ed_add_del_static_mapping function to
handle switch bound static mappings. This would also fix ip assignment
callback add/del bound static mapping issue preventing creation of the
mapping.

Fixes:
 * Fixed lingering object issue: some nat intertwined objects would
not free each other if not correctly deleted in proper order.
 * Fixed incorect order of FIB unlocks for pool addresses causing
syslog messages to use deleted FIBs in multiple VRF configuration.
 * Fixed incorrect value testing of flags instead of vrf_id for
multiple vrf configuration static mapping.

Type: improvement

Change-Id: I2743f7b1104b627bcc5ef937e3a50655313a26ea
Signed-off-by: Filip Varga <fivarga@cisco.com>
2 years agovppinfra: new vectorized ip checksum functions incl. csum_and_copy 90/33990/15
Damjan Marion [Mon, 8 Nov 2021 11:18:30 +0000 (11:18 +0000)]
vppinfra: new vectorized ip checksum functions incl. csum_and_copy

Type: improvement
Change-Id: Id5810b7f4a6d6e4ce16b73c235b50db5d475ebf7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: deprecate test_mheap.c 53/34453/1
Dave Barach [Wed, 10 Nov 2021 21:40:46 +0000 (16:40 -0500)]
vppinfra: deprecate test_mheap.c

The original mheap allocator found the exit a long time ago,
move test_mheap.c to .../extras/deprecated/vppinfra

Type: test

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

2 years agoip: crash in ip_csum_fold due to illegal instruction shrx 52/34452/1
Steven Luong [Wed, 10 Nov 2021 16:54:38 +0000 (08:54 -0800)]
ip: crash in ip_csum_fold due to illegal instruction shrx

Encounter a crash for the line
shrx   edi,eax,edi
in ip_csum_fold. The target cpu is ivy bridge which does not support
shrx instruction.

Type: fix
Fixes: e6709ff37dc0f3a58ed5ad98aace73fe801f1e9d

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

2 years agovppinfra: new memcpy for x86_64 38/34438/8
Damjan Marion [Tue, 12 Oct 2021 18:30:02 +0000 (20:30 +0200)]
vppinfra: new memcpy for x86_64

Change-Id: I5a5055580479960ac53e3f989aa188faf57fb05d
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoip: always set ip rx_sw_if_index 48/34448/3
Florin Coras [Wed, 10 Nov 2021 15:39:51 +0000 (07:39 -0800)]
ip: always set ip rx_sw_if_index

Type: improvement

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

2 years agonat: api autoendian fix 75/34175/3
Filip Varga [Thu, 21 Oct 2021 11:00:27 +0000 (13:00 +0200)]
nat: api autoendian fix

Fixed bad use of macros for autoendian API calls
and updated tests for the new API. Removed sw_if_index
check macro because of ntol conversion. Changed
REPLY_MACRO to REPLY_MACRO_END to fix ntohl conversions.

Type: fix

Change-Id: I878a07b3f80fe03179feab60f0abc662f408a2c8
Signed-off-by: Filip Varga <fivarga@cisco.com>
2 years agoaf_xdp: fix thread 0 and 1 using one txq slot 03/34403/3
arikachen [Tue, 9 Nov 2021 05:49:04 +0000 (13:49 +0800)]
af_xdp: fix thread 0 and 1 using one txq slot

Type: fix

Signed-off-by: arikachen <eaglesora@gmail.com>
Change-Id: Id0e98e0a1b04f2c1aba2c261b4e51fd53a4ee824

2 years agomisc: update extras/scripts/lsnet 40/34440/1
Damjan Marion [Tue, 9 Nov 2021 23:44:17 +0000 (00:44 +0100)]
misc: update extras/scripts/lsnet

Type: improvement
Change-Id: Iea45fa535ca562a1d424fd3d46b557a7d4775505
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agobuild: install clang-format-11 37/34437/2
Dave Wallace [Tue, 9 Nov 2021 18:58:12 +0000 (13:58 -0500)]
build: install clang-format-11

- Don't make it the default yet

Type: make

Change-Id: I3aabfd32f7ffd99e10db372747a0ba65fdc76db2
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 years agosession: reset if ct close with data 14/34414/3
Florin Coras [Tue, 9 Nov 2021 18:42:43 +0000 (10:42 -0800)]
session: reset if ct close with data

Type: improvement

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

2 years agosession: postpone ct cleanups 11/34411/4
Florin Coras [Tue, 9 Nov 2021 16:38:24 +0000 (08:38 -0800)]
session: postpone ct cleanups

Add infra to postpone cleanups while tx events are not delivered.

Type: improvement

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

2 years agotests: Remove the error output from the linux-cp tests 09/34409/2
Neale Ranns [Tue, 9 Nov 2021 16:15:48 +0000 (16:15 +0000)]
tests: Remove the error output from the linux-cp tests

Type: test

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

2 years agobuild: missing clang in deps for ubuntu 20.04 08/34408/1
Damjan Marion [Tue, 9 Nov 2021 15:16:35 +0000 (16:16 +0100)]
build: missing clang in deps for ubuntu 20.04

Type: make
Change-Id: Ica706f0284873f6bd8b8d868c965812a139748cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agotests: fix missing dataclasses module in python 3.6 96/34396/2
Dave Wallace [Mon, 8 Nov 2021 17:23:01 +0000 (12:23 -0500)]
tests: fix missing dataclasses module in python 3.6

Type: fix
Fixes: b8165b96f

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

2 years agomemif: memif linkstate can't become up 20/34320/7
Daniel Béreš [Wed, 3 Nov 2021 08:55:04 +0000 (08:55 +0000)]
memif: memif linkstate can't become up

Admin down implies Link down but nothing came with admin up.

Ticket: VPP-1959
Type: fix
Change-Id: I43725329ae7918659c73d703280c25de5f0b1d14
Signed-off-by: Daniel Béreš <daniel.beres@pantheon.tech>
2 years agotcp: refactor reset node 00/34400/3
Florin Coras [Mon, 8 Nov 2021 21:35:28 +0000 (13:35 -0800)]
tcp: refactor reset node

Use vectorized buffer translate function and refactor tracing.

Type: refactor

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

2 years agovppinfra: vectorized index to pointer function 85/34285/13
Damjan Marion [Thu, 28 Oct 2021 21:03:04 +0000 (23:03 +0200)]
vppinfra: vectorized index to pointer function

Type: improvement
Change-Id: I05e1a8fa31761b113355123429d72da18881d4b0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: clib_count_equal_* tests 80/34380/5
Damjan Marion [Sat, 6 Nov 2021 12:26:58 +0000 (13:26 +0100)]
vppinfra: clib_count_equal_* tests

Type: improvement
Change-Id: I8f75cd9ce78ce686985e65c75dcddf498cef7621
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: AVX512 in clib_count_equal_* 74/34374/12
Damjan Marion [Fri, 5 Nov 2021 19:44:09 +0000 (20:44 +0100)]
vppinfra: AVX512 in clib_count_equal_*

Type: improvement
Change-Id: I8105d396cfc984e00cf5137bc57122510f5e6437
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agobuild: -Wno-stringop-overflow during LTO phase 86/34386/3
Damjan Marion [Sat, 6 Nov 2021 16:09:37 +0000 (17:09 +0100)]
build: -Wno-stringop-overflow during LTO phase

Type: make
Change-Id: I735fa411366c41981e255921eceb18ebbb4b5fe1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoperfmon: fix iio-bw coverity issues 92/34392/1
Ray Kinsella [Mon, 8 Nov 2021 07:22:49 +0000 (07:22 +0000)]
perfmon: fix iio-bw coverity issues

Fixes an number of coverity issues associated with the iio-bw feature.

Type: fix
Fixes: e15c999c3

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

2 years agol2: fix array-bounds error for prefetch on Arm 07/33307/2
Tianyu Li [Thu, 29 Jul 2021 05:39:24 +0000 (13:39 +0800)]
l2: fix array-bounds error for prefetch on Arm

make build-release CC=gcc-10

vpp/src/vppinfra/cache.h:73:31: error: array subscript 80 is outside
array bounds of ‘l2_in_out_feat_arc_main_t[1]’ [-Werror=array-bounds]
__builtin_prefetch (_addr + (n) *CLIB_CACHE_PREFETCH_BYTES,
_CLIB_PREFETCH (3, size, type);
vpp/src/vnet/l2/l2_in_out_feat_arc.c:260:3:
note: in expansion of macro ‘CLIB_PREFETCH’
CLIB_PREFETCH (next_node_indices, 2 * CLIB_CACHE_LINE_BYTES, LOAD);

2 * CLIB_CACHE_LINE_BYTES is 256 bytes on Arm, the offset is out of range of
fam->feat_next_node_index[1], which is 128 bytes, use sizeof array instead.

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

2 years agocrypto-native: fix uninitialized variable 89/33789/4
Gabriel Oginski [Wed, 22 Sep 2021 10:32:46 +0000 (11:32 +0100)]
crypto-native: fix uninitialized variable

Type: fix

Fixed coverity-issue CID 208547.
Originally using uninitialized value when calling one function.
This patch fixes the problem by initializing value for one variable.

Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iccfae1e825b4ca4d95a6f724d9b5c51c5addd1b2

2 years agoperfmon: numa node list probing should use '/online' instead of '/has_cpu' 29/34029/3
Xiaoming Jiang [Sat, 9 Oct 2021 03:10:34 +0000 (03:10 +0000)]
perfmon: numa node list probing should use '/online' instead of '/has_cpu'

Type: fix
Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com>
Change-Id: I85e41d58884af71afba960d20604bb1b01876d26

2 years agotcp: fix reset with packet ack number 84/34384/3
Florin Coras [Sat, 6 Nov 2021 16:55:17 +0000 (09:55 -0700)]
tcp: fix reset with packet ack number

Type: fix

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

2 years agotests docs: fix jsonschema dependency 81/34381/3
Dave Wallace [Sat, 6 Nov 2021 14:59:22 +0000 (10:59 -0400)]
tests docs: fix jsonschema dependency

- docs requires jsonschema which is only supported
  on python 3.7 or newer.  This causes 'make test'
  to fail on Ubuntu 18.04

Type: fix
Fixes: 9ad39c026

Change-Id: I0935c569ac102ea1dba6112f458e6ee10330e474
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 years agovppinfra: move clib_count_equal_* code 79/34379/2
Damjan Marion [Sat, 6 Nov 2021 12:17:31 +0000 (13:17 +0100)]
vppinfra: move clib_count_equal_* code

Type: refactor
Change-Id: Ib9e8abdbf745ad6563fc79c9ebb6b2ea65917d08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agounittest: remove clib_count_equal_* tests 78/34378/2
Damjan Marion [Sat, 6 Nov 2021 12:11:37 +0000 (13:11 +0100)]
unittest: remove clib_count_equal_* tests

Due to multiarch nature of that code, those tests doesn't bring much
value. New tests will be addes as part of refactor.

Type: refactor
Change-Id: I41056dc99d08cd6ca38f9e00e8cf6a465c90edb7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agotcp: in place tcp header for buffer resets 76/34376/2
Florin Coras [Sat, 6 Nov 2021 03:21:42 +0000 (20:21 -0700)]
tcp: in place tcp header for buffer resets

Type: improvement

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

2 years agobuild: print compiler and library dir 73/34373/2
Damjan Marion [Fri, 5 Nov 2021 19:08:05 +0000 (20:08 +0100)]
build: print compiler and library dir

Type: improvement
Change-Id: I9488c62f0d293a1ba9121c2994a788a82ba9f6a1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodpdk: remove dead code 72/34372/2
Damjan Marion [Fri, 5 Nov 2021 19:01:38 +0000 (20:01 +0100)]
dpdk: remove dead code

Type: refactor
Change-Id: I76ccf8970ebb3f180ce745d8b515c5e0724784d6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agopci: remove dead code 68/34368/2
Damjan Marion [Fri, 5 Nov 2021 18:51:28 +0000 (19:51 +0100)]
pci: remove dead code

Type: refactor
Change-Id: Ic79e38aa6cf4ffe1eb677e7cef34351e7917d97b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovlib: remove dead code 70/34370/2
Damjan Marion [Fri, 5 Nov 2021 18:55:50 +0000 (19:55 +0100)]
vlib: remove dead code

Type: refactor
Change-Id: I818bacdb068e825b38acdceb2566972819c64e82
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agodevices: remove dead code in pipe 71/34371/2
Damjan Marion [Fri, 5 Nov 2021 18:59:09 +0000 (19:59 +0100)]
devices: remove dead code in pipe

Type: refactor
Change-Id: If4a0484afebe53d53d79ab5cb72299e6298cfee7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: remove dead code in elf.c 66/34366/2
Damjan Marion [Fri, 5 Nov 2021 18:44:17 +0000 (19:44 +0100)]
vppinfra: remove dead code in elf.c

Type: refactor
Change-Id: Ia47644ca5fb7c848c0de7e7c3ed2c69e8d5cb80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoip: remove dead code 69/34369/2
Damjan Marion [Fri, 5 Nov 2021 18:53:19 +0000 (19:53 +0100)]
ip: remove dead code

Type: refactor
Change-Id: Ia8e8834b635025d07e1028b1d5779b21c4e05e58
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agosnort: default logging level should not be debug 67/34367/2
Damjan Marion [Fri, 5 Nov 2021 18:44:07 +0000 (19:44 +0100)]
snort: default logging level should not be debug

Type: fix
Fixes: 839b147
Change-Id: I6315c866237ddc65a8d67e412c6eb70396c8172f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agosnort: fix unused result warning for gcc-10 06/33306/4
Tianyu Li [Thu, 29 Jul 2021 05:22:04 +0000 (13:22 +0800)]
snort: fix unused result warning for gcc-10

make build-release CC=gcc-10

src/plugins/snort/daq_vpp.c:606:14: error:
ignoring return value of ‘read’ declared with
attribute ‘warn_unused_result’ [-Werror=unused-result]
  606 |       (void) read (qp->enq_fd, &ctr, sizeof (ctr));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc void cast cannot suppress __attribute((warn_unused_result)),
use __attribute__((unused)) instead.

Type: fix
Fixes: 839b1473e968 ("snort: snort3 plugin and DAQ")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I7c7c8c2dbdc47c200b091c23ec2d992266596992

2 years agounittest: gcc-11 errors for clib_strcpy, clib_strstr, clib_strcat, and clib_strncat 30/34330/5
Steven Luong [Wed, 3 Nov 2021 22:33:21 +0000 (15:33 -0700)]
unittest: gcc-11 errors for clib_strcpy, clib_strstr, clib_strcat, and clib_strncat

There are 3 versions of the string functions. For example, for strcpy,
they are
1. strcpy(dst, src) -- the legacy unsafe version
2. strcpy_s(dst, dmax, src) -- C11 safeC version which has an addition argument
named dmax.
3. clib_strcpy(dst,src) -- clib version to enable legacy code that uses strcpy
to make use of strcpy_s without adding the additional argument, dmax, which is
required by the C11 safeC version.

The implementation for the clib version is to artificially provide dmax to
strcpy_s. In this case, it uses 4096 which assumes that if the legacy code
works without blowing up, it is likely to work with the clib version without
problem.

gcc-11 is getting smarter by checking if dmax is within the object's boundary.
When the object is declared as static array, it will flag a warning/error
if dmax is out of bound for the object since the real size of dst can be
determined at compile time.

There is no way to find the real size of dst if the object is dynamically
allocated at compile time. For this reason, we simply can't provide support
for the clib version of the function anymore. If any code is using the clib
version, the choice is to migrate to the safeC version.

Type: fix
Fixes: b0598497afde60146fe8480331c9f96e7a79475a

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

2 years agovirtio: fix the initialization 64/34364/1
Mohsin Kazmi [Fri, 5 Nov 2021 16:13:57 +0000 (16:13 +0000)]
virtio: fix the initialization

Type: fix

Fixes: d96b28ac0917 ("virtio: improve input node performance")

vlib_buffer_t is defined on stack to be used for input feature arc
lookup once per frame call for performance reasons. The definition
is missing the initialization to avoid the assignment of garbage value.

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

2 years agoip: speed up reassembly code compilation 27/34327/2
Klement Sekera [Tue, 2 Nov 2021 14:33:55 +0000 (15:33 +0100)]
ip: speed up reassembly code compilation

Refactor code so that code is inlined in one place instead of in
multiple to speed up compilation.

Type: refactor
Change-Id: I41357b89715b66ebdc8c0d5ccd69347a254fc266
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2 years agoip: reassembly: avoid reading truncated L4 headers 28/34328/2
Klement Sekera [Wed, 3 Nov 2021 16:57:28 +0000 (17:57 +0100)]
ip: reassembly: avoid reading truncated L4 headers

Check if L4 headers are truncated and if so, set a flag for (future)
consumers instead of reading/writing garbage data.

Type: fix
Fixes: de34c35fc73226943538149fae9dbc5cfbdc6e75
Change-Id: I0b656ec103a11c356b98a6f36cad98536a78d1dc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2 years agovppinfra: strstr_s_inline checks string unterminated wrong 31/34331/1
Steven Luong [Wed, 3 Nov 2021 23:49:04 +0000 (16:49 -0700)]
vppinfra: strstr_s_inline checks string unterminated wrong

When checking whether s2 is unterminated, it uses s1max. It should
use s2max.

Type: fix
Fixes: b0598497afde60146fe8480331c9f96e7a79475a

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

2 years agopci: allocate and set length pci product name 21/34321/3
Ray Kinsella [Wed, 3 Nov 2021 09:13:41 +0000 (09:13 +0000)]
pci: allocate and set length pci product name

Original fix for this issue, allocated sufficent memory but didn't set the
vector length correctly.

Type: fix
Fixes: 7d0ca6af0

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

2 years agowireguard: reduce memcopy and prefetch header 01/34001/3
Gabriel Oginski [Fri, 8 Oct 2021 08:09:45 +0000 (09:09 +0100)]
wireguard: reduce memcopy and prefetch header

Originally wireguard implementation does memory copy of the whole
packet in encryption and decryption.

This patch removes unnecessary packet copy in wireguard. In addition,
it contains some performance improvement such as prefetching header
and deleting unnecessary lock and unlock for decryption.

Type: improvement

Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I1fe8e54d749e6922465341083b448c842e2b670f

2 years agotcp: make buffer reset function public 17/34317/3
Florin Coras [Wed, 3 Nov 2021 00:13:15 +0000 (17:13 -0700)]
tcp: make buffer reset function public

Also does a bit of code cleanup.

Type: refactor

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

2 years agovcl: fix event triggered after closing connections. 00/34300/4
liuyacan [Mon, 1 Nov 2021 02:22:09 +0000 (10:22 +0800)]
vcl: fix event triggered after closing connections.

Improve the accuracy of epoll event(EPOLLRDHUP).

Type: fix

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

2 years agolinux-cp: Cleanup any existing pairs when an interface is deleted 48/33948/2
Neale Ranns [Mon, 4 Oct 2021 15:28:47 +0000 (15:28 +0000)]
linux-cp: Cleanup any existing pairs when an interface is deleted

Type: fix

This only happens when the user deletes the physical before they delete the pair, that's not supoosed to be the case, but don't crash if it is.

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

2 years agoipsec: Support the single IPSec interface dump 08/34208/2
Neale Ranns [Fri, 22 Oct 2021 14:10:06 +0000 (14:10 +0000)]
ipsec: Support the single IPSec interface dump

Type: fix

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

2 years agotests: Apply the 'return self' pattern for the L2 objects 14/34214/2
Neale Ranns [Mon, 25 Oct 2021 09:13:00 +0000 (09:13 +0000)]
tests: Apply the 'return self' pattern for the L2 objects

Type: test

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

2 years agoip: fix coverity warning 39/34239/3
Klement Sekera [Mon, 25 Oct 2021 11:39:13 +0000 (13:39 +0200)]
ip: fix coverity warning

Remove unnecessary NULL check of t0, which causes coverity to scream. t0
is always initilised to *something* by doing pool_elt_at_index().

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

2 years agofib: allow vnet rewrite max size to be smaller the pre_data 74/34274/2
Benoît Ganne [Thu, 28 Oct 2021 08:50:47 +0000 (10:50 +0200)]
fib: allow vnet rewrite max size to be smaller the pre_data

There is no reason to enforce vnet rewrite size to be equal to pre_data.
Moreover, since vnet rewrite size is now saved as u8, this limits
pre_data to 192 bytes.

Type: fix
Fixes: 7dbf9a1a4fff5c3b20ad972289e49e3f88e82f2d

Change-Id: I3f848aa905ea4a794f3b4aa62c929a481261a3f1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 years agotests: update python packages 88/34288/2
Dave Wallace [Sat, 30 Oct 2021 19:30:38 +0000 (15:30 -0400)]
tests: update python packages

- Also fix docs requirements and venv cleanup
  required for docker executor building

Type: test

Change-Id: I839423224d95c45af42f459217887f4201cbb11a
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 years agosnort: fix inconsistent snort input mode 03/34303/2
Sivaprasad Tummala [Tue, 2 Nov 2021 05:34:10 +0000 (11:04 +0530)]
snort: fix inconsistent snort input mode

Type: fix

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: If42bb9924fa8298b5fac679bc1f2dc1f5b1ad58c

2 years agotests: change code to avoid gcc-11 warning 15/34315/3
Klement Sekera [Tue, 2 Nov 2021 17:42:17 +0000 (18:42 +0100)]
tests: change code to avoid gcc-11 warning

For some reason gcc-11 doesn't like memcpy in a particular location,
change memcpy to assignment.

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

2 years agobuild: remove unnecessary executable bits 13/34313/2
Ray Kinsella [Fri, 15 Oct 2021 16:53:24 +0000 (17:53 +0100)]
build: remove unnecessary executable bits

Run 'find src -executable -type f', remove unnecessary executable bits from the
source tree.

Type: refactor

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

2 years agoperfmon: added bundle to measure pci bandwidth 12/34312/2
Ray Kinsella [Tue, 2 Nov 2021 13:44:13 +0000 (13:44 +0000)]
perfmon: added bundle to measure pci bandwidth

Added an Intel Ice Lake specific bundles to measure pci bandwidth through the
Intel IO PMU. The "PCI" bundle measures read/writes from pci devices. The "CPU"
bundle measure read/writes from cpus to pci devices.

Type: improvement

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

2 years agoperfmon: added intel internal io pmu support 11/34311/2
Ray Kinsella [Tue, 2 Nov 2021 13:41:06 +0000 (13:41 +0000)]
perfmon: added intel internal io pmu support

Added support for the Intel Internal IO Uncore PMU, along with the ability to
format PMU Unit specific names.

Type: improvement

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

2 years agovlib: retrieve the root bus of a given pci device 10/34310/2
Ray Kinsella [Tue, 2 Nov 2021 13:33:44 +0000 (13:33 +0000)]
vlib: retrieve the root bus of a given pci device

Added a function to parse sysfs, determine the root bus & domain of a given pci
device.

Type: improvement

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

2 years agovlib: add format pci link port 09/34309/2
Ray Kinsella [Tue, 2 Nov 2021 13:26:49 +0000 (13:26 +0000)]
vlib: add format pci link port

Added a function to nicely format pci link ports. Similar to the existing
link_speed etc format functions.

Type: improvement

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

2 years agovlib: allocate pci product_name with vec_alloc 08/34308/2
Ray Kinsella [Tue, 2 Nov 2021 13:18:49 +0000 (13:18 +0000)]
vlib: allocate pci product_name with vec_alloc

The pci device product_name array was being allocated with vec_validate, not
vec_alloc. This was allocating an additional byte at the end of the array, which
was causing a spurious '\0' to be returned in the middle of format strings.

Type: fix
Fixes: cef87f1a5e

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

2 years agovppinfra: initial RISC-V support 98/34298/3
Damjan Marion [Sun, 31 Oct 2021 18:04:33 +0000 (19:04 +0100)]
vppinfra: initial RISC-V support

Type: feature
Change-Id: I1314d60fc420366526efaddd1ed215cf5f8b75dd
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agointerface: avoid dependency on crc32 for eth handoff 14/34314/3
Florin Coras [Tue, 2 Nov 2021 17:32:19 +0000 (10:32 -0700)]
interface: avoid dependency on crc32 for eth handoff

Make sure the infra works on platforms without crc32, like risc-v

Type: fix

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

2 years agoip: fix build without vector unit 96/34296/3
Damjan Marion [Sun, 31 Oct 2021 18:56:44 +0000 (19:56 +0100)]
ip: fix build without vector unit

Change-Id: I102f84d6d72a7f17e62fb8c16a1d4a3234753476
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoclassify: fix build on systems without crc32f and vector unit 95/34295/2
Damjan Marion [Sun, 31 Oct 2021 18:53:27 +0000 (19:53 +0100)]
classify: fix build on systems without crc32f and vector unit

Change-Id: I4229239ed6b81c10362faa1aa9f658c3fccfd31b
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoflowprobe: missing header 94/34294/2
Damjan Marion [Sun, 31 Oct 2021 18:48:43 +0000 (19:48 +0100)]
flowprobe: missing header

Change-Id: I7a6df4317beed78e394dc4ba8edd350ca5b2bc80
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agobuild: clang-13 support 87/34287/3
Damjan Marion [Fri, 29 Oct 2021 20:08:39 +0000 (22:08 +0200)]
build: clang-13 support

Type: make
Change-Id: I20770650d7e0475ee7791da4d5df941792bf7741
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agol2: fix outside array bounds errors 92/34292/2
Damjan Marion [Sun, 31 Oct 2021 18:21:31 +0000 (19:21 +0100)]
l2: fix outside array bounds errors

Reported by gcc-11...

Type: fix
Change-Id: Ia00001a6334722a6ae9cc771e6861c1f709df286
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agolisp: fix outside array bounds 93/34293/2
Damjan Marion [Sun, 31 Oct 2021 18:26:58 +0000 (19:26 +0100)]
lisp: fix outside array bounds

Reported by gcc-11...

Type: fix
Change-Id: I30262f6496217335aa45cca2f541846a69bc15ee
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: add CLIB_ASSUME() macro 63/34263/9
Damjan Marion [Wed, 27 Oct 2021 16:19:43 +0000 (18:19 +0200)]
vppinfra: add CLIB_ASSUME() macro

This macro privides a way to tell compiler that it is safe to assume
that specified expression is true so it can optimize code accordingly.

i.e.

    CLIB_ASSUME (n < 3);

    while (n)
    {
      /* ... */
    }

Will tell compiler that n is never going to be >= 3 so instead of
creating loop it will just unroll loop 2 times.

Type: improvement
Change-Id: I718a9b95ff7980d7ac68eb9a88357a4ab6eee74a
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agotcp: fix uninitializad value 91/34291/3
Damjan Marion [Sun, 31 Oct 2021 18:13:24 +0000 (19:13 +0100)]
tcp: fix uninitializad value

May not be valid error but gcc-11 complains.

Type: fix
Change-Id: I207b8b4966c5eadd534495e29c873663249a377f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agovppinfra: fix calljmp test 90/34290/2
Damjan Marion [Sun, 31 Oct 2021 18:06:20 +0000 (19:06 +0100)]
vppinfra: fix calljmp test

Change-Id: Id1b380880c6509d983727f6fb57e7db97e66655a
Type: fix
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agohash: check if crc32c is available 99/34299/2
Damjan Marion [Sun, 31 Oct 2021 19:18:13 +0000 (20:18 +0100)]
hash: check if crc32c is available

Type: fix
Change-Id: I2f87ed4b151ecd5034b69d6f060626be6fd74e85
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agoipsec: silence gcc-11 parentheses warning 97/34297/1
Damjan Marion [Sun, 31 Oct 2021 19:02:19 +0000 (20:02 +0100)]
ipsec: silence gcc-11 parentheses warning

Type: fix
This reverts commit 5ecda99d673298e5bf3c906e9bf6682fdcb57d83.

Change-Id: I393c7d8a6b32aa4f178d6b6dac025038bbf10fe6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 years agointerface: handoff refactor and optimizations 69/34269/7
Florin Coras [Wed, 27 Oct 2021 22:17:47 +0000 (15:17 -0700)]
interface: handoff refactor and optimizations

- move existing ethernet hash functions to hash infra (no l4
awareness)
- refactor code to use hash infra and add apis to request l4 aware
hashing functions
- hashing functions per interface
- code cleanup

Type: improvement

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

2 years agobuild: add missing fib headers in packages 22/34122/2
Benoît Ganne [Mon, 18 Oct 2021 09:16:01 +0000 (11:16 +0200)]
build: add missing fib headers in packages

Type: fix
Fixes: d6953332db225d5355f50348ef3b09f0525d5282

Change-Id: Ib85fee40e71ebe5bc2b84c62e37298b5e390d520
Signed-off-by: Benoît Ganne <bganne@cisco.com>