13317 Commits

Author SHA1 Message Date
Anton Nikolaev
1200c799d0 linux-cp: add add_del_v3 and get_v2 methods
Added vl_api_lcp_itf_pair_add_del_v3_t_handler method, it can return
vif_index in reply. Also added vl_api_lcp_itf_pair_get_v2_t_handler
methods, this method is able to dump only one lcp pair or dump all
lcp pairs via stream_msg.

Type: improvement
Change-Id: I1d25344ee57f8fac8b857bb3a9a03116230b4d2c
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
(cherry picked from commit 83ad79d69a09f504ba6ce3325fc165648eb55daa)
2024-03-11 20:18:24 +00:00
Matthew Smith
4991354309 ip: force full reassembly before virtual
Type: improvement

The vnet buffer metadata for full IP reassembly and shallow virtual
reassembly overlaps. If you have full reassembly and virtual reassembly
enabled on the same interface and virtual reassembly happens to process
packets first, full reassembly will stomp on the metadata populated by
virtual reassembly.

Virtual reassembly gets enabled implicitly when NAT feature nodes
are enabled. Those NAT feature nodes rely on the virtual reassembly
metadata being populated correctly in order to find L4 proto & ports.
When NAT and IP full reassembly are both enabled on an interface, NAT
can drop fragmented packets because the virtual reassembly metadata
can be overwritten by full reassembly.

Ensure that full reassembly runs before virtual reassembly. Add a
runs_before dependency to ensure that ip4-full-reassembly-feature
runs before ip4-sv-reassembly-feature.

There was a duplicate VNET_FEATURE_INIT() for
ip4-full-reassembly-feature. It seems to have been intended for enabling
ip4-full-reassembly-custom as a feature node, but its contents are
identical to the earlier VNET_FEATURE_INIT() for
ip4-full-reassembly-feature. Removed the duplicate.

Change-Id: Ie600b854d4ceb90a7cb736810140d410b8f72447
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit 205ed8f8845a8ea36f38ed29df158a5a07c2e2c3)
2024-03-08 12:27:12 +01:00
Florin Coras
e4ec1584ec tls: mark ho done atomically after ctx init
Make sure ctx is initialized before ho is marked as done.

Type: fix

Change-Id: If0525a9890a56e289e2ab006c669a9d64dc6505d
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 0ded4890beaa3aa1f36c61ff6125d19582b25391)
2024-03-01 14:29:29 +00:00
Florin Coras
7453b5dfe8 session: postpone ct cleanup if rx evt pending
Type: fix

Change-Id: I8cfaa62abd38d5356263b0ffd428638d1a027617
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3efcbaf3b1119b4312ae1f3a1c59dea2d746bec4)
2024-03-01 14:29:11 +00:00
Andrew Yourtchenko
455960759b misc: VPP 24.02 Release Notes
Type: docs
Change-Id: I4209b4edf387f2d7b88ecc338cca3b4901210ed2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v24.02
2024-02-28 11:12:31 +00:00
Vratko Polak
ccfc24f745 buffers: bring back cache occupancy improvement
The improvement was removed in 40129,
causing 5-40% regressions in AVF tests.

There is a memory-speed trade-off,
this change prefers speed over memory efficiency.

Ideally, the choice should be configurable,
but that is not easy to achieve, considering
how early is vlib_buffer_main_init called.

Type: fix
Fixes: 038dad7ef29b0b724071edb5f8cc7a9845584454

Change-Id: I4746f3634abe6d233c9d092a372de05b3d1ae4b6
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 04fd51c03c428859bae949a8294ee0f9c062a44b)
2024-02-19 12:22:20 +00:00
Florin Coras
8cbf84dce0 vcl: fix epollet test for unhandled evts
Argument to vcl_epoll_ctl_add_unhandled_event is often the result of an
and between events and EPOLLET which is larger than u8

Type: fix

Change-Id: I8c98f557fa1db9f3eb79c90ecdd60ac9366d4d40
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit e81f27ffb2a698737eae607b111d0611d221222f)
v24.02-rc2
2024-02-13 17:20:10 +00:00
Andrew Yourtchenko
3a56e86a73 misc: Initial changes for stable/2402 branch
Type: docs
Change-Id: I820bbb54597a8f640ed6b854d20d0b572c5f255b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
v24.02-rc1
2024-01-24 12:41:23 +00:00
Dmitry Valter
a21889174f vppinfra: fix clib_array_mask_u32 OOB reads
Handle non-even n_elts for the larger array instead of reading past
the source buffer.

Type: fix
Fixes: f62ed3f9c1ec3e8db36f63d6a54f46b7bea43723
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Ic1708a3f33fe71ca752345b5c77b6ae7a2d42bcd
2024-01-23 22:39:43 +00:00
Florin Coras
3109d1c298 tls: fix ho leak on tcp connect return
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I40345d635b8067dcffbbdd39d0a5b0c0934a6d54
2024-01-23 17:50:52 +00:00
Vratko Polak
1effb29aa2 papi: support old style of providing apidir
77caeb1b193404e76beb27a1aa81321e8eb1cf1f has changed the behavior
in an incompatible way, breaking users (including CSIT).

The new behavior is more pythonic,
but the old behavior has to be supported
at least one release after publicly deprecating it.

Type: fix

Change-Id: I9dfdd2229065010216e49db80b14b856c545965c
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2024-01-23 16:34:14 +00:00
Florin Coras
e6d05dc1b6 tls: overlap parent opaque with listener ctx
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0a0d0b8721f5a15da47c7ac0e58cd50e159b2f54
2024-01-23 16:32:28 +00:00
Florin Coras
fad689eeba tls: set flag whenever app session is freed
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3d44ff851da00573343e15712284af3b9c3912e3
2024-01-23 16:32:08 +00:00
Florin Coras
77680ae56f session: flag instead of state for filtering ntf
Avoid situations when notifications are delayed for long enough for
transports to start closing/cleaning up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id35b0099adb5242108154a5e19d5ee15e6ca0058
2024-01-22 17:05:34 -08:00
Tom Jones
0aa0d6ffbe build: Explicitly use gmake
VPP requires GNU Make to build, on GNU systems (such as Debian), GNU
Make is installed as 'make', typically with a symlink from 'gmake'.

On other systems (such as FreeBSD), 'make' is a BSD Make derriviative
and GNU Make is installed a 'gmake'.

Use $(MAKE) variable for make calls from within Makefiles.  This
variable is set to the path of the calling make program, i.e.,
/usr/local/bin/gmake on a bsd system.

This is the recommended way to call make from Makefiles in the GNU Make
documentation.

Type: improvement
Change-Id: Id9162a34a0f8358f22090718087918dae31c0fce
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-21 14:42:03 +00:00
Damjan Marion
038dad7ef2 buffers: add compile-time option to set buffer alignment
Type: improvement
Change-Id: I88c4c45bed0bdd8686e17e4f77a7d32a08c995aa
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-20 18:28:09 +00:00
Damjan Marion
5840c66bbc build: disable plugins which require openssl if openssl is not available
Type: improvement
Change-Id: I4591fcb31dd28d1771b3d6e5afdaa14f29efe6ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-19 21:56:35 +01:00
Benoît Ganne
9705d848a2 build: fix default platform
When unsetting VPP_PLATFORM in cmake, it unmasks the cached value
instead, misleading the platform selection logic in src/cmake/cpu.cmake

Type: fix
Fixes: 01fe7ab88e

Change-Id: I676cd0af9ba28150f8ac07724c03df8ef24b640f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-01-19 19:02:27 +00:00
Filip Tehlar
9418143bd4 hs-test: change convention for skipping tests
Also re-enable external echo QUIC test.

Type: test

Change-Id: I3973409c31fd7c42b97ac3ceae1a5cbad6f1b2b6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-19 17:02:03 +00:00
Dmitry Valter
705f66e5ac vppinfra: fix test_bihash
Correctly wrap data indices in test_bihash.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I740fa1cf9f8c382c12f01f607095c5995be6845f
2024-01-19 12:51:52 +00:00
Denys Haryachyy
9f8d3b9b2f lldp: dump api
Introduce a dump api for LLDP plugin

Type: improvement

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: If67dedd329cced59227187284646d147ef6ef92c
2024-01-19 12:51:07 +00:00
Georgy Borodin
c03593e81d vppinfra: fix bracket balance
fix bracket balance in pool_put_will_expand

Type: fix
Fixes: 66d4cb5a217d556aa7bd2471f02a39badb6d5cd2
Change-Id: I921366c0898cca39cc728b7c7ef4c4c725c6b87d
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-19 12:48:02 +00:00
Dmitry Valter
8263888f46 vppinfra: fix vec_prepend use-after-free
Don't access free'd memory in vec_prepend.
Don't allow prepend when v1 == v2 as it also causes a use-after-free.
Found via ASAN.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I21f8422c007d07d40d237e873b84c042be1fe8e8
2024-01-19 12:37:49 +00:00
Mohsin Kazmi
c60266d1ea memif: use VPP cacheline size for memif when compiling within VPP
Type: make

memif.h file is independent code which can be used outside of
VPP. Hence it uses its own cacheline size MACRO. This patch
sets the value of MEMIF_CACHELINE_SIZE in the cmake file for
memif plugin to VPP_CACHE_LINE_SIZE.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I8185e78897f4571f1a0430dd7e758816e127444c
2024-01-19 12:32:55 +00:00
Tom Jones
c3b416c492 build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.

Look up the location of bash for makefiles.

Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-19 12:30:01 +00:00
nucleo
ca75cd83b5 af_xdp: Backport xdp-tools fix transposed calloc() arguments
Fixes compilation error with GCC 14

'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument

Type: fix

Change-Id: Ie328ecc711976547df2cffe17325b786bc7a8849
Signed-off-by: nucleo <alekcejk@googlemail.com>
2024-01-19 08:39:46 +00:00
Maxime Peim
77caeb1b19 tests: preload api files
When sanity test is not done, API files are not loaded until the
first test case is run. Hence, it is not possible to use enums, etc.
outside of a test class.
By preloading API files before running any tests, it prevents its
issue.

Type: fix
Change-Id: I8730150374e6c5f8d6933ec037811372ac2a8da0
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2024-01-18 20:14:54 +00:00
Filip Tehlar
87241fefd9 hs-test: use specific port for http3 test
curl sometimes uses 2 different source ports during the test.

Type: test

Change-Id: Ib27e9d22a9cc951f4729f4bd0ae99d80bf8d938b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-18 17:06:00 +00:00
Damjan Marion
01fe7ab88e octeon: native driver for Marvell Octeon SoC
Type: feature
Change-Id: I6898625c4e8854f777407dac3159e4c639a54860
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-17 20:44:10 +01:00
Georgy Borodin
dc26d50426 vppinfra: change fchmod to umask for unix socket
Setting g+w permission for unix sockets didn't work. There were
two problems:
1. new flag local_only wasn't set for all AF_UNIX sockets;
2. fchmod is not a good choice for sockets.

fchmod was replaced with couple of umasks, and local_only with
socket type check.

Type: fix
Fixes: 085757bb4930511928daa97f972cdca021e7a813
Change-Id: I8dc0fceb110a36bfa234f552bbdf182e09e55e27
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-17 19:10:13 +00:00
Artem Glazychev
8beddaf5b4 af_packet: set next0 for AF_PACKET_IF_MODE_ETHERNET mode
Normally af_packet sets next0 = next_index on each cycle. It works for the most cases.
But if vlib_validate_buffer_enqueue_x1() changes the next_index (from NEXT_ETHERNET to NEXT_DROP for example)
then the following next0 will have the wrong value, and the correct packet will be dropped.

AF_PACKET_IF_MODE_IP handles this case, but AF_PACKET_IF_MODE_ETHERNET doesn't.

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ic742043e8b10a2abe56b314bb584277151a9c5eb
2024-01-17 14:13:47 +00:00
Guillaume Solignac
de04e023cb build: add vapi scripts to VPP_HOST_TOOLS_ONLY
vapi generators were missing from the VPP_HOST_TOOLS_ONLY, which
prevents building an out-of-tree plugin with API files. We now
install them.

Type: improvement
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: Ie613c8f64034e933124325242f2f8b3ac3955878
2024-01-16 22:34:43 +00:00
Georgy Borodin
c018204aaf vnet: fix log_debug message format
debug+asan build will fail on initialisation when loglevel==debug

Type: fix
Fixes: 1cd0e5dd533f4209dde453eaa43215e52cd42985
Change-Id: I2005ebf9b95ec3b753c4e6d29337be460c77ffed
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:07:46 +00:00
Dmitry Valter
0bef4cf39c vppinfra: fix memcpy test buffer size
Fix dst buffer size in memcpy_x86_64 test.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I2b4502a62d9346d729b83522f4ea01c98a5b961c
2024-01-16 22:04:38 +00:00
Kai Ji
ebe2371e6a dpdk: add ID for QAT 4xxx series VF support
Type: feature

Enable use of 4th gen QAT series devices.

Change-Id: I890c1f1d305ff9b996322c29e9510cfe89d88d97
Signed-off-by: Kai Ji <kai.ji@intel.com>
2024-01-16 22:03:43 +00:00
Georgy Borodin
dbe9937b72 dpdk: fix log_debug message format
debug+asan build will fail on initialisation when log level==debug

Type: fix
Fixes: 549838c81bd0d995f2b8569955afc33132582c77
Change-Id: Ic64b376727d49f89790fb29bd03a0a2520625cdc
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:02:58 +00:00
Damjan Marion
1cfac4e6e4 vlib: remove unused code
Type: improvement
Change-Id: I2c54cb3eb41ed35f114eca75fb6e2be3eb3f4ca1
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-16 17:40:56 +00:00
Damjan Marion
7e9513b8fc vppinfra: enable AES tests on ARM
Type: improvement
Change-Id: I30f3b2924ab219a8bace87f358b1b823e8bc83bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-16 17:40:40 +00:00
Pim van Pelt
4a515d35a8 build: Provide clang-14 for Debian12
checkstyle.sh assumes clang-format-11 but allows it to be overridden.
Debian12 ships with a minimal version of clang-14, so set the correct
version for checkstyle.

Before:
$ make checkstyle
extras/scripts/checkstyle.sh: line 41: --version: command not found
make: *** [Makefile:720: checkstyle] Error 127

After:
$ make checkstyle
Debian clang-format version 14.0.6
*******************************************************************
* CHECKSTYLE SUCCESSFULLY COMPLETED
*******************************************************************

Type: make
Fixes: 712fc0308981c61444e593d6bcc2ad62102c726d
Change-Id: I0c58456477011397115810dab825865b5850d10d
Signed-off-by: pim@ipng.nl
2024-01-16 17:39:17 +00:00
Pim van Pelt
276cd73b75 stats: Add optional labels to prometheus metrics
* Refactor the existing prometheus exporter to function print_metric_v1()
* Add a 'v2' flag which instead uses metric names with labels, example:
  nodes_clocks{node="ip4-lookup",index="0",thread="4"} 30198798628761
  nodes_vectors{node="ip4-lookup",index="0",thread="4"} 298176625181
  nodes_calls{node="ip4-lookup",index="0",thread="4"} 119789874274
  nodes_suspends{node="ip4-lookup",index="0",thread="4"} 0

  interfaces_rx_packets{interface="tap0",index="0",thread="1"} 79582338270
  interfaces_rx_bytes{interface="tap0",index="0",thread="1"} 16265349667188
* For stat names that we don't know, print their v1 equivalent, which
  keeps backwards compatibility.

Details in https://ipng.ch/s/articles/2023/04/09/vpp-stats.html

Type: improvement
Signed-off-by: pim@ipng.nl
Change-Id: I53ed3ede8cc7853eb46c354834d89eb788ece3b1
2024-01-16 10:05:55 +00:00
Florin Coras
66abf32283 session: avoid spurious disconnect and reset ntfs
Type: fix

Change-Id: Icdc9d1c8b7b29827ce17920dae64a365bb8a4e40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-15 13:11:24 +00:00
Mohsin Kazmi
159ee88ff5 devices: add support to check host interface offload capabilities
Type: improvement

This patch implements support to check the host interface offload
capabilities.

NOTE: this check is only done once when interface is being created.
Any changes to the cap of host interface after that will not reflect
changes to af_packet interface in VPP.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ibc9953131f64f3fb3e601d34036b9f453913692a
2024-01-15 10:01:37 +00:00
Pim van Pelt
712fc03089 build: Add Debian12 environment
Add clang-14 and libffi8 which ship with Debian Bookworm. The project
compiles cleanly with these versions.

Type: make
Change-Id: I17350aae30cec72987792d54d88231b3221b56b9
Signed-off-by: pim@ipng.nl
2024-01-14 21:10:33 +01:00
Florin Coras
ed4e612e60 session: fix app wrk free leak
Type: fix

Change-Id: I9c48b163f174b824df1a76e75c272dc985386bf2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-01-12 18:23:53 +00:00
Damjan Marion
da3771c25b crypto-native: add AES-CTR
Type: feature
Change-Id: Iab84226043d8042a99a507767b75e9d4a89cc5c6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-12 17:37:42 +00:00
Damjan Marion
9caef2a351 vppinfra: native AES-CTR implementation
Type: feature
Change-Id: I7ef3277edaeb266fbd3c8c9355d4443002ed2311
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-12 17:37:28 +00:00
Filip Tehlar
bf40da413f http: fix memory leak
Type: fix

Change-Id: I36905132a42d23e719bf0e82eeafa48f60f4887a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-12 11:25:16 +01:00
Tianyu Li
d7c96324c0 libmemif: fix segfault and buffer overflow in examples
- Fix buffer overflow caused by strncpy(dst, src, strlen(src)),
use sized buffer to ensure overflow safe.

- Fix test_app getopt usage

 When use example/icmp_responder in slave mode
- Fix segfault when buffer size is not specified
- Fix wrong packet send out.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I5ed47fd8e630420d7ae0203a2605d2b9abd33d2a
2024-01-12 03:22:56 +00:00
mbly
00e9fe6ca7 libmemif: fix for memif_init_queues slot math
Increase slot variable to u32 to address combinations of num-queues and queue-size that cause slot variable to wrap when declared as u16, e.g. num-queues > 8 && queue-size is 2^12

Type: fix
Change-Id: I5bd6198d60395156a06f1a280ea2594824ceaa9d
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:30 +00:00
mbly
a908779820 libmemif: Fix for memif_buffer_alloc rewind logic
Rewind logic was not supporting count = 1, where size was > memif_buffer_size and a rewind is required.
Fixed slot-->next_buf bug for !master as well.

Type: fix
Change-Id: I65cf0d3d0c105f37125412a613e5ff8c5da9a3a2
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:06 +00:00