Compare commits

...

276 Commits

Author SHA1 Message Date
a144e75fed build: update octeon-roc checksum to updated version
- caused by regeneration of source tarball after the
  marvel repo moved to a new account

Type: fix

Change-Id: I44616408d673c8d208ff73ea29d9f5cc12778cef
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-07-30 15:11:47 -04:00
7ad2c8b3e0 tests: disable failing tests on Ubuntu 22.04
Also rework the logic so the skipping of marked Ubuntu 22.04 occurs at framework level

Leave debian11 special cases as-is.

Type: fix
Change-Id: I481eb32cd1a0860935482e9f930ced409da653c9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit 9987d470a6)
2024-07-10 01:16:38 +00:00
80e9503819 sr: use correct reply to sr_policy_add_v2
Type: fix
Fixes: c4c205b091

Change-Id: I110729601a9f19451297883b781ec56e2b31465b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 4332082093)
2024-04-18 15:29:03 +00:00
dd59e1b432 misc: in crcchecker.py, don't check for uncommitted changes in CI
Type: fix

Change-Id: I63260a953e54518b3084b62fccdb4af81315b229
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 3a0d7d2c95)
2024-04-08 22:44:18 +00:00
500ac05961 flowprobe: fix flush callbacks when multiple workers
IPFIX buffers are stored on a per worker thread basis. Currently, the
flush callbacks will flush only buffers stored for the main thread. And
buffers for worker threads will not be sent until their size reach the
path MTU configured for the exporter. So if traffic is constant, the
problem will unlikely to be visible. Buffers will be sent once they
reach the maximum size. However, if traffic stops at some point and
flush is triggered in order to make the plugin send all currently
buffered data, this will not happen. And collectors will not receive
that data. The plugin will keep the remaining data until traffic starts
again, the buffers reach the maximum size, and be sent.

With this fix, flush buffers for worker threads and for the main thread
when the flush callbacks are triggered.

This will allow to remove @tag_fixme_vpp_workers from the unit tests
that don't set timers. The tests that set timers will still be failing
for other multi-worker related problems.

Type: fix
Change-Id: I9a7d9cef8ddbec7ee68c79309e48e7bc0953d488
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 4c7305f124)
2024-03-12 07:53:34 +00:00
a541cfd31d ipsec: check each packet for no algs in esp-encrypt
In esp_encrypt_inline(), if two or more consecutive packets are
associated with the same SA which has no crypto or integrity algorithms
set, only the first one gets dropped. Subsequent packets either get sent
(synchronous crypto) or cause a segv (asynchronous crypto).

The current SA's index and pool entry are cached before it can be
determined whether the packet should be dropped due to no algorithms
being set. The check for no algorithms is only performed when the cached
SA index is different than the SA index for the current packet. So
packets after the first one associated with the "none" alg SA aren't
handled properly.

This was broken by my previous commit ("ipsec: keep esp encrypt pointer
and index synced") which fixed a segv that occurred under a different
set of circumstances.

Check whether each packet should be dropped instead of only checking
when a new SA is encountered.

Update unit tests:
- Add a test for no algs on tunnel interface which enables
  asynchronous crypto.
- Send more than one packet in the tests for no algs.

Type: fix
Fixes: dac9e566cd

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I69e951f22044051eb8557da187cb58f5535b54bf
(cherry picked from commit ff71939c30)
2024-03-11 20:18:42 +00:00
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 83ad79d69a)
2024-03-11 20:18:24 +00:00
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 205ed8f884)
2024-03-08 12:27:12 +01:00
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 0ded4890be)
2024-03-01 14:29:29 +00:00
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 3efcbaf3b1)
2024-03-01 14:29:11 +00:00
455960759b misc: VPP 24.02 Release Notes
Type: docs
Change-Id: I4209b4edf387f2d7b88ecc338cca3b4901210ed2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-02-28 11:12:31 +00:00
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: 038dad7ef2

Change-Id: I4746f3634abe6d233c9d092a372de05b3d1ae4b6
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 04fd51c03c)
2024-02-19 12:22:20 +00:00
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 e81f27ffb2)
2024-02-13 17:20:10 +00:00
3a56e86a73 misc: Initial changes for stable/2402 branch
Type: docs
Change-Id: I820bbb54597a8f640ed6b854d20d0b572c5f255b
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2024-01-24 12:41:23 +00:00
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: f62ed3f9c1
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Ic1708a3f33fe71ca752345b5c77b6ae7a2d42bcd
2024-01-23 22:39:43 +00:00
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
1effb29aa2 papi: support old style of providing apidir
77caeb1b19 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
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
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
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
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
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
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
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
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
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
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
c03593e81d vppinfra: fix bracket balance
fix bracket balance in pool_put_will_expand

Type: fix
Fixes: 66d4cb5a21
Change-Id: I921366c0898cca39cc728b7c7ef4c4c725c6b87d
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-19 12:48:02 +00:00
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
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
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
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
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
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
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
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: 085757bb49
Change-Id: I8dc0fceb110a36bfa234f552bbdf182e09e55e27
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-17 19:10:13 +00:00
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
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
c018204aaf vnet: fix log_debug message format
debug+asan build will fail on initialisation when loglevel==debug

Type: fix
Fixes: 1cd0e5dd53
Change-Id: I2005ebf9b95ec3b753c4e6d29337be460c77ffed
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:07:46 +00:00
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
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
dbe9937b72 dpdk: fix log_debug message format
debug+asan build will fail on initialisation when log level==debug

Type: fix
Fixes: 549838c81b
Change-Id: Ic64b376727d49f89790fb29bd03a0a2520625cdc
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2024-01-16 22:02:58 +00:00
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
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
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: 712fc03089
Change-Id: I0c58456477011397115810dab825865b5850d10d
Signed-off-by: pim@ipng.nl
2024-01-16 17:39:17 +00:00
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
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
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
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
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
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
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
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
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
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
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
9853342194 libmemif: added tests
This patch provides unit tests for libmemif written in Unity

Type: test

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I19116def6e6d28efd5f460c93911245474a11321
2024-01-12 03:21:41 +00:00
56e17cf7a2 hs-test: add more asserts
Type: test

Change-Id: Ia285ff39d9b19464ea086ec847ceaf52c6c0195c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 19:45:06 +00:00
ba39d86eec crypto: align host and VPP IPsec-mb lib
Ensure alignment between the Intel IPsec-mb library on the
host and VPP targets.If the version of Intel ipsec-mb on the
host is misaligned with the targets,terminate the compilation
process to prevent potential library linkage issues.

Type: fix

Change-Id: I38864115d59ae09fb5556ad4a29e884ebace8155
Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
2024-01-11 13:19:57 +00:00
3336eefaa8 hs-test: add tls proxy test
Type: test

Change-Id: I8f3f4c464907356bb1990ea53f0f46befc057acf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:35:54 +00:00
4fa0ba6ac0 hs-test: retry command on test setup failure
Type: test

Change-Id: Iad744c4b3f79820e8bd0dd2ef9f18e4f7718e845
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:27:09 +00:00
afefe22e5d linux-cp: fix route prefix construction
Prevent comparison ops for uninitialized IPv6 prefix bytes.

Type: fix

Change-Id: I440fea7f0725769406ad348eb3402a98c593dc3c
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2024-01-10 16:16:35 +00:00
2c9b128e1b linux-cp: Fix looping netlink messages
Signal when consuming a batch of netlink messages, in order to inhibit
lcp_sync from generating new netlink messages. This avoids link up/down
state changess from triggering an infinite loop.
Do this in the regular case of nl_route_process_msgs()
and in the special case of re-synchronizing in lcp_nl_recv_dump_replies().
Type: fix
Change-Id: I419d3f9aa350c119b3778b644c65165cb4cc1bef
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2024-01-10 14:49:25 +00:00
2fa69effc8 urpf: add interface dump to API
Add an urpf_interface_dump() API call, with optional sw_if_index.
If either a mode or a table is specified in any given interface
address family and direction, return it in a list, otherwise omit
it.

TESTED:
create loopback interface instance 0
create loopback interface instance 1
create loopback interface instance 2
create loopback interface instance 3
ip6 table add 8298
set urpf ip4 rx loose loop1
set urpf ip6 tx off loop2 table 8298

API call urpf_interface_dump(sw_if_index=~1) returns:
[
urpf_interface_details(_0=658, context=2, sw_if_index=2, is_rx=True, mode=<vl_api_urpf_mode_t.URPF_API_MODE_LOOSE: 1>, af=<vl_api_address_family_t.ADDRESS_IP4: 0>, table_id=0),
urpf_interface_details(_0=658, context=2, sw_if_index=3, is_rx=False, mode=<vl_api_urpf_mode_t.URPF_API_MODE_OFF: 0>, af=<vl_api_address_family_t.ADDRESS_IP6: 1>, table_id=8298)
]

Type: improvement
Change-Id: I1ded5c445dc07dab73ea41b817b5827b72ca79d4
Signed-off-by: pim@ipng.nl
2024-01-10 00:28:06 +00:00
97fef28a0b session: make app listener pool global
One less pointer chase when accepting sessions.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I20dbb21d15d4a703f76e3b12f04a6f5b5d2a3cd8
2024-01-09 17:07:54 +00:00
7428eaa4a1 session: support for cl port reuse
Adds support for connectionless listener port reuse. Until now, cl
listeners had fifos allocated to them and therefore only one app worker
could ever listen, i.e., a session cannot have multiple fifos.

To circumvent the limitation, this separates the fifos from the listener
by allocating new cl sessions for each app worker that reuses the app
listener. Flows are hashed to app worker cl sessions but, for now, this
is not a consistent/fixed hash.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic6533cd47f2765903669f88c288bd592fb17a19e
2024-01-09 17:07:54 +00:00
5afc13d594 session: avoid spurious closed notifications
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ia98556e7ae61547cf153c78ec085cd4248bee74a
2024-01-09 17:07:26 +00:00
2b5bc3bce6 libmemif: add name to maintainer file
Type: docs

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I994d843a035e6afc4b72d06745d2be74cd81cd3a
2024-01-08 13:45:52 +00:00
5d13416f38 flowprobe: fix calling vlib_time_now() from worker threads
Currently, when flowprobe_export_send() calls vlib_time_now(), a pointer
to the main thread's vlib_main_t is always passed (the one cached in
flow_report_main). However, that code can also be executed from a worker
thread. And passing a pointer to the main thread's vlib_main_t to
vlib_time_now() from a worker thread may cause time synchronization
issues. Also, running a debug binary will cause an assertion failure in
vlib_time_now() in this case.

With this fix, flowprobe_export_send() passes the pointer to the current
thread's vlib_main_t to vlib_time_how().

This doesn't allow to remove @tag_fixme_vpp_workers from the unit tests
yet as they will be failing for other multi-worker related problems.

Type: fix
Change-Id: Ia35e3a4176777b88cf8ca8af8af7c42c495cbc6a
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2024-01-02 23:08:59 +00:00
b1ea30e563 http: unify client/server state machines
Type: improvement

Change-Id: I57a816fbed8b681dec201edc8d5950a34a555a2b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-02 12:07:04 +00:00
b7e66f4a30 docs: minor updates to the lxc container test writeup
Fix minor differences between Ubuntu 18.04 LTS and Ubuntu 22.04 LTS when
using the scheme to test new code.

Type: docs

Change-Id: I5810b6f3d76d8d98fa764b61828b1ca32507bd91
Signed-off-by: Dave Barach <dave@barachs.net>
2023-12-29 11:19:37 -05:00
44d9cbc49c session: add flag to track cless sessions
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0bb6aba26f1cd974d6bb3b5fe6234aacfee0d30c
2023-12-22 22:30:09 -05:00
98d24a5fea hs-test: more proxy vars for docker builds
Type: improvement

Change-Id: Ica9d87abde7a1dc0b4007911a7e0abab46dfb75d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-12-23 01:01:09 +00:00
a77d4ca32a tests: Temporarily skip an unstable test
Type: test

Change-Id: Idd608511ed350a8e13afff393e558e20d52627a0
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-22 17:32:10 +00:00
f26bbeac4b hs-test: use prebuilt curl with http3 support
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4d17ae3f7736dc10c68ca6e304699ea39d012f6c
2023-12-22 17:19:11 +00:00
7e452ba15c quic: seed random generator during init
Quic does not seed random value, so if the plugin is loaded
separately RAND_bytes will fail.

Type: fix

Change-Id: If600cbde1fef30afb6316fc1a355261b008c3191
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-22 16:49:57 +00:00
b1454f89b5 session: unset fifo evt to enqueue ack evt on tcp timewait
Incase the ack for the fin is lost twice or want to dup ack
packets with incorrect ack/seq # at different times and
session state is already closed, this fifo event is set for
the first ack that went out and prevents queuing of further events.

Type: fix
Change-Id: I102019fca26918a51e055a751db7209011bd43ad
Signed-off-by: emmanuel <emmanuelscaria11@gmail.com>
2023-12-22 16:27:48 +00:00
e1489260ca vlib: lowercase vmbus device names
Use lowercased hex in uuid in sysfs/vmbus names

Type: fix

Change-Id: Ic4b7b995441723dc1b29ff8a75346cc8ba7f85f1
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2023-12-22 15:46:51 +00:00
832342e3a4 vlib: add error checks to thread pinning
Type: fix

Added error checks around pthread_setaffinity_np
calls to stop vpp launch if pinning fails.

Change-Id: Iec391c485d1832b6c2ff20fbf789608f6bcf7b57
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-22 15:45:07 +00:00
ccc17f0a70 build: fix 'make test' target to build with clang
- gmake set CC=cc as the default therefore the test/test-debug
  makefile targets will build using gcc (cc == gcc for debian/ubuntu
  distros) unless set explicitly to clang due to use of 'CC=$(CC)' in
  test macro.

  Note: the CI builds vpp images prior to running 'make test', thus
  the CI does test vpp built using clang.  This basically makes local
  runs of 'make test' build using clang as well.

Type: make

Change-Id: I7221098c200be23b53bb616e41a42a6d65a03699
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-12-22 14:32:38 +00:00
95f07a16ae build: add .cmake to gitignore
Type: improvement
Change-Id: I3047b4a750581d68053f522479b23865e3da2505
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-22 14:23:00 +00:00
82a68e91d0 buffers: add vlib_buffer_unalloc_to_pool()
Change-Id: Icd616989a525ef0be6c73a2ad91ae4871cf3921d
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-21 20:23:41 +00:00
28b6dfa723 dev: per-queue format callbacks
Change-Id: Ia9fa6fab6288b4d0876022e72bf4f49bd00a19d2
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-21 15:55:39 +01:00
f3b0004f8a fib: format deleted LB
This patch allows the formatting of deleted Load-balancer
objects. This is needed in the case a trace references a DPO
that went away in the interim.

Type: improvement

Change-Id: I6d67519b8d62f69aafde3c8fe3065bc85a7adbde
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-21 11:39:08 +01:00
70335e8e50 tests: memif interface tests using libmemif
Type: test

Change-Id: I711dfe65ad542a45acd484f0b4e3e6ade9576f66
Signed-off-by: Naveen Joy <najoy@cisco.com>
2023-12-21 00:53:44 +00:00
00c59e4965 virtio: virtio_flags api use enumflag instead of enum
In the API there is a difference between enum and enumflags.
The latter one allowing multiple set entitires, while enum
only allows one.

Type: fix
Change-Id: I5db88c15c85fc6c7130b7b35febcd1ea02ef8f76
Signed-off-by: Ole Troan <otroan@employees.org>
2023-12-20 20:52:33 +00:00
68ac244283 srv6-mobile: Implement SRv6 mobile API funcs
This merge request adds the feature to manipulate localsids and policies for SRv6 mobile via API.

Type: feature
Signed-off-by: Takeru Hayasaka <hayatake396@gmail.com>
Change-Id: Ibb46bf71ae1d9d4591ce2c8ccf66f520887dad70
2023-12-20 17:30:19 +00:00
69f800fbfd devices: add cli support to enable disable qdisc bypass
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic124f44e64bd60f41e750b4118be3e8d1d1eb70b
2023-12-15 18:09:45 +00:00
48744b9aa3 hs-test: decrease docker image size
Type: test

Change-Id: Ic1ad2f1f983ad8f8e8e8813f941e11757930c92e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 17:50:06 +00:00
5ebdd51c60 hs-test: remove unnecessary app ns configs
Type: test

Change-Id: I0226227dc756a5a3af5e9d3b0d65a38c0aa55b3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 13:38:31 +01:00
c6fe617490 tests: Added bpf trace filter plugin test
Type: test

Change-Id: I026d9298fe1372d03f61b6ad57c82628bab4c831
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-15 09:53:29 +00:00
04d262d1eb rdma: add rdma_create_v4 that handles flags properly
The _v3 was not handling endianness on flags (e.g. mode).
Marking _v3 as deprecated, but keeping it
as there might be users who learned to preprocess their flag values.

+ Also, format PCI product_name as a vector, not a string.

Type: fix

Change-Id: I50c4b44f3570f02518dbd9a43239c1a37612d24a
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-12-15 08:44:10 +00:00
6d14c0cc5a session: add forced reset api to ct transport
Type: improvement

Change-Id: Iebf9ee8275a92e962679e3d0d22d33ed0bd8b3ab
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-12-15 00:47:49 +00:00
86b02c728c tls: no closed notify if no app session
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0e58bb970d371818217390d451cf26925b04970f
2023-12-14 22:58:31 +00:00
bc67e9fd20 bpf_trace_filter: allow use whithout classifier
Change-Id: I7ac5693ca547fe7249e7b6297bade70a6052b169
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
2023-12-14 16:29:53 +00:00
a474bc8a3b tls: postpone ho cleanup if not fully established
If ho cleans up on first worker before owner of established session
receives connected notification, the ho session is prematurely cleaned
up.

Wait for established ctx to be allocated before freeing ho.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icf707e5d8c62a288a49d078460d2ada3b5c41b0e
2023-12-13 16:51:22 +00:00
2ae8f79b50 cnat: undo fib_entry_contribute_forwarding
Type: fix

Change-Id: I9df43a34328209c87177a534d08919dda0af6096
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-12 14:06:19 +00:00
b1a1209ce9 dpdk: bump rdma-core to 49.0
- Per dpdk 23.11 release notes (rdma-core >= 48.0)

Type: feature

Change-Id: I6f73fdfd2226c501d22cd16e5c47500ff05fbff3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-12-12 12:10:40 +00:00
8fce546370 ipsec: allow receiving encrypted IP packets with TFC padding
Type: feature
Change-Id: I7b29c71d3d053af9a53931aa333484bf43a424ca
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2023-12-12 09:02:03 +00:00
b321325a47 vppinfra : fix alignment issue
Type: fix

Modified alignment cast causing crash issues

Change-Id: Iae3bb767ef2ba81466bf1567264a4c76ae45bb92
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-11 04:47:11 +01:00
d1eb1b7523 dev: caps and rx/tx offload support
Type: improvement
Change-Id: I7972f595444eacdb020f3fa2a60331c40766fc0b
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-08 16:02:36 +01:00
31d4891cfe dpdk: never override devname if set via config
Even if the device name is specified in the startup config it may
be appended to if the device is a switch domain member. This leads
to unexpected device naming if an explicit device name was requested.

Type: fix
Change-Id: Ib56b4ac41c17008db55dc69497721e3cb7d540c1
Signed-off-by: Peter Morrow <pdmorrow@gmail.com>
2023-12-08 12:43:10 +00:00
864eaae5bb dpdk-cryptodev: fix crypto-dispatch node stats
This patch introduces a fix for correcting a counter for the number
of processed vectors in the crypto-dispatch node.

Type: fix

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: Icaeb925a352a9ac766652f43c4e752f6727cdeb9
2023-12-07 15:45:36 +00:00
caf12e6ab6 misc: fix tracedump show graph out-of-buffer
Use the correct string type for vlib_get_node_by_name. Found by ASAN.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I679d27050487e013e3320a4c558d78fa60c5e98a
2023-12-07 15:44:43 +00:00
adb2c67992 crypto-ipsecmb: bump intel-ipsec-mb version to 1.5
This patch update the Intel IPsec-MB lib to v1.5

Type: feature

Change-Id: Ib2b5d28866f52d428d9400318cffcae11f935c3f
Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
2023-12-07 10:16:49 +00:00
535364e904 vnet: allow format deleted swifidx
This patch prevents the sw interfaces format
function to fail when the interface was deleted.
It also prints the swifindex alongside the 'DELETED'
keyword.

Printing deleted swifindex should not happen, but it is still
helpful to have these safeguards for troubleshooting in the case
invariants get corrupted (e.g. fib entry refcounts, ...)

Type: improvement

Change-Id: I66711049db2eebe0ad17e37c3a260ac81d1e5134
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-12-07 10:14:49 +00:00
327c323065 dpdk: bump to DPDK 23.11
This patch bumps DPDK version to 23.11

Type: feature

Change-Id: Id19fa6e2789ffa3264614a011656dfe2303173ab
Signed-off-by: Kai Ji <kai.ji@intel.com>
2023-12-07 10:13:03 +00:00
e60386b99b tests: tracedump test replace hardcoded value
Type: fix

Fetch 'pg-input' node index instead
of using a hardcoded value

Change-Id: I1ca27ddb54806530b546085d83e83b880acc4573
Signed-off-by: hsandid <halsandi@cisco.com>
2023-12-07 10:04:07 +00:00
4cdf30dcec iavf: set max_pkt_size even for disabled queues to make i40e PF driver happy
Type: improvement
Change-Id: I3daf6c32888a15c7ef1f32e729c1e23765d14dc6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-05 13:28:24 +01:00
7fa1674c19 l2: resolve l2 rewrite entry 'hit_count' always being 0 bug
The hit_count does not implement the corresponding processing logic, and here the missing is fixed

Type: fix
Fixes: missing

Change-Id: I04a8e11d6b48c2a15c371cbeb2467fa89a9d82bb
Signed-off-by: yanlong <dyl_wlc@163.com>
2023-12-05 10:09:46 +00:00
7521d6745a http: fix coverity warning
Type: fix

Change-Id: I659a67293763a6035cfa64a4057ebf716fe93ab4
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-04 17:28:33 +00:00
4338683b07 iavf: add missing cfg_change_validate callback
Type: fix
Fixes: 47447f1f
Change-Id: I438f5535bc48ca5397b8f5d3fbbd893ca6a511b4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 16:35:10 +00:00
c6ae4999d2 iavf: workaround for case when PF driver sends zero for max_mtu
Type: improvement
Change-Id: Ie4b2b958a24cdde8c183b700d864fc6f5b0df08f
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 12:27:19 +00:00
39e79fdf30 dev: mark API handlers as thread safe
Type: improvement
Change-Id: I2acab04ddb6a46a637ed17c683fb37ed7bce3df6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-04 09:09:34 +00:00
94a52d795d session: no segment handle on worker del
Coverity report.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3ce06634b30688d2a9581b50d462092daa8b4cac
2023-12-02 23:37:19 +00:00
2c5e2184ef vcl: remove perror ldp call
Reported by coverity

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idae1bceb1eeb6dfe0394eed39ced9d09342d201f
2023-12-01 23:37:47 +00:00
d053508fcf ipsec: should use praddr_ instead of pladdr_
Type: fix

Change-Id: I982ef624226807d7c263e3ff83c108f7d31f61f1
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
2023-12-01 17:16:07 +00:00
ef75a543fa tests: Added tracedump plugin tests
Type: test

Change-Id: Ie054924eb5e5b2b146db8d2b63511c8b0400f045
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-12-01 17:11:33 +00:00
9ec6f59d94 iavf: limit maximum number of queues to 32
First genaration of AVF APIs we currently use doesn't support more...

Type: improvement
Change-Id: I1ae27f322403a2b455fcad8b028fa2004b449789
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-12-01 13:30:39 +00:00
3a9c3ebcc1 dev: use the endian reply macro
Checkstyle also forces the new indentation.

Type: fix
Fixes: ddf6cec370

Change-Id: Ife96928d6ca30ba94e1c423d557d6ed9d68eca2b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-30 17:42:25 +01:00
cc1475cdc2 hs-test: add http prom test
Type: test

Change-Id: Ia15ecc3cf2c087a6959601ff02e187c32570ff60
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-11-30 03:33:02 +00:00
18710d58f0 session: no reply on app del worker with sapi
With socket api, applications should not expect reply after worker del
msg. VCL in particular closes the socket after it enqueues the message.

Found by ASAN.

Type: fix

Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1be02a0cde6b96a96edb709f3fe30bbc01ff2d24
2023-11-29 17:01:08 +00:00
1b75fdbda0 vcl: fix init of ldp workers
LDP workers is used as vector but was initialized as a pool. There was
no side effect but ASAN does not properly unpoison memory and this
triggers false used-after-poison crashes.

Type: fix

Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie769dad0e86ab970de9929800d0a4131f846e70e
2023-11-29 17:00:24 +00:00
557b20c4ea tcp: fix rxt send of new data assert
We might have less than 1 mss when attempting write but more after
write, as application could be actively enqueuing more data. Relax
assert.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I54a83c4460f8e022a88758f0ebd7828df711dbb9
2023-11-29 16:59:36 +00:00
32c00ce79a pci: fix MSI-X vector length check
Type: fix
Fixes: 38c6191
Change-Id: I7760947986dc56236f2494fb1c8c238321489ef6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-29 12:35:06 +00:00
e32580caa8 tcp: allow unsent segments less than mss in recovery
During recovery, send unsent data even if less than mss available as
application is not guaranteed to provide more.

This should speed up recovery when all data in flight was lost.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7a3c73a0d04d93d51a5910d85450c173c3ad8e93
2023-11-28 22:41:14 +00:00
6ae6c98d7c tcp: add counter for accepted connections
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2925134cfcfa36c14b3b69efa892b9b96fce2e6f
2023-11-28 22:02:16 +00:00
bffd4461d2 session: fix asan failure
fix asan failure when params number is less then 3:
functions that are set as format_half_open pointer values have
different number of arguments

Type: fix
Fixes: de9a849a18
Change-Id: I6b6e1adf4ffc0c1ec847613f00fe269af640d42b
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
2023-11-28 21:32:03 +00:00
953fbd2b24 tests: fix default node variant in tests
Pass a correct form of node variant config in tests

Type: fix
Signed-off-by: d-valter@yandex-team.ru
Change-Id: I8cdc240b18a1664e57a5814d6cd644891c99f515
Fixes: 8800f732f8
2023-11-28 20:48:31 +00:00
6160f2ddb2 tests: Added NSIM plugin tests
Type: test

Change-Id: Id621a806b853688ced7c6a38e1a9e5f298d2b97e
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-28 20:39:37 +00:00
87a8826d17 tests: refactor pcap file deletion to improve robustness
Type: test

Change-Id: I504c079126bd8b33c5e217a1b9086788a8c778e5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-28 03:34:49 +00:00
4b08632748 fib: fix fib_path_create() with drop targets
Properly set type
	path->fp_type = FIB_PATH_TYPE_SPECIAL
for paths with (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_DROP)

Type: fix

Change-Id: Id61dbcda781d872b878e6a6410c05b840795ed46
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
2023-11-27 22:07:43 +00:00
176cff55b1 tests: Excluded some components from LCOV
Type: test

Change-Id: I387611cfc361e664eb1e78ae669ba4e3901c4fe6
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-27 20:39:32 +00:00
1f4023d55d bfd: fix buffer leak when cannot send periodic packets
When a periodic BFD packet cannot be sent because the interface is
disabled, the allocated buffer needs to be freed. This currently will
occur for IPv4 sessions. However, buffers will leak for IPv6 sessions as
in this case, bfd_transport_control_frame() and bfd_transport_udp6()
will not indicate failure.

With this fix, stop always returning success in bfd_transport_udp6() and
start returning the actual return value.

Type: fix
Change-Id: I5fa4d9206e32cccae3053ef24966d80e2022fc81
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-27 18:53:43 +00:00
a2be1cffbe tcp: allow multiple rxt rescues during recovery
Type: improvement

Change-Id: Ia8d7cd6ff9b1449d986d514d9556cbf803deb670
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-11-27 18:50:34 +00:00
ddf6cec370 dev: initial set of APIs
Type: improvement
Change-Id: I9ecbf705d460a1744f36c7005b08097dc58d9522
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-25 12:39:25 +00:00
07a62cc236 dev: fix null dereference of arg list
Type: fix
Fixes: 69768d9
Change-Id: Iafd3a55634583f2799a81c477ccbf5e53b6f29d0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-24 13:25:26 +00:00
20e37d2639 avf: put sentinel at correct place
The previous fix was adding the sentinel before refilling rx,
which gave the NIC time to overwrite it with a new descriptor.

Ticket: VPP-2087
Type: fix
Fixes: 8b4d474abd

Change-Id: I32bde4a763a62fb66c5c3871d9f10af6066e2d47
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-22 13:39:47 +01:00
9375266bd3 session: per app wrk client ct segment handle
Make sure ct client segment handles do not collide if multi worker
application establishes cut-through sessions to only one server segment
manager.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I905379f9ed73c64d57a826a3e97d53dab3a87517
2023-11-22 00:58:53 +00:00
23b6a9ebeb virtio: fix cli parsing for tx-queue-size
The previous change made CSIT virtio tests fail,
but those tests are not part of trending.

Ticket: VPP-2088
Type: fix
Fixes: a181eaa59b

Change-Id: If0439a030c051894e07007da9cf0a2e4dc1434c3
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2023-11-21 12:45:39 +00:00
894d0a6762 session: add session lookup cli for stats
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I96bff47206ef64ea7369ae92e1b9ff1f74dfd71b
2023-11-20 16:13:44 +00:00
c4d989d6f3 dpdk: fix description for mlx5_pci driver
This is because mlx5_pci is also compatible with another
series of NICs such as ConnectX-5 and ConnectX-6.

Type: fix
Change-Id: I10f0468bbe36ab61c72fb3dc0aa898f8e2f9e88c
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2023-11-20 11:51:01 +09:00
cfe6462fd2 session: always clear rx evt flag on ntf
Apps may drain fifos prior to handling of accept notification, e.g.,
vcl session relying on epoll lt mode.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7d105d35a6bf33c419f4f137a5132e6a5d294fe7
2023-11-17 12:08:58 +00:00
dac9e566cd ipsec: keep esp encrypt pointer and index synced
Type: fix

In esp_encrypt_inline(), an index and pointer to the last processed SA
are stored. If the next packet uses the same SA, we defer on updating
counters until a different SA is encountered.

The pointer was being retrieved, then the SA was checked to see if the
packet should be dropped due to no crypto/integ algs, then the index was
updated. If the check failed, we would skip further processing and now
the pointer refers to a different SA than the index. When you have a
batch of packets that are encrypted using an SA followed by a packet
which is dropped for no algs and then more packets to be encrypted using
the original SA, the packets that arrive after the one that was dropped
end up being processed using a pointer that refers to the wrong SA data.
This can result in a segv.

Update the current_sa_index at the same time that the sa0 pointer is
updated.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I65f1511a37475b4f737f5e1b51749c0a30e88806
2023-11-17 11:15:31 +00:00
862097a166 dev: startup.conf handling improvements
Type: improvement
Change-Id: I74fb01061b4949d68ec39d0b7d08e6df8dc44b98
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-16 20:33:31 +00:00
69768d99ee dev: device and port specific args
Type: improvement
Change-Id: I26124a50d8e05d6f01a2e6dbc4bc8183fb5a09c4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-16 16:01:35 +00:00
f3be34e443 dhcp: api to enable client detect on interface
DHCPv4 aka BOOTP is somewhat awkward. A DHCP client
on an interface must receive DHCP packets to
the broadcast address or to a unicast address.
Apparently before it's been assigned to itself.

Add this new API to allow external DHCP clients
enable the DHCP client detect feature per interface.

Type: improvement
Change-Id: If55aac03f25a045496be483940e4f5e7e18885b9
Signed-off-by: Ole Troan <otroan@employees.org>
2023-11-16 15:38:51 +00:00
4b89013081 misc: VPP 23.10 Release Notes
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Icd40064c06ccc53efba1cd9564613108b999b656
(cherry picked from commit 7c4027fa5e)
2023-11-15 16:16:08 +00:00
ac49cf9205 docs: Remove references to vlan-strip-offload as it is deprecated
Type: fix

Change-Id: I3a258433cf507f48cd67332387eb7fef103a88f8
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-11-15 14:07:33 +00:00
bae6b6d1f2 flowprobe: fix L3 header offset calculation for tx flows
The recent TX flows generation fix introduced "l3_hdr_offset" which
represents the offset of the IP header in the buffer's data. The problem
is that it is erroneously defined as a 16-bit unsigned integer. If the
calculated offset is negative, "l3_hdr_offset" will get a value close to
UINT16_MAX. And the code will search the IP header somewhere beyond the
buffer's data. For example, this will occur in the case when an ICMP
error is being sent in response to a received packet.

With this fix, make "l3_hdr_offset" a signed integer.

Type: fix
Change-Id: I6f1283c7ba02656d0f592519b5863e68348c5583
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-14 22:06:53 +00:00
dd8f8dec50 vppinfra: respect indent in format_table
Change-Id: Ib7e5cb5adfe81e5cc6243125d91f5179608a7733
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-14 21:33:09 +00:00
f6f21db2e3 vppinfra: add unformat_{single,double}_quoted_string function
Change-Id: I8ee90be1b772074c1130b98c71b3be48c973b2e2
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-14 21:32:22 +00:00
1b86f0f477 tests: retry unlinking pcap files on os error
Type: test

Change-Id: I270798ed68f04bd3974dd39c44e85dad5fa02de0
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-14 17:23:49 +00:00
2d725c6128 ena: Amazon Elastic Network Adapter (ENA) native driver
Type: feature
Change-Id: Icd9de05f2cbac0e5a6dfb1f1414f21dc4b893104
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-13 19:05:17 +00:00
e596ca1b51 dev: add change_max_rx_frame_size capability
Type: improvement
Change-Id: I922e216818b78f2fe7689c21a1d27d74a0ae28b8
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-13 12:21:45 +00:00
64d6463d2e flowprobe: fix tx flows generated for rewritten traffic
Currently, when IPFIX records generation is enabled for an interface in
the TX direction, some rewritten traffic is being sent from that
interface, and the Ethernet header's location has changed due to
rewriting, generated TX flows will contain fields with wrong and zero
values. For example, that can be observed when traffic is rewritten from
a subinterface to a hardware interface (i.e. when tags are removed). A
TX flow generated in this case will have wrong L2 fields because of an
incorrectly located Ethernet header. And zero L3/L4 fields because the
Ethernet type will match neither IP4 nor IP6.

The same code is executed to generate flows for both input and output
features. And the same mechanism is applied to identify the Ethernet
header in the buffer's data. However, such general code usually works
with the buffer's data conditionally based on the direction. For most
input features, the buffer's current_data will likely point to the IP
header. For most output features, the buffer's current_data will likely
point to the Ethernet header.

With this fix:
 - Keep relying on ethernet_buffer_get_header() to locate the Ethernet
   header for input features. And start using vlib_buffer_get_current()
   to locate the Ethernet header for output features. The function will
   account for the Ethernet header's position change in the buffer's
   data if there is rewriting.

 - After fixing Ethernet header determination in the buffer's data,
   L3/L4 fields will contain non-zero but still incorrect data. That is
   because IP header determination needs to be fixed too. It currently
   relies on the fact that the Ethernet header is always located at the
   beginning of the buffer's data and that l2_hdr_sz can be used as an
   IP header offset. However, this may not be the case after rewriting.
   So start calculating the actual offset of the IP header in the
   buffer's data.

 - Add a unit test to cover the case.

Type: fix
Change-Id: Icf3f9e6518912d06dff0d5aa48e103b3dc94edb7
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-12 21:52:13 +00:00
4aaedaa2ff tls: fix forced ho cleanup
Do not force cleanup of tcp half-open connection if tcp's cleanup
notification to tls is pending.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I7bccbe8429a4aab10df1c89b66138b967e04ac19
2023-11-10 17:48:33 +00:00
f9ab6985d4 gtpu: support non-G-PDU packets and PDU Session
Updated the gtpu plugin code to support the PDU Session user plane protocol, required for 5G, as
specified in 3GPP TS 38.415 version 17.0.0. This enables some initial support of 5G gNodeB's with
the gtpu plugin.

New features:
- Basic support for the GTP-U Extension Header Flag.
Packets with one extension can now be decapsulated.
This enables basic support of the PDU Session user plane protocol (3GPP TS 38.415 version 17.0.0).
New tunnels can be created with a PDU enable flag and a 6-bit QoS Flow Identifier (QFI).
With this, encapsulated packets will have the PDU Session extension header, and the QFI set.

- Ability to forward GTP-U packets that are not handled by the plugin directly.
Only GTP-U packets with a message type of 255 (G-PDU) are handled directly.
However, 3GPP TS 29.281 defines several other message types like echo and error indication.
A new feature is added to optionally forward unknown or unsupported packets to a new IP address.
This works separately for unknown GTP-U message types, unknown TEIDs, and packets with an unknown
GTP-U header.
This allows both echo and error indications from a 5G gNodeB to be handled by a different system
outside VPP.

- Simple way to get metrics for active tunnels and on tunnel close.
In 5G session/tunnel lifetime is often short and created frequently.
The normal API becomes too slow and inaccurate when too many tunnels are created and deleted
every second.

Improvements:
- A clean ground structure to handle multiple message type in the future.
The code path for G-PDU packets is optimized for performance, representing the typical case.
Unsupported GTP-U packets enter a slow path that decodes the nature of the error.
This presents a easy hook to handle other message types in the future.

- Improved error reporting
When using traces there is more details in the tunnel descriptions.

- Updated the API with several enums.

Fixes:
- gtpu0->length field in IPv6 was computed with IPv4 header lengths in the encapsulation code.
- vec_set_len (t->rewrite, ...) size was computed with the IPv4 header size also for IPv6 tunnels.

Issues:
- This PR does not enable full support of the 3GPP specification.
In particular it only supports a single QoS/QFI flow for each tunnel.
It ignores all incoming extension header flags.

- API functions might change again when/if more support of the 3GPP TS 38.415 spec is added.

Note that I have bumped the API version to 2.1.0 as it seems to be the correct approach based on
my API changes.

Type: feature

Signed-off-by: Rune E. Jensen <runeerle@wgtwo.com>
Change-Id: I91cd2b31f2561f1b3fb1e46c4c34a5a3c71b4625
2023-11-10 14:39:39 +00:00
5cc67aacf0 tests: perfmon - Added a check if test is running with root privileges
Type: test

Change-Id: I1910f3ef79e9018aee032daca0f1932eccb7b9f9
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-10 11:45:25 +01:00
67f03ba71d iavf: interrupt mode support
Type: improvement
Change-Id: Ie5fcaa706ab0995e0021cf1ee74b95c5a3b30283
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-09 19:56:35 +00:00
14bfd3d8b8 tls: fix handling of client and server init errors
- notify app on failed connect
- avoid cleanup of ctx before transport cleanup to be able to handle
pending rx notifications.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I1b70ad45109d4c942afa1990dfce4fc44a50a637
2023-11-09 19:14:12 +00:00
115e31b43f ipsec: IPsec fix constant propagation
In some anti-replay, some functions weren't using the boolean
telling if the window was huge or not. Hence, limiting the constant
propagation at compilation.

Type: fix
Change-Id: Ie5f2dda38339bb32113c6f7b2b82c82135fc92a8
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2023-11-09 14:24:25 +00:00
0fbf07ed7f tls: propagate transport closed notifications
Notify app that transport is closed when tcp moves to closed state.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I18cbe1ac16b1a48ecd06af4c1b5535e12e4b0e75
2023-11-08 23:36:06 +00:00
cfc2a0e688 tls: avoid reads after tcp transport removed
Make sure underlying transport connection is not removed on rescheduled
read event.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0137a2e43aa84d9442279e036c25771aeefd207f
2023-11-08 14:16:24 -08:00
098ee3aaf1 tests: Fix http static test failing on retry
- test_http_static.py: If namespace creation fails, try to delete the namespace and create it again
- vpp_qemu_utils.py: Added "isinstance()" to "delete_namespace()" to match "create_namespace()"

Type: test

Change-Id: I88ff7a36f5d52816fee16283efba6af025496491
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 20:36:49 +00:00
e59761f721 tests: added a simple perfmon plugin test
Type: test

Change-Id: Ief0c0e13a2c19a03b48219d9a0d85256fb0c9dbe
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 17:08:34 +00:00
22b4a9c732 tests: added simple CT6 plugin tests
Type: test

Change-Id: I77f119ac982170627484d792dc456753c9847af8
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-11-08 17:05:43 +00:00
449c677440 dev: remove unused code
Change-Id: If380e4ab6ca30243137fd31fbe51845c0414721a
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-08 13:40:50 +00:00
b8dd9815ef dev: interrupt mode support
Type: improvement
Change-Id: I4a0578598182339bcf76e6b01da76b590a06f773
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-08 13:28:19 +00:00
29d07dbef9 af_packet: remove UNIX_FILE_EVENT_EDGE_TRIGGERED flag
af_packet does not process data until the interface is UP. If after interface creation, but before it is UP, the host interfaces are flooded, then blocking case may occur - VPP interface will never be able to process the data.
If the EDGE_TRIGGERED flag is set, the event will not arrive, because nothing new is happening anymore (probably because the queue is already full).
Therefore, we need to use LEVEL_TRIGGERED (default value), which indicates that there is still unprocessed data (accumulated after interface creation, but before it was UP).

Type: fix

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Change-Id: Ied459fd194149d09f226bcb0a5907b3e327b148a
2023-11-07 14:03:01 +00:00
dab1dfeea9 flowprobe: fix clearing interface state on feature disabling
As a result of recent fixes, all currently stored flows of an interface
are deleted when the feature is being disabled for the interface. This
includes stopping the timer and freeing the flow entries for further
reuse. The problem is that meta information is not cleared in the flow
entries being deleted. For example, packet delta count will keep its
value. The next flow that gets one of these pool entries will already
have a non-zero packet count. So the counting of packets will start from
a non-zero value. And incorrect packet delta count will be exported for
that flow.

With this fix, clear meta information too when clearing interface state.
Also, update the corresponding test to cover this case.

Type: fix
Change-Id: I9a73b3958adfd1676e66b0ed50f1478920671cca
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-11-07 14:01:13 +00:00
92ab407a59 build: disable bogus warnings for GCC 12
The array bounds and string overread check on GCC 12 report a dozen of
false positives that result in VPP build failures on ubuntu 22.04.
Work around this build issue by unconditionally disabling these two
warnings if C compiler is GCC 12 or newer version.

Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I999e847bb625ebdf3ef5f11b11598c553f306670
2023-11-07 10:58:50 +00:00
76d14b797c misc: silence -Wmaybe-uninitialized warnings
GCC 12 complains about such errors while the code itself looks good.

Type: fix
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I021719fdbf7d9bd93a12eac76aeac8cbca13a810
2023-11-07 10:58:50 +00:00
e73c731ad8 vppinfra: fix ASAN issue in vec_foreach_pointer and pool_foreach_pointer
Change-Id: If9381ae7283488b352a3c22f85732cd56ac6bfd9
Type: fix
Fixes: 9937359, 91ff0e9
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 17:40:07 +00:00
4504df795b ipsec: delete redundant code
Type: fix

Change-Id: I0de1c51455b0d3958c75ab5626a318ac656adbe7
Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
2023-11-06 17:38:05 +00:00
505f4e1db1 dpdk: correct the printing of Rx offloading flags
DPDK added new Rx checksum flags[1] to handle cases like the virtual
drivers. Current check of flags is not strict enough for flags like
RTE_MBUF_F_RX_IP_CKSUM_NONE and will always be true no matter the
checksum in packet is good or bad.
Fix this issue by comparing the result of AND operation with the
correspinding Rx checksum flags.

Before this patch, packet trace prints the offload flags as below:

    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_IP_CKSUM_NONE (0x0090) no IP cksum of RX pkt.
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_NONE (0x0108) no L4 cksum of RX pkt.

After this patch, packet offload flags would be like:

    Packet Offload Flags
      PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
      PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid

Type: fix

[1] 5842289a54

Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I3182022d9ccd46b2fc55bb3edfbfac9062ed7c89
2023-11-06 10:21:35 +00:00
7444fd2a0d pci: remove unnecessary ioctl() call and improve logging in vfio_set_irqs
Type: improvement
Change-Id: Ic8e2785bf375882defe5a1d299948d522cdd4895
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 10:15:12 +00:00
60529a8ef8 pci: fix VFIO set IRQ code
Type: fix
Fixes: 599a16b
Change-Id: I954e037ab944028798f9aa2a93f45322c8c7b4bb
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-06 00:09:23 +00:00
9c6fd897fd bonding: add checks for sw_if_index in api
Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I16b48460b3fcd82bbb89c375402cb2455414d8bb
2023-11-04 01:55:39 +00:00
7f75e80f08 vppinfra: refactor interrupt code
Type: improvement
Change-Id: Ie6987736faf7d8a641762e276775da8ee0c03ea4
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-03 22:56:29 +00:00
236fae462a tests: allow explicit defaults for arg types
Allow settings default values explicitly in positive_int_or_default and
positive_float_or_default.

It allows setting setting default 0 test retries explicitly despite it
being not positive.

Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Id23a9fdae0ef174eea8992c1f9fc2530aade6194
2023-11-03 20:13:58 +00:00
6bd6c80f27 dev: strip debig log function name prefix during compilation
Type: improvement
Change-Id: I9b9bb37a0895366b412f042b0e2da5bbdd477325
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-03 09:26:47 +00:00
8800f732f8 tests: refactor asf framework code
- Make framework.py classes a subset of asfframework.py classes
- Remove all packet related code from asfframework.py
- Add test class and test case set up debug output to log
- Repatriate packet tests from asf to test directory
- Remove non-packet related code from framework.py and
  inherit them from asfframework.py classes
- Clean up unused import variables
- Re-enable BFD tests on Ubuntu 22.04 and fix
  intermittent test failures in echo_looped_back
  testcases (where # control packets verified but
  not guaranteed to be received during test)
- Re-enable Wireguard tests on Ubuntu 22.04 and fix
  intermittent test failures in handshake ratelimiting
  testcases and event testcase
- Run Wiregard testcase suites solo
- Improve debug output in log.txt
- Increase VCL/LDP post sleep timeout to allow iperf server
  to finish cleanly.
- Fix pcap history files to be sorted by suite and testcase
  and ensure order/timestamp is correct based on creation
  in the testcase.
- Decode pcap files for each suite and testcase for all
  errors or if configured via comandline option / env var
- Improve vpp corefile detection to allow complete corefile
  generation
- Disable vm vpp interfaces testcases on debian11
- Clean up failed unittest dir when retrying failed testcases
  and unify testname directory and failed linknames into
  framwork functions

Type: test

Change-Id: I0764f79ea5bb639d278bf635ed2408d4d5220e1e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-03 05:06:43 +00:00
af5684bf18 tcp: fix reset w pkt
Do not add ip header as that's added by tcp output and fix checksum.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I9439acf5c66184af0350b1d4d7406b3feb2e79a1
2023-11-02 22:12:15 +00:00
e3f59e2ae2 tests: remove packet debug output from npt66 testcases
Type: test

Change-Id: I1883b50f67890aefb28ca0ca7447f4e73c574d26
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-11-02 21:24:30 +00:00
47447f1f59 iavf: new driver using new dev infra
Type: feature
Change-Id: I9ae0dbf28b4571a37c568b587b771f90c06f200d
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-02 16:08:57 +00:00
38c619115b dev: new device driver infra
Type: feature
Change-Id: I20c56e0d3103624407f18365c2bc1273dea5c199
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-11-02 13:41:32 +00:00
d3ef00098c tcp: remove redundant ack checks
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4001f39afde8c33b60c15f74034bcce013fbbf70
2023-11-01 22:58:32 +00:00
7499591bff tcp: allow ooo data in syn-rcvd
As long as ack and segment are legitimate accept ooo data as we
transition to established.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I85cdc65d70cb8ae689a9ce9bbe4f86228b1ac533
2023-11-01 22:58:16 +00:00
ea309c4660 tcp: postpone cleanup on connect failures
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I231b319d4d7aa3e17cc8cfe8aaa4762995a5b2c4
2023-11-01 20:33:44 +00:00
6e66ea75a0 tests: fix UDP port range for mdata and bufmon
- Use of well known UDP port numbers causes random
  failure of mdata and bufmon tests

Type: test

Change-Id: I21a01c54e5f166aea101d3caace85b53f3f7285d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-31 23:20:47 -04:00
e75176a257 docs: Updated "VPP with Containers" use-case section
Type: improvement

Modified "VPP with Containers" doc section to run on Ubuntu 22.04 LTS.

Change-Id: Ic09b88cf0e3b492711222a1bb24552de964a7d03
Signed-off-by: hsandid <halsandi@cisco.com>
2023-10-31 23:54:28 +00:00
e908fe7e47 tests: http static - skip if cannot create namespaces
Type: test

Change-Id: I5fddb293f1b56853613ca2823dbb6d3d887d9929
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-31 15:29:08 +00:00
4a8fde0e51 hsa: use common app session interface in echo tests
Type: test

Change-Id: Ib320cfb5e20f12614c013a92ac15490f8ca3a7ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-31 15:27:55 +00:00
2d7988d719 ipsec: separate UDP and UDP-encapsulated ESP packet processing
This fix differentiates UDP and UDP-encapsulated ESP packets processing.
While UDP-encapsulated ESP traffic is processed as IPsec traffic, UDP as
other plain-text protocols is NOT dispatched against SPD policies.
Key logic is taken from RFC 3948, and is based on the fact
that the checksum of UDP packet encapsulating ESP packet must be zero.

Type:  fix

Signed-off-by: vinay tripathi <vinayx.tripathi@intel.com>
Change-Id: Ib1b4d240eea8e89f2daf17ec833905f26cdb31bd
2023-10-31 11:41:54 +00:00
bc5f530599 ipsec: modify IPsec related tests to send and verify UDP-encapsulated ESP traffics
In this patch, IPsec related test files have been modified to send UDP-encapsulated
ESP packets,and validate against Inbound and Outbound policies that are configured
with Bypass, Discard and Protect action.

Type: test

Change-Id: I4b8da18270fd177868223bfe1389dc9c50e86cc5
Signed-off-by: vinay Tripathi <vinayx.tripathi@intel.com>
2023-10-31 10:33:13 +00:00
75069cee95 ipsec: move udp/esp packet processing in the inline function ipsec_esp_packet_process
This inline function is introduced to simplify code readability and allows to splitting of
UDP and ESP processing in the next step.

Type: improvement

Change-Id: Ida4d6abbed141ac74d4d285900777778eb8a5a1d
Signed-off-by: Vinay Tripathi <vinayx.tripathi@intel.com>
2023-10-31 10:32:52 +00:00
485f7bcccb tests: Added LLDP plugin tests
Type: test

Change-Id: I5a2d1b2c92f2bb7c45a7b5e025584d9417487840
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-30 21:23:01 +00:00
30f2600dcf tests: Added http static server tests.
Coverage increased from 21% to 80%

Type: test

Change-Id: Ic8ecc620cef738d7dbe4c259f58a373ac155a588
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-30 21:17:56 +00:00
c78eeaba49 hsa: preallocate sessions on server side
Type: test

Change-Id: Ib809f5a6c9e2f08d87f0070231df04d5f0040ca0
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-30 15:56:38 +00:00
f4e3ee1dd1 vcl: propagate correctly EADDRINUSE for UDP bind
Change-Id: Ia8b5421cbaaf861ddb3ad7aeca53a077ff18864e
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: fix
2023-10-30 15:48:34 +00:00
0e2f188f7c ipsec: huge anti-replay window support
Type: improvement

Since RFC4303 does not specify the anti-replay window size, VPP should
support multiple window size. It is done through a clib_bitmap.

Signed-off-by: Maxime Peim <mpeim@cisco.com>
Change-Id: I3dfe30efd20018e345418bef298ec7cec19b1cfc
2023-10-30 15:23:13 +00:00
21922cec73 flowprobe: fix accumulation of tcp flags in flow entries
Currently, TCP flags of a flow entry don't get reset once the flow is
exported (unlike other meta information about a flow - packet delta
count and octet delta count). So TCP flags are accumulated as long as
the flow is active. When the flow expires, it is exported the last time,
and its pool entry is freed for further reuse. The next flow that gets
this pool entry will already have non-zero TCP flags. If it's a TCP
flow, the flags will keep being accumulated. This might look fine when
exported. If it's a non-TCP flow, that will definitely look erroneous.

With this fix, reset TCP flags once the flow is exported. Also, cover
the reuse case with tests.

Type: fix
Change-Id: I5f8560afffcfe107909117d3d063e8a69793437e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-30 13:32:50 +00:00
4197fb95f2 session: fix bind replies with errors
Type: fix

Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icdff3528fcaf863b400b9aca6c30d284bc17d5f0
2023-10-27 16:15:58 +00:00
81c8514219 hsa: fix coverity warning
Type: test

Change-Id: Iba94edb7eb439ddc994d9a16cb52108373d052ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-27 15:28:29 +00:00
4e8f9be435 devices: remove unused code
Type: improvement
Change-Id: I2427e1a93e89e9a7ac884b84352b96cf523ae11e
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-26 19:45:59 +00:00
efe875e7cd hsa: unify echo test setup
Type: test

Change-Id: I8665492c2f7755901a428aacdb27e98329ff557a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-26 16:32:17 +00:00
4d05f069a3 tests: Added bufmon plugin test
Coverage increased from 35% to 94%

Type: test

Change-Id: I9a54a58bf53b29a771a93ce03998e95fbcd518eb
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-26 15:45:11 +00:00
5ca8bfcacb build: allow for reproducible builds
Setting and using the SOURCE_DATE_EPOCH variable takes
care of most of the magic necessary.
https://reproducible-builds.org/docs/source-date-epoch/

vpp-ext-deps packages after this change is being built with that
date set to date of the last modification of the
subtree (similar logic to deriving the "number" for
the package version)

For the rest of the packages, pinning the following
three variables should result in bit-identical
artifacts across multiple runs:

export SOURCE_DATE_EPOCH=$(date +%s)
export VPP_BUILD_HOST="buildhost"
export VPP_BUILD_USER="builduser"

Add a blurb in the docs describing this new functionality.

Type: improvement
Change-Id: I71b085f0577b2358aa98f01dafd8e392239420a6
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2023-10-26 12:09:44 +00:00
e9d7babde0 lisp: fix missing symbol issue
Type: fix
Change-Id: I9373dabcdb2c4ba987e732b59e63b52603010873
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 15:20:28 +00:00
6facf8cd45 tests: Added mdata plugin test
Coverage increased from 54% to 92%

Type: test

Change-Id: Ibb26f2b8989c5bb2826190c961bffe2c21c3f9a2
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 15:13:29 +00:00
55a1f288ed buffers: buffer name is vector, not c string
Type: fix
Fixes: 8973b07
Change-Id: Iba6e29bab35be0148b469965c3af8391b5ab9140
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 11:51:30 +00:00
29de4694e6 marvell: fix compilation issues
Type: fix
Fixes: unknown
Change-Id: I81ee03aaea2e1e6ffb9d6ee91db7fb9acd6debb7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-25 11:36:46 +00:00
9e5694b405 fib: only update glean for interface if necessary
Type: improvement

If an interface address is added, the glean adjacency for it's covering
prefix is updated with that address. In the case of multiple addresses
within the same prefix being added, the most recently added one will end
up being used as the sender protocol address for ARP requests.

Similar behavior occurs when an interface address is deleted. The glean
adjacency is updated to some appropriate entry under it's covering
prefix. If there were multiple interface addresses configured, we may
update the address on the adjacency even though the address currently in
use is not the one being deleted.

Add a new value PROVIDES_GLEAN to fib_entry_src_flag_t. The flag
identifies whether a source interface entry is being used as the address
for the glean adjacency for the covering prefix.

Update logic so that the glean is only updated on adding an interface
address if there is not already a sibling entry in use which has the
flag set. Also, only update the glean on deleting an interface address
if the address being deleted has the flag set.

Also update unit test which validates expected behavior in the case
where multiple addresses within a prefix are configured on an interface.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I7d918b8dd703735b20ec76e0a60af6d7e571b766
2023-10-25 08:46:20 +00:00
52aaa9b0ac tests: Added STN plugin test to improve coverage.
Type: test

Change-Id: I30dfaed684e1f808089bb8eb301486434425ccd7
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 02:15:54 +00:00
4450aed056 tests: Added a simple Snort plugin test to increase coverage.
Type: test

Change-Id: I96ec8b4347210672bc587407ab2fd0f0305ea486
Signed-off-by: adrianvillin <avillin@cisco.com>
2023-10-25 01:53:43 +00:00
51880abac1 dpdk: fix variable type in pattern parsing
In current pattern parsing function in DPDK, some of the variables of
packet length are defined as uint8_t, which are too small for some
large-size packets, such as srv6. Change the type to uint16_t.

Type: fix

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I06819e9716da098ca456c0405f0e6fd9a8eb0bc9
2023-10-24 22:14:03 +00:00
e8e4b5f9af crypto: fix algo selection
Check if crypto ops vector is matching actual ops instead if blindly
dereferencing it.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Ib88ab44137d9360ee96228e72349a62b2fa7a7e0
2023-10-24 22:13:43 +00:00
6b027cfdbc flowprobe: fix sending L4 fields in L2 template and flows
Currently, when L2 and L4 recording is enabled on the L2 datapath, the
L2 template will contain L4 fields and L2 flows will be exported with
those fields always set to zero.

With this fix, when L4 recording is enabled, add L4 fields to templates
other than the L2 template (i.e. to the IP4, IP6, L2_IP4, and L2_IP6
templates). And export L2 flows without L4 fields. Also, cover that case
in the tests.

Type: fix
Change-Id: Id5ed8b99af5634fb9d5c6e695203344782fdac01
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-18 21:01:03 +00:00
34c721fb47 memif: contention between memif_disconnect and memif RX/TX threads
memif_disconect may be called without barrier sync. It removes stuff in mq
without protection which may cause troubles for memif RX/TX worker threads.

The fix is to protect mq removal in memif_disconnect.

Type: fix

Change-Id: I368c466d1f13df98980dfa87e8442fbcd822a428
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-10-18 09:16:35 +00:00
bf236630f5 buffers: introduce vlib_buffer_template_t
Type: improvement
Change-Id: Ie86a5edf2ada21355543e9a0382052b16ff86927
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-17 17:44:41 +00:00
0094fe0190 tcp: initialize connection index on rst w packet
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie01d7e8d6eddf3ba88f2cd6eb8369c8ec8179cb4
2023-10-16 20:01:02 +00:00
da2ae9af61 tcp: allow fins in syns in syn-rcvd
Also make sure connection is properly cleaned up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I02f83e9a1e17cbbbd2ee74044d02049b2fd2f21c
2023-10-16 20:00:49 +00:00
61d63e8323 tcp: handle syn-ack in fin-wait-2 in rcv process
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If74e04498423bed42593e79ec92482421cfda8d2
2023-10-16 20:00:31 +00:00
dbeb56d2da ip-neighbor: do not use sas to determine NS source address
Using the source address selection algorithm to determine the best source
of an NS for address resolution risks incompatible behavior.
It may choose a source address that is off-link to the other host.
Which may drop it.

A safer approach is to always use the link-local address as the SA.
It's recommended to pick a source that an application will later use,
as VPP is mostly a router, that rarely applies. And regardlessly we have
no mechanism to signal from an application that triggered address resolutiuon
what source address it intends to use.

Type: fix
Change-Id: I3c5de66e41505f3682767706ef1195a20e4f0e54
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 14:48:46 +00:00
f68afe85a6 flowprobe: fix corrupted packets sent after feature disabling
When IPFIX flow record generation is enabled on an interface and the
active timer is set, flows will be saved and then exported according to
the active and passive timers. If then disable the feature on the
interface, the flow entries currently saved will remain in the state
tables. They will gradually expire and be exported. The problem is that
the template for them has already been removed. And they will be sent
with zero template ID which will make them unreadable.

A similar problem will occur if feature settings are "changed" on the
interface - i.e. disable the feature and re-enable it with different
settings (e.g. set a different datapath). The remaining flows that
correspond to the previous feature settings will be eventually sent
either with zero template ID or with template ID that corresponds to the
current feature settings on the interface (and look like garbage data).

With this fix, flush the current buffers before template removal and
clear the remaining flows of the interface during feature disabling.

Type: fix
Change-Id: I1e57db06adfdd3a02fed1a6a89b5418f85a35e16
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-16 13:13:55 +00:00
da34f4add5 nat: add ipfix rate-limiter for nat44-ed, nat44-ei and nat64
This prevents ipfix flood with the repeating events and allows
to enable nat64 max_session and max_bibs events. Also fix wrong
endian for det44 and nat64 ipfix tests, now should be fine with
extended tests enabled.
Max session per user event @ nat44-ei requires more precise rate
limiter per user address, probably with sparse vec, not handled.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib20cc1ee3f81e7acc88a415fe83b4e2deae2a836
2023-10-16 13:13:00 +00:00
ff344a98af npt66: icmp6 alg to handle icmp6 error messages
Support rewriting the inner packet for ICMP6 error messages.

Type: feature
Change-Id: I7e11f53626037075a23310f1cb7e673b0cb52843
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 10:59:22 +00:00
1fe132ec1a ip-neighbor: add ip neighbor flush
Flushing the neighbor cache was only available through API.
Add CLI command. Either flushes whole table (IP4,IP6)
or all neighbors on specified interface.

Type: improvement
Change-Id: Ia8c68fb032a2dfd940a136edc2aee80db5c37685
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-16 10:52:51 +00:00
d0ffa26a0e feature: remove unused code
Type: improvement
Change-Id: If775b1d145e462346de562a3c893f302e8c7b814
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-14 09:58:10 +00:00
a164636106 linux-cp: check if lcp_itf_pair exists before creating tap
Now we create tun/tap and then check whether lcp_itf_pair was already
created. Move the check in the beginning.

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: I848685a9cfdbe92a5e38ecb8e5d5322262b4e384
2023-10-13 20:45:57 +00:00
8a92b68bc8 ethernet: run callbacks for subifs too when mac changes
When MAC address changes for an interface, address change callbacks are
executed for it. In turn adjacencies register a callback for MAC address
changes to be able to update their rewrite strings accordingly.

Subinterfaces inherit MAC address from the parent interface. When MAC
address of the parent interface changes, it also implies MAC address
change for its subinterfaces. The problem is that this is currently not
considered when address change callbacks are executed. After MAC address
change on the parent interface, packets sent from subinterfaces might
have wrong source MAC address as the result of stale adjacencies. For
example, ARP messages might be sent with the wrong (previous) MAC
address and address resolution will fail.

With this fix, when address change callbacks are executed for an
interface, they will be also executed for its subinterfaces. And
adjacencies will be able to update accordingly.

Type: fix
Change-Id: I87349698c10b9c3a31a28c0287e6dc711d9413a2
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-13 18:39:00 +00:00
29aabcf8f6 vlib: properly replicate nexts when sibling node is created on runtime
Change-Id: I5aff21b5ca32e7eb84b11cca8387e7ac42fbbe23
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-13 10:39:24 +00:00
c9275dadef vlib: allow unpriviledged vlib_pci_get_device_info()
When running unpriviledged sysfs allows reading only first
64 bytes of PCI config space.

Change-Id: I62d18328925a2e4936406c2842154b20182cacb9
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-13 10:39:10 +00:00
bdeee2194b npt66: add show command and rx/tx counters
Add show npt66 bindings.
Add RX/TX and translation error counters.

Type: improvement
Change-Id: I4513b111f815a15d5a7537ce503f0c084b523aa1
Signed-off-by: Ole Troan <otroan@employees.org>
2023-10-13 08:27:26 +00:00
054aa8c2f2 session: fix duplicate rx events
Be less aggressive with rx events on connect/accept notification.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie93a08c7eef69383bf0301a163fd2131dd51372a
2023-10-12 23:21:31 +00:00
120095d3d3 flowprobe: fix sending L2 flows using L2_IP6 template
Currently, L2 flows are exported using L2_IP6 template if L3 or L4
recording is enabled on L2 datapath. That occurs because during feature
enable, L2 template is added and its ID is not saved immediately. Then
L2_IP4 and L2_IP6 templates are added overwriting "template_id" each
time. And in the end, the current value of "template_id" is saved for L2
template. The problem is that "template_id" at that point contains the
ID of L2_IP6 template.

With this fix, save the template ID immediately after adding a template
for all variants (datapaths). Also, cover the case with a test.

Type: fix
Change-Id: Id27288043b3b8f0e89e77f45ae9a01fa7439e20e
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
2023-10-12 22:15:20 +00:00
006c071b0a dpdk: add Mellanox BlueField NICs
List BlueField NICs as a supported PCI devices.

Type: feature
Change-Id: Ida2300df516ab9cd2fcde1f816bbdc081016039a
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
2023-10-12 20:44:48 +00:00
947aa8fffc session: ignore connecting half_open session in session_tx_fifo_dequeue_internal
s->tx_fifo is 0 for the connecting half open session.

Type: fix

Change-Id: I2ba1ae99a2fa4fae1896587f40e0e4fb73c1edcb
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-10-12 18:06:39 +00:00
733e093e70 tls: Fix SSL_CTX leak on every client session
Type: fix

Change-Id: I35b3920288269073cdd35f79c938396128d169c9
Signed-off-by: Brian Morris <bmorris2@cisco.com>
2023-10-11 20:12:50 +00:00
9eaf377a38 session: ignore app rx ntf if transport closed
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id56a101a6350903b00f7c96705fb86039e70e12c
2023-10-11 19:23:38 +00:00
fa9f37c15c session: fix tx deq ntf assert for cl
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I97a04ed0417f1a3433665f6aa1a9424138fd54cb
2023-10-11 19:23:26 +00:00
21bc900c34 lb: fix intermittent per-port-vip idx lookup failure
- Causes per-port-vip testcases to fail when the
  uninitialized reserved field in the stack variable
  key for the hash lookup was a non-zero stack memory
  location.

Type: fix

Change-Id: I56afa15e7df60bc2340514f2c7ce5e71a9cb47a9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-10 23:19:18 -04:00
84c9ee3d69 session: maintain old state on premature close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2ea821e0499a3874c4579f5480ea86f30ebe615f
2023-10-10 15:59:16 +00:00
05cc62dd50 vppinfra: fix coverity issue CID 323952
Type: fix
Fixes: 08600ccfa

Change-Id: I53ba0d96507b55ab7cd735073d6c4cf20a3cc948
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-10-09 18:05:47 -04:00
65dc34bb0b buffers: buffer allocation improvements
- pass buffer pool name trough va
- make buffers naturaly aligned
- fix calculation of total number of buffers

Type: improvement
Change-Id: I6aebf249ebd67823b4632ac08905bfa3aa7d1ee5
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-09 09:58:37 +00:00
aa7b88120a tls: propagate reads to app irrespective of state
Session input node handles rx notifications even if session not fully
accepted/connected

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I6560c45db8f8e0b7f0dc3bdd0939f13ca2f43f15
2023-10-08 00:16:56 +00:00
a3d55df1e9 tls: report error if connected cannot be initialized
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I987ac6b461b473836917bce6ce0d4ac109cc8ddb
2023-10-08 00:10:52 +00:00
3843d0dd03 tls: no read after app close
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I34f8ee2e36d07e8e55e21561528fc6b73feb852f
2023-10-08 00:10:32 +00:00
431b489c5a session: propagate delayed rx evts after connect/accept
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4a2e8f864df7269ec5a3c4fd4d8785a67b687d58
2023-10-07 14:23:18 -07:00
9ffec14a22 session: handle accept and connect errors
If builtin apps refuse connections, they should be cleaned up.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I95ef22902ac3fe873e15e250aa5f03031c2dc0c4
2023-10-07 10:03:56 -07:00
589fe7ca61 cnat: add flow hash config to cnat translation
Type: feature

this patch adds a hash config field to cnat translation
to use it in load balancing instead of always using default one

Change-Id: I5b79642ca8b365b5dcc06664f6c100a9d3830a29
Signed-off-by: hedi bouattour <hedibouattour2010@gmail.com>
2023-10-06 18:18:00 +00:00
b953532ed4 vpp-swan: fix config to run containers
This patch changes config to run containers on Ubuntu 22.04.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3be48099cb48d2c4a04526c15780244614bef3d4
2023-10-05 10:37:37 +00:00
08600ccfa1 vppinfra: fix string termination in clib_file_get_resolved_basename
Type: fix
Fixes: 40f4810
Change-Id: Idf51462c8154663de23154f17a894b7245c9fbf0
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-04 18:03:25 +02:00
e111bbd121 session: make port range configurable
Type: feature

This patch makes the port range used by the transport layer
configurable in the manner of sysctl's ip_local_port_range.

Change-Id: Ie17f776538311b29d1dca64643a3a0bd74cb90a6
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2023-10-03 16:28:36 +00:00
bc37878ecb build: add ability to disable some plugins from packaging and tests
When custom-packaging the VPP artifacts, it can be useful to exclude
some of the core plugins from packaging/testing, for some reasons.
A removal of a plugin(s) from the worktree needs to be tracked as
a separate change, and thus is tricky from the maintenance
point of view.

This change adds the ability to "pretend they do not exist" -
plugins which are added to the comma-separated environment
variable "VPP_EXCLUDED_PLUGINS" will not be added to the build
process and not packaged.

The tests do not have the 1:1 relationship as plugins,
so they might need to be modified separately. This change
includes some of these modifications as an example.

Type: feature
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: Id31562d00a01ced1acbb4996a633517cbd6f09d8
2023-10-03 13:23:25 +00:00
08057947f3 vppinfra: add foreach_int macro
foreach_int(x, 1, 3, 5, 7)
   {
     fformat(stdout, "x is %u\n", x);
   }

Type: improvement
Change-Id: Idc355f4a284f421b150e3acb7a3a57bcede408c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-03 12:19:58 +00:00
029bff4b9a vppinfra: splat and gather vector inlines
Type: improvement

Change-Id: I4b00b3a6ff63fc8b313c89217ccdea356c0783a3
Signed-off-by: Damjan Marion <damarion@cisco.com>
2023-10-03 12:19:33 +00:00
1457828c59 nat: nat66 cli bug fix
Two similar CLI paths in nat66 plugin cause
unexpected behavior. Bug fix following [1] fix.

[1] https://gerrit.fd.io/r/c/vpp/+/35859

Change-Id: I771dd230fa6edb6bab3936652770a388d6e41a3f
Type: fix
Signed-off-by: Filip Varga <fivarga@cisco.com>
2023-10-03 08:03:10 +00:00
5299164022 stats: added optional CLI arg "port" to specify non-default port
There are cases where default port for prometheus exporter is not
available e.g. when multiple vpp are running on single node.

Type: improvement
Change-Id: I39701486f9dfaf4dc9f08aab56e88126687b507a
Signed-off-by: Fahad Khan <fahadnaeemkhan@gmail.com>
2023-10-03 08:01:35 +00:00
c1b038001e tls: limit openssl engine max read burst
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic7a8fd37d79fc9c09c8b1539d630f3b8983b8bb3
2023-10-02 20:23:06 +00:00
d69ef3aeeb tls: fix formatting of half open connections
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If96dc748a716a261edfcb1020210bd73058e382f
2023-10-02 17:38:11 +00:00
6cb7273949 flow dpdk avf: add support for using l2tpv3 as RSS type
This patch adds support for using l2tpv3 as RSS type

Type: feature
Signed-off-by: Xinyao Cai <xinyao.cai@intel.com>
Change-Id: Ic3e0935a4754d084184f1cc38ea9531ddfd9e7bc
2023-10-01 21:17:07 +00:00
bef2d6da4e build: modify N_PREFETCH on Arm N2 to achieve best perf
From GCC 12, march=armv9-a option is supported, which includes the sve
and crc options needed. Furthermore, VPP L3Fwd benchmark results on N2
based servers show that N_PREFETCH set to 6 gives the best performance.

Type: feature

Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Signed-off-by: Jieqiang Wang <jieqiang.wang@arm.com>
Change-Id: I9c4fcad84d4db1189d956dabab22b26d020fbfd6
2023-10-01 21:11:32 +00:00
e7f34c93b1 fib: Crash when specify a big prefix length from CLI.
The VPP is crashing when specify a very big prefix length, like
ip route add 1.1.1.1/55 via 2.2.2.2

Type: fix

Signed-off-by: Gavril Florian <gflorian@3nets.io>
Change-Id: Ic491c0b24e07be897ff35ae1e835280f04ab3ea5
2023-10-01 20:59:58 +00:00
35f8ee6921 crypto: update maintainer email
Update my email address in maintainer document.

Type: improvement

Change-Id: I8ba518fa4c9cb414342383e1461f3f94b661ac33
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
2023-09-28 15:09:12 +00:00
7cc17f6df9 dpdk-cryptodev: improve dequeue behavior, fix cache stats logging
This patch provides minor improvements to the logic governing dequeuing
from the ring. Previously whenever a frame was dequeued
we've been trying to dequeue from the ring another one till
inflight == 0. Now threshold is set for 8 frames pending in the cache
to be consumed by the vnet. This threshold has been chosen based on
cache ring stats observation in the system under load.
Some unnecessary logic for setting deq_tail has been removed.
Also logging has been corrected, and cache ring logic simplied.

Type: improvement
Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
Change-Id: I19f3daf5913006e9cb23e142a163f596e85f5bda
2023-09-28 15:07:52 +00:00
029f039d5d dpdk: add ConnectX-6LX and ConnectX-7 support
List Mellanox ConnectX-6LX and ConnectX-7 as a supported PCI devices.

Type: feature
Change-Id: Ieeca3f214d08f29238c387354055ac1320cab75f
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
2023-09-28 12:36:21 +00:00
a127d3c157 tls: init connection for prealloced app sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Icd62dc110e3a73b24372f3a5162f8008b7edee9f
2023-09-26 22:06:09 +00:00
bb1cde678e ping: Simple binary API for running ping based on events
Type: improvement
Change-Id: I02846a2420637470cb0f9472c86471b6a3421a75
Signed-off-by: NikitaSkrynnik <nikita.skrynnik@xored.com>
2023-09-26 20:45:28 +00:00
40242b88e9 crypto-ipsecmb: bump intel-ipsec-mb version to 1.4
Type: feature

This patch update the Intel IPsec-MB lib to v1.4
Remove v0.54 and v0.55 support, as the compatible IMB APIs
are deprecated in v1.4

Signed-off-by: Ranjan Raj <ranjanx.raj@intel.com>
Change-Id: I01f71134c6bd17a68ec20b7bb4b0b0ff43fc644b
2023-09-26 15:07:32 +00:00
d732f34911 fib: fix mpls label dpo drop proto
Next drop node should be related to payload protocol.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: If12e8dc8b19c61f8c96c275b3f9e565e91ecdbed
2023-09-26 02:37:20 +00:00
08ba422739 fib: fix mpls label dpo packets prefetching
Four packets are batched after 696e88da97,
so prefetch is required for the next 4-7 packets, not for 2-5.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I4ab01e66c3b446caf113a154915473e96ab32198
2023-09-25 03:11:30 +05:00
3952879609 fib: Don't use an address from an attached prefix when sending ARP requests.
Change-Id: I4c3144794dd0bd7de6150929e53f6d305c496b17

Type: fix
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I7b0c2c2dec5e867970599b8f2f2da17f2ff0b17c
2023-09-24 02:29:00 +00:00
25801d6d2a udp: fix udp encap tracing
Correct trace functions correspond with the encap type rather than with
the payload type.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: Iea1eb08a2ce9d147984ef604c7a39c62c7330e80
2023-09-23 17:29:50 +00:00
00d7d86be7 tls: ignore tx events for not fully established sessions
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I401a116a1a46c0dc5d591115de5ff0eef2f6440b
2023-09-22 19:27:03 -07:00
597 changed files with 36244 additions and 7403 deletions

View File

@ -20,15 +20,25 @@ ForEachMacros:
- 'vec_foreach_index_backwards'
- 'vec_foreach_pointer'
- 'vlib_foreach_rx_tx'
- 'foreach_int'
- 'foreach_pointer'
- 'foreach_vlib_main'
- 'foreach_set_bit_index'
- 'foreach_vlib_frame_bitmap_set_bit_index'
- 'FOREACH_ARRAY_ELT'
- 'RTE_ETH_FOREACH_DEV'
- 'foreach_vnet_dev_rx_queue_runtime'
- 'foreach_vnet_dev_counter'
- 'foreach_vnet_dev_port_rx_queue'
- 'foreach_vnet_dev_port_tx_queue'
- 'foreach_vnet_dev_port'
- 'foreach_vnet_dev_args'
- 'foreach_vnet_dev_port_args'
StatementMacros:
- 'CLIB_MULTIARCH_FN'
- 'VLIB_NODE_FN'
- 'VNET_DEV_NODE_FN'
- 'VNET_DEVICE_CLASS_TX_FN'
- '__clib_section'
- '__clib_aligned'

1
.gitignore vendored
View File

@ -130,6 +130,7 @@ compile_commands.json
/lib
/.ninja_deps
/.ninja_log
/.cmake
/CMakeCache.txt
/build.ninja
/cmake_install.cmake

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/2402

View File

@ -98,6 +98,11 @@ I: policer
M: Neale Ranns <neale@graphiant.com>
F: src/vnet/policer/
VNET New Device Drivers Infra
I: dev
M: Damjan Marion <damarion@cisco.com>
F: src/vnet/dev/
VNET Device Drivers
I: devices
Y: src/vnet/devices/pipe/FEATURE.yaml
@ -194,7 +199,7 @@ VNET IPSec
I: ipsec
M: Neale Ranns <neale@graphiant.com>
M: Radu Nicolau <radu.nicolau@intel.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/vnet/ipsec/
VNET Crypto Infra
@ -226,12 +231,12 @@ F: src/plugins/crypto_openssl/
Plugin - Crypto - ipsecmb
I: crypto-ipsecmb
M: Neale Ranns <neale@graphiant.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/crypto_ipsecmb/
Plugin - Crypto - sw_scheduler
I: crypto-sw-scheduler
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugs/crypto_sw_scheduler/
VNET L2
@ -405,6 +410,22 @@ I: avf
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/avf/
Plugin - IAVF Device driver
I: iavf
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_iavf/
Plugin - Amazon Elastic Network Adapter (ENA) device driver
I: ena
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_ena/
Plugin - Marvell Octeon device driver
I: octeon
M: Monendra Singh Kushwaha <kmonendra@marvell.com>
M: Damjan Marion <damarion@cisco.com>
F: src/plugins/dev_octeon/
Plugin - Dispatch Trace PCAP
I: dispatch-trace
M: Dave Barach <vpp@barachs.net>
@ -419,7 +440,7 @@ F: src/plugins/dpdk/
Plugin - DPDK Crypto
I: dpdk-cryptodev
M: Radu Nicolau <radu.nicolau@intel.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/dpdk/cryptodev/
Plugin - flowprobe
@ -665,7 +686,7 @@ F: src/plugins/snort/
libmemif
I: libmemif
M: Damjan Marion <damarion@cisco.com>
M: Mohsin Kazmi <sykazmi@cisco.com>
F: extras/libmemif
gomemif
@ -751,7 +772,7 @@ F: src/plugins/cnat
Plugin - Wireguard
I: wireguard
M: Artem Glazychev <artem.glazychev@xored.com>
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
F: src/plugins/wireguard
Packetforge
@ -854,7 +875,7 @@ F: src/extras/rpm/opensuse
VPP StrongSwan Daemon
I: vpp-swan
M: Fan Zhang <roy.fan.zhang@intel.com>
M: Fan Zhang <fanzhang.oss@gmail.com>
M: Gabriel Oginski <gabrielx.oginski@intel.com>
F: extras/strongswan/vpp_sswan

View File

@ -14,7 +14,7 @@
export WS_ROOT=$(CURDIR)
export BR=$(WS_ROOT)/build-root
CCACHE_DIR?=$(BR)/.ccache
SHELL:=/bin/bash
SHELL:=$(shell which bash)
GDB?=gdb
PLATFORM?=vpp
SAMPLE_PLUGIN?=no
@ -81,6 +81,7 @@ DEB_DEPENDS += iperf3 # for 'make test TEST=vcl'
DEB_DEPENDS += nasm
DEB_DEPENDS += iperf ethtool # for 'make test TEST=vm_vpp_interfaces'
DEB_DEPENDS += libpcap-dev
DEB_DEPENDS += tshark
LIBFFI=libffi6 # works on all but 20.04 and debian-testing
@ -105,6 +106,12 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-11)
DEB_DEPENDS += virtualenv
DEB_DEPENDS += clang clang-format-11
LIBFFI=libffi7
else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-12)
DEB_DEPENDS += virtualenv
DEB_DEPENDS += clang-14 clang-format-14
# for extras/scripts/checkstyle.sh
export CLANG_FORMAT_VER=14
LIBFFI=libffi8
else
DEB_DEPENDS += clang-11 clang-format-11
LIBFFI=libffi7
@ -197,6 +204,7 @@ ifneq ($(wildcard $(STARTUP_DIR)/startup.conf),)
endif
ifeq ($(findstring y,$(UNATTENDED)),y)
DEBIAN_FRONTEND=noninteractive
CONFIRM=-y
FORCE=--allow-downgrades --allow-remove-essential --allow-change-held-packages
endif
@ -290,7 +298,7 @@ help:
$(BR)/.deps.ok:
ifeq ($(findstring y,$(UNATTENDED)),y)
make install-dep
$(MAKE) install-dep
endif
ifeq ($(filter ubuntu debian linuxmint,$(OS_ID)),$(OS_ID))
@MISSING=$$(apt-get install -y -qq -s $(DEB_DEPENDS) | grep "^Inst ") ; \
@ -363,7 +371,7 @@ endif
install-deps: install-dep
define make
@make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
@$(MAKE) -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
endef
$(BR)/scripts/.version:
@ -428,9 +436,9 @@ rebuild-release: wipe-release build-release
export TEST_DIR ?= $(WS_ROOT)/test
define test
$(if $(filter-out $(2),retest),make -C $(BR) PLATFORM=vpp TAG=$(1) CC=$(CC) vpp-install,)
$(if $(filter-out $(2),retest),$(MAKE) -C $(BR) PLATFORM=vpp TAG=$(1) CC=$(CC) vpp-install,)
$(eval libs:=lib lib64)
make -C test \
$(MAKE) -C test \
VPP_BUILD_DIR=$(BR)/build-$(1)-native/vpp \
VPP_BIN=$(BR)/install-$(1)-native/vpp/bin/vpp \
VPP_INSTALL_PATH=$(BR)/install-$(1)-native/ \
@ -446,10 +454,16 @@ endef
.PHONY: test
test:
ifeq ($(CC),cc)
$(eval CC=clang)
endif
$(call test,vpp,test)
.PHONY: test-debug
test-debug:
ifeq ($(CC),cc)
$(eval CC=clang)
endif
$(call test,vpp_debug,test)
.PHONY: test-cov
@ -497,15 +511,15 @@ papi-wipe: test-wipe-papi
.PHONY: test-wipe-papi
test-wipe-papi:
@make -C test wipe-papi
@$(MAKE) -C test wipe-papi
.PHONY: test-help
test-help:
@make -C test help
@$(MAKE) -C test help
.PHONY: test-wipe
test-wipe:
@make -C test wipe
@$(MAKE) -C test wipe
.PHONY: test-shell
test-shell:
@ -538,27 +552,27 @@ test-wipe-doc:
.PHONY: test-wipe-cov
test-wipe-cov:
$(call make,$(PLATFORM)_gcov,$(addsuffix -wipe,$(TARGETS)))
@make -C test wipe-cov
@$(MAKE) -C test wipe-cov
.PHONY: test-wipe-all
test-wipe-all:
@make -C test wipe-all
@$(MAKE) -C test wipe-all
# Note: All python venv consolidated in test/Makefile, test/requirements*.txt
.PHONY: test-checkstyle
test-checkstyle:
$(warning test-checkstyle is deprecated. Running checkstyle-python.")
@make -C test checkstyle-python-all
@$(MAKE) -C test checkstyle-python-all
# Note: All python venv consolidated in test/Makefile, test/requirements*.txt
.PHONY: test-checkstyle-diff
test-checkstyle-diff:
$(warning test-checkstyle-diff is deprecated. Running checkstyle-python.")
@make -C test checkstyle-python-all
@$(MAKE) -C test checkstyle-python-all
.PHONY: test-refresh-deps
test-refresh-deps:
@make -C test refresh-deps
@$(MAKE) -C test refresh-deps
.PHONY: retest
retest:
@ -620,7 +634,7 @@ debug:
.PHONY: build-coverity
build-coverity:
$(call make,$(PLATFORM)_coverity,install-packages)
@make -C build-root PLATFORM=vpp TAG=vpp_coverity libmemif-install
@$(MAKE) -C build-root PLATFORM=vpp TAG=vpp_coverity libmemif-install
.PHONY: debug-release
debug-release:
@ -658,15 +672,15 @@ pkg-deb-debug:
.PHONY: pkg-rpm
pkg-rpm: dist
make -C extras/rpm
$(MAKE) -C extras/rpm
.PHONY: pkg-srpm
pkg-srpm: dist
make -C extras/rpm srpm
$(MAKE) -C extras/rpm srpm
.PHONY: install-ext-deps
install-ext-deps:
make -C build/external install-$(PKG)
$(MAKE) -C build/external install-$(PKG)
.PHONY: install-ext-dep
install-ext-dep: install-ext-deps
@ -713,12 +727,12 @@ checkstyle-commit:
.PHONY: checkstyle-test
checkstyle-test:
$(warning test-checkstyle is deprecated. Running checkstyle-python.")
@make -C test checkstyle-python-all
@$(MAKE) -C test checkstyle-python-all
# Note: All python venv consolidated in test/Makefile, test/requirements*.txt
.PHONY: checkstyle-python
checkstyle-python:
@make -C test checkstyle-python-all
@$(MAKE) -C test checkstyle-python-all
.PHONY: checkstyle-all
checkstyle-all: checkstyle-commit checkstyle checkstyle-python docs-spell
@ -730,7 +744,7 @@ fixstyle:
# Note: All python venv consolidated in test/Makefile, test/requirements*.txt
.PHONY: fixstyle-python
fixstyle-python:
@make -C test fixstyle-python-all
@$(MAKE) -C test fixstyle-python-all
.PHONY: checkstyle-api
checkstyle-api:
@ -774,22 +788,22 @@ wipe-doxygen:
.PHONY: docs-%
docs-%:
@make -C $(WS_ROOT)/docs $*
@$(MAKE) -C $(WS_ROOT)/docs $*
.PHONY: docs
docs:
@make -C $(WS_ROOT)/docs docs
@$(MAKE) -C $(WS_ROOT)/docs docs
.PHONY: pkg-verify
pkg-verify: install-dep $(BR)/.deps.ok install-ext-deps
$(call banner,"Building for PLATFORM=vpp")
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
@$(MAKE) -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
$(call banner,"Building sample-plugin")
@make -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
@$(MAKE) -C build-root PLATFORM=vpp TAG=vpp sample-plugin-install
$(call banner,"Building libmemif")
@make -C build-root PLATFORM=vpp TAG=vpp libmemif-install
@$(MAKE) -C build-root PLATFORM=vpp TAG=vpp libmemif-install
$(call banner,"Building $(PKG) packages")
@make pkg-$(PKG)
@$(MAKE) pkg-$(PKG)
# Note: 'make verify' target is not used by ci-management scripts
MAKE_VERIFY_GATE_OS ?= ubuntu-22.04
@ -799,11 +813,11 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
$(call banner,"Testing vppapigen")
@src/tools/vppapigen/test_vppapigen.py
$(call banner,"Running tests")
@make COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
@$(MAKE) COMPRESS_FAILED_TEST_LOGS=yes RETRIES=3 test
else
$(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
endif
.PHONY: check-dpdk-mlx
check-dpdk-mlx:
@[ $$(make -sC build/external dpdk-show-DPDK_MLX_DEFAULT) = y ]
@[ $$($(MAKE) -sC build/external dpdk-show-DPDK_MLX_DEFAULT) = y ]

View File

@ -42,4 +42,4 @@ external_configure = echo
external_build = echo
external_install = make $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install
external_install = $(MAKE) $(DPDK_MAKE_ARGS) -C external ebuild-build ebuild-install

View File

@ -30,6 +30,15 @@ vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)"
ifeq ("$(V)","1")
vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
endif
ifneq ($(VPP_PLATFORM),)
vpp_cmake_args += -DVPP_PLATFORM="$(VPP_PLATFORM)"
endif
ifneq ($(VPP_EXCLUDED_PLUGINS),)
vpp_cmake_args += -DVPP_EXCLUDED_PLUGINS="$(VPP_EXCLUDED_PLUGINS)"
endif
ifneq (${SOURCE_DATE_EPOCH}),)
vpp_cmake_args += -DVPP_SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)"
endif
ifneq ($(VPP_EXTRA_CMAKE_ARGS),)
vpp_cmake_args += $(VPP_EXTRA_CMAKE_ARGS)

View File

@ -39,7 +39,7 @@
######################################################################
# Scripts require non-POSIX parts of bash
SHELL := /bin/bash
SHELL := $(shell which bash)
# Where this makefile lives
MU_BUILD_ROOT_DIR = $(shell pwd)
@ -365,7 +365,7 @@ NATIVE_TOOLS_$(IS_LINUX) += $(NATIVE_TOOLS_LINUX)
CROSS_TOOLS_$(IS_LINUX) += glibc gcc
# must be first for bootstrapping
NATIVE_TOOLS = findutils make
NATIVE_TOOLS = findutils $(MAKE)
# basic tools needed for build system
NATIVE_TOOLS += git automake autoconf libtool texinfo tar
@ -614,7 +614,7 @@ check_platform = \
-a ! -x "`which 2> /dev/null $${target_gcc}`" ] ; then \
$(call build_msg_fn, \
No cross-compiler found for platform $(PLATFORM) target $(TARGET); \
try make PLATFORM=$(PLATFORM) install-tools) ; \
try $(MAKE) PLATFORM=$(PLATFORM) install-tools) ; \
exit 1 ; \
fi
@ -800,7 +800,7 @@ pull-all:
$(call build_msg_fn,Git pull build tools) ; \
$(call tool_make_target_fn,pull-all) ; \
$(call build_msg_fn,Git pull packages for platform $(PLATFORM)) ; \
make PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
$(MAKE) PLATFORM=$(PLATFORM) $(patsubst %,%-pull-all,$(ROOT_PACKAGES))
.PHONY: %-diff
%-diff:
@ -962,13 +962,13 @@ $(PLATFORM_IMAGE_DIR)/ro.img ro-image: $(patsubst %,%-find-source,$(ROOT_PACKAGE
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot /bin/bash -c "{ \
fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(MAKE) -C $(MU_BUILD_ROOT_DIR) IMAGE_INSTALL_DIR=$${tmp_dir} \
$(patsubst %,%-image_install, \
basic_system \
$(ROOT_PACKAGES)) ; \
: make dev directory ; \
: $(MAKE) dev directory ; \
$(linuxrc_makedev) ; \
echo @@@@ Relocating ELF executables to run in / @@@@ ; \
scripts/set-rpath /$(arch_lib_dir):/lib ; \
@ -1054,7 +1054,7 @@ rw-image: rw-image-check-type ro-image
chmod 0755 $${tmp_dir} ; \
cd $${tmp_dir} ; \
trap "rm -rf $${tmp_dir}" err ; \
fakeroot /bin/bash -c "{ \
fakeroot $(SHELL) -c "{ \
set -eu$(BUILD_DEBUG) ; \
$(linuxrc_makedev) ; \
$(call rw_image_embed_ro_image_fn,$${ro_image}) ; \

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -12,15 +12,15 @@
# limitations under the License.
# Scripts require non-POSIX parts of bash
SHELL := /bin/bash
SHELL := $(shell which bash)
DL_CACHE_DIR = $(HOME)/Downloads
MAKE ?= make
MAKE_ARGS ?= -j
BUILD_DIR ?= $(CURDIR)/_build
INSTALL_DIR ?= $(CURDIR)/_install
PKG_VERSION ?= $(shell git describe --abbrev=0 --match 'v[0-9]*' | cut -d- -f1 | cut -dv -f2 | cut -d. -f1,2)
PKG_SUFFIX ?= $(shell git log --oneline v$(PKG_VERSION)-rc0.. . | wc -l)
SOURCE_DATE_EPOCH ?= $(shell git log -1 --pretty=%ct .)
JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell grep -c ^processor /proc/cpuinfo), 2)
@ -34,6 +34,7 @@ CMAKE?=cmake
endif
ARCH_X86_64=$(filter x86_64,$(shell uname -m))
AARCH64=$(filter aarch64,$(shell uname -m))
include packages.mk
include packages/ipsec-mb.mk
@ -41,13 +42,14 @@ include packages/quicly.mk
include packages/rdma-core.mk
include packages/dpdk.mk
include packages/xdp-tools.mk
include packages/octeon-roc.mk
.PHONY: clean
clean:
@rm -rf $(B) $(I)
.PHONY: install
install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install
install: $(if $(ARCH_X86_64), ipsec-mb-install) dpdk-install rdma-core-install quicly-install xdp-tools-install $(if $(AARCH64), octeon-roc-install)
.PHONY: config
config: $(if $(ARCH_X86_64), ipsec-mb-config) dpdk-config rdma-core-config quicly-build
@ -68,7 +70,7 @@ deb/debian/changelog: Makefile
@echo "" >> $@
@echo " * Version $(DEB_VER)" >> $@
@echo "" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R)" >> $@
@echo " -- VPP Dev <vpp-dev@lists.fd.io> $(shell date -R --date=@${SOURCE_DATE_EPOCH})" >> $@
$(DEV_DEB): deb/debian/changelog
@cd deb && dpkg-buildpackage -b -uc -us
@ -156,17 +158,17 @@ ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
@echo "development package by invoking 'make install-ext-deps'"
@echo "from the top level directory"
@echo "=========================================================="
make config
$(MAKE) config
else
ifneq ($(INSTALLED_VER),)
make check-deb
endif
ifneq ($(INSTALLED_RPM_VER),)
make check-rpm
$(MAKE) check-rpm
endif
endif
ebuild-install:
ifeq ($(INSTALLED_VER)$(INSTALLED_RPM_VER),)
make install
$(MAKE) install
endif

View File

@ -1,2 +1,2 @@
rdma=45.0 dpdk=23.03
rdma=46.1 dpdk=23.07
rdma=49.0 dpdk=23.11

View File

@ -19,9 +19,10 @@ DPDK_FAILSAFE_PMD ?= n
DPDK_MACHINE ?= default
DPDK_MLX_IBV_LINK ?= static
dpdk_version ?= 23.07
dpdk_version ?= 23.11
dpdk_base_url ?= http://fast.dpdk.org/rel
dpdk_tarball := dpdk-$(dpdk_version).tar.xz
dpdk_tarball_md5sum_23.11 := 896c09f5b45b452bd77287994650b916
dpdk_tarball_md5sum_23.07 := 2b6d57f077585cb15b885482362fd47f
dpdk_tarball_md5sum_23.03 := 3cf8ebbcd412d5726db230f2eeb90cc9
dpdk_tarball_md5sum_22.11.1 := 0594708fe42ce186a55b0235c6e20cfe

View File

@ -11,18 +11,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
ipsec-mb_version := 1.3
ipsec-mb_version := 1.5
ipsec-mb_patch_version := 0
ipsec-mb_version_str := $(ipsec-mb_version).$(ipsec-mb_patch_version)
ipsec-mb_tarball := v$(ipsec-mb_version).tar.gz
ipsec-mb_tarball_md5sum_0.54 := 258941f7ba90c275fcf9d19c622d2d21
ipsec-mb_tarball_md5sum_0.55 := deca674bca7ae2282890e1fa7f953609
ipsec-mb_tarball_md5sum_1.0 := 906e701937751e761671dc83a41cff65
ipsec-mb_tarball_md5sum_1.1 := 3916471d3713d27e42473cb6af9c65e5
ipsec-mb_tarball_md5sum_1.2 := f551d9c208893a436c1f5c146a615bd6
ipsec-mb_tarball_md5sum_1.3 := d8692db9efe32a263b61f12ac0dca950
ipsec-mb_tarball_md5sum_1.4 := fddba2611f822296ddd82d1c31d22b24
ipsec-mb_tarball_md5sum_1.5 := f18680f8dd43208a15a19a494423bdb9
ipsec-mb_tarball_md5sum := $(ipsec-mb_tarball_md5sum_$(ipsec-mb_version))
ipsec-mb_tarball_strip_dirs := 1
ipsec-mb_url := http://github.com/intel/intel-ipsec-mb/archive/$(ipsec-mb_tarball)
ipsec-mb_system_header := $(wildcard /usr/include/intel-ipsec-mb.h)
define ipsec-mb_config_cmds
@true
@ -38,7 +41,22 @@ define ipsec-mb_build_cmds
EXTRA_CFLAGS="-g -msse4.2" > $(ipsec-mb_build_log)
endef
ifneq ($(ipsec-mb_system_header), )
ipsec-mb_system_ver_str := $(shell awk '/^#define\s+IMB_VERSION_STR/ { print $$3 }' \
$(ipsec-mb_system_header))
endif
define ipsec-mb_install_cmds
if [[ -n "$(ipsec-mb_system_header)" ]]; then \
if [[ "$(ipsec-mb_system_ver_str)" != "$(ipsec-mb_version_str)" ]]; then \
echo "Intel-ipsec-mb build Error: System installed Intel IPsec-mb lib \
version mismatch with target version, \
expecting $(ipsec-mb_version_str), \
but system has $(ipsec-mb_system_ver_str) \
please align/remove system installed $(ipsec-mb_system_header) before building."; \
exit 1; \
fi \
fi
@mkdir -p $(ipsec-mb_install_dir)/include
@mkdir -p $(ipsec-mb_install_dir)/lib
@cp $(ipsec-mb_src_dir)/lib/intel-ipsec-mb.h $(ipsec-mb_install_dir)/include

26
build/external/packages/octeon-roc.mk vendored Normal file
View File

@ -0,0 +1,26 @@
# Copyright (c) 2023 Marvell.
# SPDX-License-Identifier: Apache-2.0
# https://spdx.org/licenses/Apache-2.0.html
octeon-roc_version := 0.2
octeon-roc_tarball := octeon-roc-v$(octeon-roc_version).tar.gz
octeon-roc_tarball_md5sum := 3e122beb30d57d6f70ea5ee106465b3b
octeon-roc_tarball_strip_dirs := 1
octeon-roc_url := https://github.com/MarvellEmbeddedProcessors/marvell-vpp/archive/refs/tags/$(octeon-roc_tarball)
define octeon-roc_config_cmds
@true
endef
define octeon-roc_build_cmds
@cd ${octeon-roc_src_dir} && rm -f $(octeon-roc_build_log) && $(CMAKE) ${octeon-roc_src_dir} -DCMAKE_INSTALL_PREFIX='$(octeon-roc_install_dir)' >> $(octeon-roc_build_log)
@$(MAKE) -C ${octeon-roc_src_dir} >> $(octeon-roc_build_log)
endef
define octeon-roc_install_cmds
@$(MAKE) -C ${octeon-roc_src_dir} install >> $(octeon-roc_install_log)
endef
$(eval $(call package,octeon-roc))

View File

@ -23,11 +23,10 @@ RDMA_CORE_DEBUG?=n
# 2. Verify that the file build/external/dpdk_mlx_default.sh was generated
# and contains 'DPDK_MLX_DEFAULT=y'
#
rdma-core_version := 46.1
rdma-core_version := 49.0
rdma-core_tarball := rdma-core-$(rdma-core_version).tar.gz
rdma-core_tarball_md5sum_43.0 := 3785fd2b35cd41043ab53226fc112d41
rdma-core_tarball_md5sum_45.0 := 2b170e6d2ad66fb688580520a16d1ad5
rdma-core_tarball_md5sum_46.1 := 3ac7c00717ea2720df5d90f8a43ae33a
rdma-core_tarball_md5sum_49.0 := 9fe3909f19c7e0276c9e546411bbb49c
rdma-core_tarball_md5sum := $(rdma-core_tarball_md5sum_$(rdma-core_version))
rdma-core_tarball_strip_dirs := 1
rdma-core_url := http://github.com/linux-rdma/rdma-core/releases/download/v$(rdma-core_version)/$(rdma-core_tarball)

View File

@ -0,0 +1,63 @@
From 6429e38ae77c7998c84d5a0ed26b4fb0d81424c1 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Thu, 15 Jun 2023 01:33:37 +0000
Subject: [PATCH v1] net: fix pkt length type for raw pattern
In current pattern parsing function for raw pattern, the packet length
variable is defined as uint8_t, which is too small for a large packet,
such as srv6. Change the type to uint16_t.
Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading
in RSS")
Signed-off-by: Ting Xu <ting.xu@intel.com>
---
drivers/net/iavf/iavf_hash.c | 2 +-
drivers/net/ice/ice_fdir_filter.c | 2 +-
drivers/net/ice/ice_hash.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index ae6fb38594..cf4d677101 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -886,8 +886,8 @@ iavf_hash_parse_raw_pattern(const struct rte_flow_item *item,
struct iavf_rss_meta *meta)
{
const struct rte_flow_item_raw *raw_spec, *raw_mask;
+ uint16_t spec_len, pkt_len;
uint8_t *pkt_buf, *msk_buf;
- uint8_t spec_len, pkt_len;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
int i, j;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 480b369af8..e8842bc242 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1876,7 +1876,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
(uint8_t *)(uintptr_t)raw_mask->pattern;
uint8_t *tmp_spec, *tmp_mask;
uint16_t tmp_val = 0;
- uint8_t pkt_len = 0;
+ uint16_t pkt_len = 0;
uint8_t tmp = 0;
int i, j;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index f35727856e..52646e9408 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -653,8 +653,8 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad,
const struct rte_flow_item_raw *raw_spec, *raw_mask;
struct ice_parser_profile prof;
struct ice_parser_result rslt;
+ uint16_t spec_len, pkt_len;
uint8_t *pkt_buf, *msk_buf;
- uint8_t spec_len, pkt_len;
uint8_t tmp_val = 0;
uint8_t tmp_c = 0;
int i, j;
--
2.25.1

View File

@ -0,0 +1,54 @@
From b184d103bd767e2286cdb2b0639a2470dce205d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
Date: Thu, 18 Jan 2024 13:22:47 +0100
Subject: [PATCH] Fix transposed calloc() arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Calls to calloc() are supposed to have the number of elements as the first
argument, but we erroneously transposed the arguments in a couple of places. It
seems GCC 14 has started to warn about this, which exposed this as build
breakage.
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
lib/util/params.c | 2 +-
lib/util/xpcapng.c | 6 +++---
xdp-trafficgen/xdp-trafficgen.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/util/xpcapng.c b/lib/util/xpcapng.c
index e453b88..8cfc947 100644
--- a/lib/util/xpcapng.c
+++ b/lib/util/xpcapng.c
@@ -226,7 +226,7 @@ static bool pcapng_write_shb(struct xpcapng_dumper *pd, const char *comment,
shb_length += sizeof(uint32_t);
/* Allocate the SHB and fill it. */
- shb = calloc(shb_length, 1);
+ shb = calloc(1, shb_length);
if (shb == NULL) {
errno = ENOMEM;
return false;
@@ -318,7 +318,7 @@ static bool pcapng_write_idb(struct xpcapng_dumper *pd, const char *name,
idb_length += sizeof(uint32_t);
/* Allocate the IDB and fill it. */
- idb = calloc(idb_length, 1);
+ idb = calloc(1, idb_length);
if (idb == NULL) {
errno = ENOMEM;
return false;
@@ -549,7 +549,7 @@ struct xpcapng_dumper *xpcapng_dump_open(const char *file,
goto error_exit;
}
- pd = calloc(sizeof(*pd), 1);
+ pd = calloc(1, sizeof(*pd));
if (pd == NULL) {
errno = ENOMEM;
goto error_exit;
--
2.43.0

12
configure vendored
View File

@ -5,6 +5,7 @@ set -o pipefail -o errtrace -o nounset -o errexit
# submitting any changes
# defaults
platform=default
build_dir=.
install_dir=/usr/local
build_type=release
@ -31,6 +32,7 @@ OPTIONS:
--native-only, -n Only compile for Native CPU (no multiarch)
--wipe, -w Wipe whole repo (except startup.* files)
--sanitize, -s Enable sanitizer (mem)
--platform, -p Specify target platform
__EOF__
}
@ -76,6 +78,15 @@ while (( "$#" )); do
exit 1
fi
;;
-p|--platform)
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then
platform=$2
shift 2
else
echo "Error: Argument for $1 is missing" >&2
exit 1
fi
;;
-n|--native-only)
native_only=yes
shift 1
@ -121,6 +132,7 @@ args+=("-DCMAKE_PREFIX_PATH=/opt/vpp/external/${arch}")
args+=("-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON")
args+=("-DCMAKE_INSTALL_PREFIX=${install_dir}")
args+=("-DCMAKE_BUILD_TYPE:STRING=${build_type}")
args+=("-DVPP_PLATFORM=${platform}")
[ "${native_only}" == "yes" ] && args+=("-DVPP_BUILD_NATIVE_ONLY:BOOL=ON")
[ "${wipe}" == "yes" ] && git clean -fdx --exclude=startup.\*

View File

@ -6,6 +6,8 @@ Release notes
.. toctree::
:maxdepth: 2
v24.02
v23.10
v23.06
v23.02
v22.10.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -642,19 +642,6 @@ can impact performance. Default is 1024.
num-rx-desc <n>
}
vlan-strip-offload on | off
^^^^^^^^^^^^^^^^^^^^^^^^^^^
VLAN strip offload mode for interface. VLAN stripping is off by default
for all NICs except VICs, using ENIC driver, which has VLAN stripping on
by default.
.. code-block:: console
dev 000:02:00.1 {
vlan-strip-offload on|off
}
uio-driver driver-name
^^^^^^^^^^^^^^^^^^^^^^

View File

@ -256,6 +256,44 @@ To build the debian packages, use the following command:
$ make pkg-deb
Reproducible builds on Debian
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
By default the VPP artifacts have various bits of
information in them aimed at simplifying the identification
during the development (like, the user name that built
the package as well as the build times). By setting
a few environment variables one can obtain bit-identical
.deb files, assuming that the prerequisites installed
in the build environment are identical.
Setting and using the SOURCE_DATE_EPOCH variable
(see https://reproducible-builds.org/docs/source-date-epoch/)
takes care of most of the magic necessary.
The package vpp-ext-deps is already being built with that
date set to date of the last modification of the
build/external/ tree
(similar to deriving the "number of commits" for the package
versioning of vpp-ext-deps)
For the rest of the packages, pinning the following
three variables should result in bit-identical
artifacts across multiple runs in the build environment:
.. code-block:: console
export SOURCE_DATE_EPOCH=$(date +%s)
export VPP_BUILD_HOST="buildhost"
export VPP_BUILD_USER="builduser"
If you want to reproduce the bit-identical builds across
different environments, take a look at "vpp_<BUILD_VERSION>.buildinfo" file
which gets created in build-root alongside the .deb repositories -
it has the cryptographic hashes for the newly built packages, and
the full list of build dependencies and their versions.
.. _rpmpackages:
Building RPM Packages

View File

@ -110,6 +110,7 @@ bufferindex
bufmon
Bufmon
bugfixing
buildinfo
buildingrst
builtin
builtinurl
@ -247,6 +248,8 @@ Dest
det
dev
devbind
dev_iavf
dev_octeon
df
dhcp
dhcp
@ -312,6 +315,7 @@ elts
emacs
emerg
emphasise
ena
enablement
encap
encap
@ -464,6 +468,7 @@ ia
iacl
iAcl
iACL
iavf
iBGP
ibverb
IBverbs
@ -782,6 +787,7 @@ O'Driscoll
oacl
oam
OAM
octeon
oddbuf
Oddbuf
offline
@ -901,6 +907,7 @@ py
pypi
qemu
Qemu
qdisc
qos
QoS
qs

View File

@ -13,11 +13,8 @@ scenario.
OS / Distro test results
------------------------
This setup has been tested on an Ubuntu 18.04 LTS system. If youre
feeling adventurous, the same scenario also worked on a recent Ubuntu
20.04 “preview” daily build.
Other distros may work fine, or not at all.
This setup has been tested on Ubuntu 18.04 - 22.04 LTS systems. Other
distros may work fine, or not at all.
Proxy Server
------------
@ -113,6 +110,7 @@ containers, run vpp without installing it, etc.
type: disk
name: default
Set up the network configurations
---------------------------------
@ -127,20 +125,20 @@ and host configuration:
::
config:
ipv4.address: 10.26.68.1/24
ipv4.dhcp.ranges: 10.26.68.10-10.26.68.50
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: internet
type: bridge
used_by:
managed: true
status: Created
locations:
- none
config:
ipv4.address: 10.26.68.1/24
ipv4.dhcp.ranges: 10.26.68.10-10.26.68.50
ipv4.nat: "true"
ipv6.address: none
ipv6.nat: "false"
description: ""
name: internet
type: bridge
used_by:
managed: true
status: Created
locations:
- none
Repeat the process with the “respond” and “initiate” networks, using
these configurations:
@ -183,7 +181,6 @@ initiate network configuration
managed: true
status: Created
locations:
- none
Create a “master” container image
---------------------------------
@ -195,7 +192,7 @@ Make sure that e.g. public key auth ssh works.
::
# lxd launch ubuntu:18.04 respond
# lxd launch ubuntu:22.04 respond
<spew>
# lxc exec respond bash
respond# cd /scratch/my-vpp-workspace
@ -228,9 +225,9 @@ container image is fully set up before you help it have children:
Install handy script
--------------------
See below for a handy script which executes lxc commands across the
current set of running containers. I call it “lxc-foreach,” feel free to
call the script Ishmael if you like.
See below for a handy host script which executes lxc commands across
the current set of running containers. I call it “lxc-foreach,” feel
free to call the script Ishmael if you like.
Examples:
@ -251,36 +248,44 @@ Heres the script:
::
#!/bin/bash
#!/bin/bash
set -u
export containers="respond respondhost initiate initiatehost dhcpserver"
set -u
export containers="respond initiate initiatehost respondhost"
if [ x$1 = "x" ] ; then
echo missing command
exit 1
fi
if [ x$1 = "x" ] ; then
echo missing command
exit 1
fi
if [ $1 = "ssh" ] ; then
for c in $containers
do
inet=`lxc info $c | grep eth0 | grep -v inet6 | head -1 | cut -f 3`
if [ x$inet = "x" ] ; then
echo $c not started
else
gnome-terminal --command "/usr/bin/ssh $inet"
fi
done
exit 0
fi
if [ $1 = "ssh" ] ; then
for c in $containers
do
for c in $containers
do
echo lxc $1 $c
lxc $1 $c
done
inet=`lxc info $c | grep 10.38.33 | sed "s/.*inet://" | sed "s/\/24.*//" | tr -d " "`
if [ x$inet != "x" ] ; then
gnome-terminal --title "$c(ssh)" --command "/usr/bin/ssh -Y root@$inet"
fi
done
exit 0
fi
exit 0
for c in $containers
do
inet=`lxc info $c | grep 10.38.33 | sed "s/.*inet://" | sed "s/\/24.*//" | tr -d " "`
if [ x$1 = "xstart" ] ; then
echo Starting $c
lxc start $c
elif [ x$1 = "xstop" ] ; then
echo Stopping $c
lxc stop $c
elif [ x$inet != "x" ] ; then
echo lxc $1 $c
lxc $1 $c
fi
done
exit 0
Test topology
-------------
@ -289,24 +294,25 @@ Finally, were ready to describe a test topology. First, a picture:
::
===+======== management lan/bridge lxdbr0 (dhcp) ===========+===
| | |
| | |
| | |
v | v
eth0 | eth0
+------+ eth1 eth1 +------+
===+======== management lan/bridge lxdbr0 (dhcp) ==============+===
| | |
| | |
| | |
v | v
eth0 | eth0
+---------+ eth1 eth1 +----------+
| respond | 10.26.88.100 <= internet bridge => 10.26.88.101 | initiate |
+------+ +------+
+---------+ +----------+
eth2 / bvi0 10.166.14.2 | 10.219.188.2 eth3 / bvi0
| | |
| ("respond" bridge) | ("initiate" bridge) |
| | |
v | v
eth2 10.166.14.3 | eth3 10.219.188.3
+----------+ | +----------+
| respondhost | | | respondhost |
+----------+ | +----------+
| | |
| ("respond" bridge) | ("initiate" bridge) |
| | |
v | v
eth2 10.166.14.3 | eth3 10.219.188.3
+-------------+ | +-------------+
| respondhost | | | respondhost |
+-------------+ | +-------------+
v
eth0 (management lan) <========+========> eth0 (management lan)
Test topology discussion

View File

@ -63,11 +63,9 @@ Run some commands to verify the changes:
32: veth_link1 inet 172.16.1.2/24 scope global veth_link1\ valid_lft forever preferred_lft forever
32: veth_link1 inet6 fe80::2c9d:83ff:fe33:37e/64 scope link \ valid_lft forever preferred_lft forever
root@cone:/# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 172.16.1.1 0.0.0.0 UG 0 0 0 veth_link1
172.16.1.0 * 255.255.255.0 U 0 0 0 veth_link1
root@cone:/# ip route
default via 172.16.1.1 dev veth_link1
172.16.1.0/24 dev veth_link1 proto kernel scope link src 172.16.1.2
We see that the IP has been assigned, as well as our default gateway.

View File

@ -19,7 +19,7 @@ Then install packages for containers such as lxc:
# apt-get install bridge-utils lxc
As quoted from the `lxc.conf manpage <https://linuxcontainers.org/it/lxc/manpages/man5/lxc.conf.5.html>`_, "container configuration is held in the config stored in the container's directory.
As quoted from the `lxc.conf manpage <https://linuxcontainers.org/lxc/manpages/man5/lxc.conf.5.html>`_, "container configuration is held in the config stored in the container's directory.
A basic configuration is generated at container creation time with the default's recommended for the chosen template as well as extra default keys coming from the default.conf file."
"That *default.conf* file is either located at /etc/lxc/default.conf or for unprivileged containers at ~/.config/lxc/default.conf."
@ -31,10 +31,10 @@ Look at the contents of *default.conf*, which should initially look like this:
.. code-block:: console
# cat /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
As you can see, by default there is one veth interface.
@ -44,36 +44,36 @@ You can do this by piping *echo* output into *tee*, where each line is separated
.. code-block:: console
# echo -e "lxc.network.name = veth0\nlxc.network.type = veth\nlxc.network.name = veth_link1" | sudo tee -a /etc/lxc/default.conf
# echo -e "lxc.net.0.name = veth0\nlxc.net.1.type = veth\nlxc.net.1.name = veth_link1" | sudo tee -a /etc/lxc/default.conf
Inspect the contents again to verify the file was indeed modified:
.. code-block:: console
# cat /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
lxc.network.name = veth0
lxc.network.type = veth
lxc.network.name = veth_link1
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
lxc.net.0.name = veth0
lxc.net.1.type = veth
lxc.net.1.name = veth_link
After this, we're ready to create the containers.
Creates an Ubuntu Xenial container named "cone".
Creates an Ubuntu Focal container named "cone".
.. code-block:: console
# lxc-create -t download -n cone -- --dist ubuntu --release xenial --arch amd64 --keyserver hkp://p80.pool.sks-keyservers.net:80
# lxc-create -t download -n cone -- --dist ubuntu --release focal --arch amd64
If successful, you'll get an output similar to this:
.. code-block:: console
You just created an Ubuntu xenial amd64 (20180625_07:42) container.
You just created an Ubuntu focal amd64 (20231027_07:42) container.
To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
@ -83,8 +83,7 @@ Make another container "ctwo".
.. code-block:: console
# lxc-create -t download -n ctwo -- --dist ubuntu --release xenial --arch amd64 --keyserver hkp://p80.pool.sks-keyservers.net:80
# lxc-create -t download -n ctwo -- --dist ubuntu --release focal --arch amd64
List your containers to verify they exist:
@ -106,9 +105,9 @@ And verify its running:
.. code-block:: console
# lxc-ls --fancy
NAME STATE AUTOSTART GROUPS IPV4 IPV6
cone RUNNING 0 - - -
ctwo STOPPED 0 - - -
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
cone RUNNING 0 - - - false
ctwo STOPPED 0 - - - false
.. note::

View File

@ -18,10 +18,9 @@ Run the linux DHCP setup and install VPP:
.. code-block:: console
root@cone:/# resolvconf -d eth0
root@cone:/# dhclient
root@cone:/# apt-get install -y wget
root@cone:/# echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.ubuntu.xenial.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
root@cone:/# apt-get install -y curl
root@cone:/# curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | sudo bash
root@cone:/# apt-get update
root@cone:/# apt-get install -y --force-yes vpp
root@cone:/# sh -c 'echo \"\\ndpdk {\\n no-pci\\n}\" >> /etc/vpp/startup.conf'

View File

@ -5,6 +5,7 @@ VPP with Containers
This section will cover connecting two Linux containers with VPP. A container is essentially a more efficient and faster VM, due to the fact that a container does not simulate a separate kernel and hardware. You can read more about `Linux containers here <https://linuxcontainers.org/>`_.
This section has been tested with Ubuntu 22.04 LTS.
.. toctree::

46
extras/deb/mkdeb-octeon-roc Executable file
View File

@ -0,0 +1,46 @@
#!/bin/bash
PKG=vpp-dep-octeon-roc
URL=https://github.com/MarvellEmbeddedProcessors/marvell-vpp.git
ARCH=$(dpkg --print-architecture)
TMP_DIR=$(mktemp -d -p $PWD)
set -eEuo pipefail
err_handler()
{
trap '' INT TERM EXIT ERR
echo "Cleaning up ${TMP_DIR}"
rm -rf ${TMP_DIR}
exit
}
trap "err_handler" INT TERM EXIT ERR
SRC=${TMP_DIR}/src
BUILD=${TMP_DIR}/build
STAGE=${TMP_DIR}/pkg
INSTALL_PREFIX=/opt/vpp/external/$(uname -m)
git clone ${URL} ${SRC}
VER=0.0.$(git -C ${SRC} rev-list --count HEAD)
cmake -S ${SRC} -B ${BUILD}
cmake --build ${BUILD} --parallel
cmake --install ${BUILD} --prefix ${STAGE}${INSTALL_PREFIX}
mkdir -p ${STAGE}/DEBIAN
cat > ${STAGE}/DEBIAN/control << __EOF__
Package: ${PKG}
Version: ${VER}
Architecture: ${ARCH}
Maintainer: vpp-dev <vpp-dev@fd.io>
Installed-Size: $(du -ks ${STAGE}|cut -f 1)
Section: system
Priority: extra
Description: Marvell Octeon ROC library for VPP
See https://github.com/MarvellEmbeddedProcessors/marvell-vpp
__EOF__
DEB=${PKG}_${VER}_${ARCH}.deb
dpkg-deb -b ${STAGE} ${DEB}

Some files were not shown because too many files have changed in this diff Show More