Commit Graph

11316 Commits

Author SHA1 Message Date
Damjan Marion
f9e3cd4e5a misc: update extras/scripts/lsnet
Type: improvement
Change-Id: Iea45fa535ca562a1d424fd3d46b557a7d4775505
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-10 00:44:26 +01:00
Dave Wallace
fb1135da99 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>
2021-11-09 23:29:58 +00:00
Florin Coras
e7dda6b034 session: reset if ct close with data
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9540948b8b5476af7558d741cbf15ee838d4e01b
2021-11-09 19:09:22 +00:00
Florin Coras
440c7b5570 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
2021-11-09 18:33:28 +00:00
Neale Ranns
a360e6fc11 tests: Remove the error output from the linux-cp tests
Type: test

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ib9899327897f36219c113fedb25366cd1be463a0
2021-11-09 17:29:32 +00:00
Damjan Marion
0f814f5bd5 build: missing clang in deps for ubuntu 20.04
Type: make
Change-Id: Ica706f0284873f6bd8b8d868c965812a139748cf
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-09 16:17:23 +01:00
Dave Wallace
995123ec20 tests: fix missing dataclasses module in python 3.6
Type: fix
Fixes: b8165b96f

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: Ic82a0404073a26e3d160b01c9038cde11eedf3ec
2021-11-09 11:17:36 +00:00
Daniel Béreš
90c397c505 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>
2021-11-09 09:54:34 +00:00
Florin Coras
f7b1f8a891 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
2021-11-08 16:41:03 -08:00
Damjan Marion
4c53ff4595 vppinfra: vectorized index to pointer function
Type: improvement
Change-Id: I05e1a8fa31761b113355123429d72da18881d4b0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08 21:49:51 +01:00
Damjan Marion
66b057e563 vppinfra: clib_count_equal_* tests
Type: improvement
Change-Id: I8f75cd9ce78ce686985e65c75dcddf498cef7621
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08 20:44:03 +00:00
Damjan Marion
7459be1b36 vppinfra: AVX512 in clib_count_equal_*
Type: improvement
Change-Id: I8105d396cfc984e00cf5137bc57122510f5e6437
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08 20:44:03 +00:00
Damjan Marion
1e26724dce build: -Wno-stringop-overflow during LTO phase
Type: make
Change-Id: I735fa411366c41981e255921eceb18ebbb4b5fe1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-08 16:39:06 +00:00
Ray Kinsella
81865bc0e3 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
2021-11-08 09:33:25 +00:00
Tianyu Li
ad1bc84e6e 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
2021-11-07 04:25:14 +00:00
Gabriel Oginski
e6189d8d0b 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
2021-11-07 04:23:28 +00:00
Xiaoming Jiang
e58c5c5bb4 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
2021-11-07 04:01:17 +00:00
Florin Coras
957d85058f tcp: fix reset with packet ack number
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I35c1fc75df065398821cc275e853a3caa9db94c2
2021-11-06 18:19:53 +00:00
Dave Wallace
51a037daf2 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>
2021-11-06 17:33:14 +00:00
Damjan Marion
4c276f073f vppinfra: move clib_count_equal_* code
Type: refactor
Change-Id: Ib9e8abdbf745ad6563fc79c9ebb6b2ea65917d08
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-06 16:45:31 +00:00
Damjan Marion
d67ab10e91 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>
2021-11-06 16:44:56 +00:00
Florin Coras
bc1640a504 tcp: in place tcp header for buffer resets
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2a5de36175bca1181ffd4a1865d41f0a1f6bc035
2021-11-06 03:20:43 +00:00
Damjan Marion
2e3a79ff50 build: print compiler and library dir
Type: improvement
Change-Id: I9488c62f0d293a1ba9121c2994a788a82ba9f6a1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-06 00:57:18 +00:00
Damjan Marion
48ec32f5cc dpdk: remove dead code
Type: refactor
Change-Id: I76ccf8970ebb3f180ce745d8b515c5e0724784d6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 23:45:52 +01:00
Damjan Marion
e1077095ad pci: remove dead code
Type: refactor
Change-Id: Ic79e38aa6cf4ffe1eb677e7cef34351e7917d97b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:06:49 +00:00
Damjan Marion
3f8b8d30ca vlib: remove dead code
Type: refactor
Change-Id: I818bacdb068e825b38acdceb2566972819c64e82
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:05:59 +00:00
Damjan Marion
ad8b37dce9 devices: remove dead code in pipe
Type: refactor
Change-Id: If4a0484afebe53d53d79ab5cb72299e6298cfee7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:05:46 +00:00
Damjan Marion
229b28e8d2 vppinfra: remove dead code in elf.c
Type: refactor
Change-Id: Ia47644ca5fb7c848c0de7e7c3ed2c69e8d5cb80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:05:32 +00:00
Damjan Marion
d4e90407d2 ip: remove dead code
Type: refactor
Change-Id: Ia8e8834b635025d07e1028b1d5779b21c4e05e58
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:05:17 +00:00
Damjan Marion
4902dda87c snort: default logging level should not be debug
Type: fix
Fixes: 839b147
Change-Id: I6315c866237ddc65a8d67e412c6eb70396c8172f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-11-05 22:04:56 +00:00
Tianyu Li
2fcf7df44a 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: 839b1473e9 ("snort: snort3 plugin and DAQ")
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I7c7c8c2dbdc47c200b091c23ec2d992266596992
2021-11-05 19:32:27 +00:00
Steven Luong
51ddd38deb 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: b0598497af

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I99fa59c878331f995b734588cca3906a1d4782f5
2021-11-05 19:20:10 +00:00
Mohsin Kazmi
6259406668 virtio: fix the initialization
Type: fix

Fixes: d96b28ac09 ("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
2021-11-05 16:13:57 +00:00
Klement Sekera
d4ba0d1883 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>
2021-11-04 13:30:21 +00:00
Klement Sekera
5a58e7c546 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: de34c35fc7
Change-Id: I0b656ec103a11c356b98a6f36cad98536a78d1dc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2021-11-04 13:17:50 +00:00
Steven Luong
b5a2b05327 vppinfra: strstr_s_inline checks string unterminated wrong
When checking whether s2 is unterminated, it uses s1max. It should
use s2max.

Type: fix
Fixes: b0598497af

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I8a0b8ceebc2dd18402a87274add528c3d085a95a
2021-11-03 16:50:20 -07:00
Ray Kinsella
03d0fbe3c1 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
2021-11-03 17:25:20 +00:00
Gabriel Oginski
4739c8833e 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
2021-11-03 16:04:00 +00:00
Florin Coras
505fd37b31 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
2021-11-03 15:29:57 +00:00
liuyacan
ffd9ddbc40 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
2021-11-03 14:50:06 +00:00
Neale Ranns
0d7fd782e0 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
2021-11-03 12:56:11 +00:00
Neale Ranns
bed9b7269a ipsec: Support the single IPSec interface dump
Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I93c819cdd802f0980a981d1fc5561d65b35d3382
2021-11-03 10:55:25 +00:00
Neale Ranns
61aad0a791 tests: Apply the 'return self' pattern for the L2 objects
Type: test

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I3286fbf09d18719546ba80e9cb81c7e58f87a603
2021-11-03 10:54:43 +00:00
Klement Sekera
849b474dc4 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
2021-11-02 22:34:28 +00:00
Benoît Ganne
6ea5c4744a 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: 7dbf9a1a4f

Change-Id: I3f848aa905ea4a794f3b4aa62c929a481261a3f1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-11-02 22:33:32 +00:00
Dave Wallace
78b4f4e19b 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>
2021-11-02 22:32:18 +00:00
Sivaprasad Tummala
543a0fd32b snort: fix inconsistent snort input mode
Type: fix

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
Change-Id: If42bb9924fa8298b5fac679bc1f2dc1f5b1ad58c
2021-11-02 22:30:42 +00:00
Klement Sekera
eb416708b1 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
2021-11-02 22:27:03 +00:00
Ray Kinsella
064b77c742 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
2021-11-02 22:26:34 +00:00
Ray Kinsella
e15c999c30 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
2021-11-02 22:25:40 +00:00