Tom Jones [Wed, 20 Mar 2024 09:52:16 +0000 (09:52 +0000)]
vppinfra: Define EBADFD on FreeBSD
Type: improvement
Change-Id: I303a8a7333d44f6eab902d4d61023cfa96760dd2
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Wed, 31 Jan 2024 09:42:37 +0000 (09:42 +0000)]
vcl: Only build vcl_ldpreload on Linux
vcl_ldpreload requires some additional porting for FreeBSD, until that
can be completed only build on Linux.
Type: improvement
Change-Id: I9b0942114252a0c6241640d2e454861c2b5d4304
Signed-off-by: Tom Jones <thj@freebsd.org>
Florin Coras [Thu, 14 Mar 2024 05:03:33 +0000 (22:03 -0700)]
tls: handle attepts to renegotiate hs
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I549d0c8715e5c06bfc22be26ca1dc78ec3c29a61
Stanislav Zaikin [Wed, 6 Mar 2024 18:48:30 +0000 (19:48 +0100)]
vapi: uds transport support
introduce ability to connect over unix socket instead of shared memory
Type: improvement
Change-Id: Id9042c74e33ad4e418896c4d7ae48bb9106195c9
Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Damjan Marion [Mon, 12 Feb 2024 19:44:58 +0000 (19:44 +0000)]
vppinfra: os agnostic api for getting CPU information
Avoid direct sysfs reads when possible...
Type: improvement
Change-Id: I2b84cd18f3da47925d068951f24b79b5b6e20bb1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Damjan Marion [Fri, 15 Mar 2024 19:03:41 +0000 (19:03 +0000)]
build: add option to specify supported OS list for plugin
Type: improvement
Change-Id: I0d6f11d5ece19c5e0e00dfdadc9d4c09274ae8e1
Signed-off-by: Damjan Marion <damarion@cisco.com>
Klement Sekera [Fri, 15 Mar 2024 17:16:52 +0000 (18:16 +0100)]
ip: reassembly - return correct value
If already enabled, return 0 to indicate success.
Type: fix
Change-Id: I4a182e14df9b05698ad93d596a97c46a020fd54b
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Tom Jones [Tue, 30 Jan 2024 16:49:38 +0000 (16:49 +0000)]
misc: Add platform specific header on FreeBSD
Type: improvement
Change-Id: Ia23414e87d64567d5124b8297315ed7a426c3651
Signed-off-by: Tom Jones <thj@freebsd.org>
Florin Coras [Wed, 13 Mar 2024 00:00:51 +0000 (17:00 -0700)]
vcl: fix bitfield truncation with clang16
Reported by phlax while building Envoy with clang16
error: implicit truncation from 'int' to a one-bit wide bit-field
changes value from 1 to -1
[-Werror,-Wsingle-bit-bitfield-constant-conversion]
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib1b731780cf27a9498299f0424a06000dc67e81e
Andrew Yourtchenko [Wed, 13 Mar 2024 11:16:11 +0000 (12:16 +0100)]
misc: fix the static vppctl build
Change I58e1ae1c91f4a62e80eaf4e16e9932d8bab17c74 has introduced a reference to config.h,
which is not there in a case of building a static standalone vppctl.
Solution: add a variable STATIC_VPPCTL which, when defined, avoids including
the missing include file. Thanks a lot to Damjan for the suggestion.
Type: fix
Change-Id: I133235ba07e5c2e0d5669be9c2292cab0fdf436f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Klement Sekera [Tue, 12 Mar 2024 17:41:04 +0000 (18:41 +0100)]
papi: use correct size for fixed length strings
This is required for correct packing of unions.
Type: fix
Change-Id: I92d04b1bbcb3fc3fe06474d8f2c59ed3502e6bd6
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Klement Sekera [Fri, 8 Mar 2024 09:24:46 +0000 (10:24 +0100)]
tests: use proper unit test skip instead of prints
Using unittest skip instead of print unclutters display by not printing
skip messages when not applicable, e.g. when somebody runs tests which
are unrelated to netns tests, e.g. with FILTER=vapi.
Type: fix
Fixes:
e416893a59
Change-Id: Ie09e213249aa47da7e4ff484c3d072fbce3c2001
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Damjan Marion [Tue, 12 Mar 2024 16:42:49 +0000 (17:42 +0100)]
misc: remove GNU Indent directives
Type: refactor
Change-Id: I5235bf3e9aff58af6ba2c14e8c6529c4fc9ec86c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Dmitry Valter [Thu, 7 Mar 2024 17:56:55 +0000 (17:56 +0000)]
vpp: set asan default options
set asan default options in vppctl and vpp_get_stats
Type: improvement
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I58e1ae1c91f4a62e80eaf4e16e9932d8bab17c74
adrianvillin [Tue, 13 Feb 2024 11:00:02 +0000 (06:00 -0500)]
hs-test: experimental support for multiple test instances
- appending PID to interface and container names
- added a check for used IP addresses
- TestEnvoyProxyHttpTcp and TestTcpWithLoss are broken when running multiple instances
Type: test
Change-Id: Ib917079ec7cf851dee59ff9c67e74f48c7c5e3c6
Signed-off-by: adrianvillin <avillin@cisco.com>
Maxime Peim [Mon, 11 Mar 2024 09:53:26 +0000 (10:53 +0100)]
urpf: fix uprf_update prototype
Type: fix
Change-Id: Idc325a096903dcdfad5157db2eb728f2e61ce974
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Florin Coras [Sat, 9 Mar 2024 23:51:50 +0000 (15:51 -0800)]
session: use no for ports in transport port allocator
Type: improvement
Change-Id: Ia1d8aaa3c51938cfa15dd09102471f52ebe67a3d
Signed-off-by: Florin Coras <fcoras@cisco.com>
Florin Coras [Sat, 9 Mar 2024 03:25:42 +0000 (19:25 -0800)]
session: fix port alloc for fixed lcl port reuse
Type: fix
Change-Id: If30d1aa8aa752ae4bddde776832a3009ebc7e316
Signed-off-by: Florin Coras <fcoras@cisco.com>
Alexander Chernavin [Wed, 27 Dec 2023 12:37:16 +0000 (12:37 +0000)]
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>
Andrew Yourtchenko [Tue, 20 Feb 2024 15:19:56 +0000 (15:19 +0000)]
misc: VPP 24.02 Release Notes
Type: docs
Change-Id: I4209b4edf387f2d7b88ecc338cca3b4901210ed2
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit
455960759b5417c767ed331748c7ee76662ffd18)
Matthew Smith [Mon, 5 Feb 2024 22:57:55 +0000 (22:57 +0000)]
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>
Georgy Borodin [Wed, 28 Feb 2024 16:04:44 +0000 (17:04 +0100)]
dpdk: correct waiting times
When link state interval is 3 and stats interval is 10, updates
for stats will be made every 12 seconds (next number after 10,
that divisible by 3). And if you get counters every 30 secs, you
will get ideal "saw"-line instead of real smooth chart.
This commit makes smooth line on stats intervals that are divisors
of the charts update interval (regardless of link state interval),
and makes it possible to configure them.
Type: fix
Fixes:
cb9cadad578297ffd78fa8a33670bdf1ab669e7e
Change-Id: Ia4350467be2b0ec0c1be37c7fda63f43b3330f44
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
Vladislav Grishenko [Sun, 14 Mar 2021 21:48:09 +0000 (02:48 +0500)]
vpp: fix stdin vs non-interactive command clash
In case of both stdin and non-interactive inputs are there
vppctl parses them all, causing mixed corrupted output:
$ echo foo | vppctl sh bar
show: unknown input `bar'
unknown input `foo'
This is not desired, stdin should be ignored if there's a command
but still allow stdin commands - following cases are still equal:
$ vppctl foo
$ echo foo | vppctl
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I98667391627150c98a57d49ae544e48ef3351f34
Monendra Singh Kushwaha [Fri, 23 Feb 2024 07:29:47 +0000 (12:59 +0530)]
octeon: add support for VF device
This patch adds support for VF and loopback device.
Type: feature
Change-Id: I1ea92f3a1161851957206300ab921c27290b0305
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Vladislav Grishenko [Wed, 14 Jul 2021 13:16:02 +0000 (18:16 +0500)]
vlib: fix initial stats time for the process nodes
Uninitialized stats time for new dynamic processes (like unix
cli) leads to invalid and too high clocks diff, breaking the
stats collecting.
$ sudo vppctl sh runtime | grep unix
unix-cli-new-session any wait 0 0 30 2.72e3 0.00
unix-cli-process-0 active 14 0 27 3.73e15 0.00
unix-epoll-input polling 6464 0 0 3.56e6 0.00
unix-epoll-input polling 68360 0 0 1.31e3 0.00
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ic70678b67a3fb3f78ed4a1a03077ae243ed5d7cd
Vladislav Grishenko [Thu, 4 Aug 2022 15:36:45 +0000 (20:36 +0500)]
vnet: fix format of deleted sw interfaces
As similar
535364e90459566b603661c3dbe360c72f59ad71 is
merged, printing possibly deleted interfaces by index
only in all the rest cases.
Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I4fa58b382c0279ff893523ba0188fdb9b09e10af
Damjan Marion [Sun, 3 Mar 2024 22:12:21 +0000 (22:12 +0000)]
vppinfra: SHA2-256 ARM ISA support
Change-Id: I0fcda3e7afaab037bd12d0079d6639c6cbe8647e
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
Mohsin Kazmi [Tue, 27 Feb 2024 12:00:20 +0000 (12:00 +0000)]
af_packet: fix the device input feature arc support
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I1c900bbe441c6797215f16e99b71149904aa745f
Maxime Peim [Mon, 12 Feb 2024 09:08:03 +0000 (10:08 +0100)]
misc: fix icmp
- fix ICMPv6 lookup FIB (don't reset sw_if_index[VLIB_TX] to -1)
- add locally generated flag in ICMPv4 buffers (reflect ICMPv6)
Type: fix
Change-Id: If25a176a9952cbe185a030f8b136718af1bff9e8
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Vladislav Grishenko [Sat, 2 Mar 2024 16:04:14 +0000 (21:04 +0500)]
bpf_trace_filter: support bpf filter optimization and dump
BPF filter w/o optimization can take x2 - x3 more instructions,
causing significant slow down in fast path.
Enable pcap optimization by default via cli and introduce api v2
with pcap optimization control, keep v1 for a while as it exists
in previous release already.
Intriduce bpf filter cli dump, similar to tcpdump -d.
Also fix memleak, function name typo, cli pcap format hint and
add related tests.
Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I92b2b519e92326f1b8e1a4dda6a3e3edc52f87ad
Damjan Marion [Thu, 29 Feb 2024 15:14:27 +0000 (16:14 +0100)]
vppinfra: add os_get_online_cpu_core() and os_get_online_cpu_node()
Type: improvement
Change-Id: I6f99f09c7724ce656a4f41a1d5f9c88d74c00faf
Signed-off-by: Damjan Marion <damarion@cisco.com>
Vladislav Grishenko [Sun, 15 May 2022 20:58:53 +0000 (01:58 +0500)]
ip: fix warning on interface ipv6 prefix remove
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I428f52abbdddd9caca9b0f619a0e934f96ac0b4a
Vladislav Grishenko [Tue, 20 Feb 2024 06:58:01 +0000 (11:58 +0500)]
fib: fix crash while adding intf-rx routes
Fix crash while adding intf-rx ip4 and ip6 routes via api due
invalid exporting of interface rx routes as attached.
Also, add missed route path via rx-ip6 cli support.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I15711c8c0787398dd7e3baa4787019bb1f317666
Vladislav Grishenko [Sat, 13 Mar 2021 15:48:35 +0000 (20:48 +0500)]
svm: fix svm queue overwrite while adding 2 elements
Adding two elements to the full svm queue passes exact
bounds check, therefore tail gets overwritten w/o any
waiting. Fix it with requiring at lease two free slots.
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I704ee606c47b523952cb965f848339ae1988cb60
Samvel Vartapetov [Tue, 28 Dec 2021 07:51:36 +0000 (10:51 +0300)]
udp: fix ipv6 udp punt show
Type: fix
Signed-off-by: Samvel Vartapetov <svartapetov@yandex-team.ru>
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I57cba1e724f851419c7dfdee896568fc7416feaf
Florin Coras [Fri, 1 Mar 2024 02:19:30 +0000 (18:19 -0800)]
session: add api cb for listen and unlisten
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I28ccebf4d2f0728dd174ab3ee77a0d7ad4b90951
Damjan Marion [Mon, 26 Feb 2024 16:19:56 +0000 (16:19 +0000)]
crypto-native: fix AES-CBC encrypt loop
Type: fix
Change-Id: I11cc52ff3867277e6591efb061f96cadfcc70c88
Signed-off-by: Damjan Marion <damarion@cisco.com>
Tom Jones [Wed, 31 Jan 2024 09:13:44 +0000 (09:13 +0000)]
dhcp: Compare DIUD_LL as a network short
The existing comparision triggers the following clang assertion:
error: result of comparison of constant
50331648 with expression of type
'u16' (aka 'unsigned short') is always true
Section 9.1 of RFC3315 describes the DUID type field as:
"A DUID consists of a two-octet type code represented in network byte"
correctly convert the local type to a network short for the comparison.
Type: fix
Change-Id: I7cb048035bd5e06372e29471ae6004ee1b2191b9
Signed-off-by: Tom Jones <thj@freebsd.org>
Monendra Singh Kushwaha [Wed, 14 Feb 2024 10:48:24 +0000 (16:18 +0530)]
octeon: add flow offload infra
Type: feature
Change-Id: I3485e1627eafc5125255985003573247e7562db2
Signed-off-by: Kommula Shiva Shankar <kshankar@marvell.com>
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Niyaz Murshed [Wed, 21 Feb 2024 19:54:24 +0000 (19:54 +0000)]
crypto: CLI to change dispatch mode
This change aims to affect crypto_sw_scheduler behavior,
but all the edits end up in vnet/crypto.
After
9a9604b introduced adaptive mode for crypto dispatch,
the performance of async mode at lower rate got worse.
A work around for CSIT test is done by changing dispatch mode via explicit API call
in https://github.com/FDio/vpp/commit/
139aba204780f6cc2845b311820a0b4c47517d02
In this change, the CLI is brought back to allow user to fix the
dispatch mode.
set crypto async dispatch mode <polling|interrupt|adaptive>
Type: improvement
Change-Id: I029e98aa25889eddcf62e75a6c78926cdee862ef
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
Florin Coras [Tue, 27 Feb 2024 02:11:43 +0000 (18:11 -0800)]
tls: pass reset ntf to engines
Type: improvement
Change-Id: Ie042605e50656229874b7a93638f0f04c894410f
Signed-off-by: Florin Coras <fcoras@cisco.com>
Florin Coras [Mon, 26 Feb 2024 22:52:34 +0000 (14:52 -0800)]
session: fix transport closed and disconnect race
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie7ff4bac22e9dbb449610072b52d1ec4e46fe757
Monendra Singh Kushwaha [Tue, 6 Feb 2024 08:32:43 +0000 (14:02 +0530)]
dev: add per-port vnet flow
Type: feature
Change-Id: If63f39211288ab2eba8bc1ab50a2a4c7755abc66
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Florin Coras [Mon, 26 Feb 2024 01:35:21 +0000 (17:35 -0800)]
tcp: fix fin retransmit when out of buffers
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I787825dea7f82748537cc4372104cc6647cf2132
Tom Jones [Wed, 31 Jan 2024 09:33:16 +0000 (09:33 +0000)]
hsa: Undef libepoll-shims close on FreeBSD
libepoll-shim has some hacks to enable functionality, one of these
redefines close as a macro. This conflicts with a close call back. On
FreeBSD undefine this macro at point of use.
Type: improvement
Change-Id: I7b4f7cd874f3451d76c580cf999369426d9e89c2
Signed-off-by: Tom Jones <thj@freebsd.org>
Mohsin Kazmi [Fri, 16 Feb 2024 17:30:41 +0000 (17:30 +0000)]
virtio: fix the packed ring support
Type: fix
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: If27702d2a9755e0e0a6eaeab4cf26b4974444b44
Tom Jones [Tue, 30 Jan 2024 16:43:12 +0000 (16:43 +0000)]
memif: don't include prctl.h
Type: improvement
Change-Id: I3ab8df625524b5ff85e62760f5e29daf0d650773
Signed-off-by: Tom Jones <thj@freebsd.org>
Florin Coras [Sat, 24 Feb 2024 02:01:45 +0000 (18:01 -0800)]
tls: initialize app session app wrk
Type: fix
Change-Id: I8832839738b96495bd775a778dd736bb25e1236c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Tom Jones [Wed, 31 Jan 2024 10:44:14 +0000 (10:44 +0000)]
svm: Use ftruncate to expand svm on FreeBSD
Linux doesn't support the Linux idiom of using lseek and a write to set
the size of a file, instead use ftruncate to accomplish the same effect.
This change is taken from the Nanoteq VPP port commit:
https://github.com/ftk-ntq/vpp/commit/
04a1b19b37e791accc61b91f3f413d8bc8b1ff8f
Type: improvement
Change-Id: Ie0b83e751b8b8f20b6814e5c9f760035747dfad9
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 16:21:58 +0000 (16:21 +0000)]
vcl: Use FreeBSD specific errno value for bad fd
Type: improvement
Change-Id: I7693f2647f65f662c9b20f77bbf7e1a530b58259
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Mon, 29 Jan 2024 14:38:19 +0000 (14:38 +0000)]
build: Discover libepoll-shim on FreeBSD
FreeBSD doesn't offer epoll, but an implementation which uses kqueue is
available as an external library. On FreeBSD in subsystems which require
epoll have cmake look for libepoll-shim.
Type: improvement
Change-Id: Iafd5406a9e2ebaa53fd94034489ffbbf87a7d040
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Thu, 25 Jan 2024 10:24:08 +0000 (10:24 +0000)]
vlib: Use platform specific headers for sched.h
FreeBSD only defines posix scheduling policies, remove the others from
the for each look to allow build.
Type: improvement
Change-Id: Ifdb9414417e8b6ffdf216fd001708b347c496b97
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Mon, 29 Jan 2024 10:33:36 +0000 (10:33 +0000)]
build: Add support to add_vpp_library for platform specific sources
Add support for adding Linux and FreeBSD specific sources to
add_vpp_library and support for installing Linux specific headers. Don't
add support for FreeBSD specific headers until we have some to install.
Type: improvement
Change-Id: I38549cf4d71999b71b3298e529323956e54ddc36
Signed-off-by: Tom Jones <thj@freebsd.org>
Benoît Ganne [Wed, 2 Aug 2023 09:31:46 +0000 (11:31 +0200)]
ip6: ECMP hash support for ipv6 fragments
Type: improvement
Change-Id: I41f70e5977fedbf0050205ebe52126ef373ebc06
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Florin Coras [Tue, 20 Feb 2024 19:24:54 +0000 (11:24 -0800)]
tls: fix transport endpoint get
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idb8cc576168ce0ffa8f06be1acef4be4b3b29433
Maxime Peim [Mon, 19 Feb 2024 10:26:23 +0000 (11:26 +0100)]
pg: fix stream pg interface
When an other interface is specified to generate packets from, we should
bind its sw_if_index to the pg interface to use.
Fix if_index_by_sw_if_index variable name, and force to specify a pg
interface to source traffic from.
Type: fix
Change-Id: Ib3e6dca92774b307def82926fc09945b7998267d
Signed-off-by: Maxime Peim <mpeim@cisco.com>
Kaj Niemi [Mon, 9 Oct 2023 13:14:51 +0000 (13:14 +0000)]
build: Enable building on AlmaLinux 9
AlmaLinux is identical to Rocky and can be made to work with
the same build dependencies
Type: feature
Change-Id: I24bb8781a02c15f887c9c26cc98621e6256f4115
Signed-off-by: Kaj Niemi <kajtzu@a51.org>
Tom Jones [Mon, 29 Jan 2024 15:23:23 +0000 (15:23 +0000)]
vnet: include platform specific un.h
On FreeBSD define UNIX_PATH_MAX so it is available in punt.c. FreeBSD's
max path is 4 bytes shorter than Linux's.
Type: improvement
Change-Id: I2c4b7aa11246213575b557fab44669706885e6b7
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 13:48:49 +0000 (13:48 +0000)]
vppinfra: Stub out get_current_cpu and get_current_numa on FreeBSD
FreeBSD has its own set of syscalls for getting current CPU and NUMA
domain information. Stub out these calls and return CPU 0 and NUMA domain
0 as placeholders until we bring in FreeBSD specific calls.
Type: improvement
Change-Id: Id61df0273b0bcc6acf4844ee626e4f246f9f217b
Signed-off-by: Tom Jones <thj@freebsd.org>
Monendra Singh Kushwaha [Thu, 15 Feb 2024 17:37:39 +0000 (23:07 +0530)]
dev: fix type for uint32 arg value
Type: fix
Change-Id: Ib09d6a0dfc95d82ecfd2ff123be9004cb038d0d4
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Monendra Singh Kushwaha [Sun, 18 Feb 2024 18:03:41 +0000 (23:33 +0530)]
build: bump octeon-roc version to 0.3
This patch updates cache line size in octeon-roc library.
Type: fix
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: Ifbb6e7d2a5436a88ef10d22c414112edc23e0b35
Lijian Zhang [Wed, 1 Nov 2023 07:17:31 +0000 (07:17 +0000)]
crypto-openssl: refactor openssl API usage
For the openssl crypto engine based cipher encrypt/decrypt and HMAC IPSec
use cases, the openssl API calls of doing ctx init and key expansion are
moved to initialization stage.
In current implementation , the ctx is initialized with "key" and "iv" in
EVP_EncryptInit_ex (ctx, 0, 0, key->data, op->iv)
in data plane, while the ctx can be initialized with 'key' and 'iv' separately,
which means there could be two API calls:
1. EVP_EncryptInit_ex (ctx, 0, 0, key->data, 0)
2. EVP_EncryptInit_ex (ctx, 0, 0, 0, op->iv)
As the 'key' for certain IPSec SA is fixed and known, so call #1 can
be placed in IPSec SA initialization stage.
While call #2 should be kept in data plane for each packet, as the "iv"
is random for each packet.
Type: feature
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Change-Id: Ided4462c1d4a38addc3078b03d618209e040a07a
Lijian Zhang [Wed, 8 Nov 2023 09:09:10 +0000 (09:09 +0000)]
wireguard: notify key changes to crypto engine
This is a prerequisite patch for the following openssl API optimization
patch, which tries to offload openssl ctx init and key expansion work to
the initialization stage.
Wireguard adds crypto keys via vnet_crypto_key_add (), and whenever it
modifies the keys, the underneath openssl crypto engine shoud be informed
of the changes to update the openssl ctx.
Type: feature
Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com>
Change-Id: I3e8f033f3f77eebcecfbd06e8e3bbbfdc95a50e2
Matthew Smith [Mon, 12 Feb 2024 18:39:21 +0000 (18:39 +0000)]
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:
dac9e566cd16fc375fff14280b37cb5135584fc6
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I69e951f22044051eb8557da187cb58f5535b54bf
Florin Coras [Sat, 17 Feb 2024 19:45:25 +0000 (11:45 -0800)]
udp: use transport port refcnt on accept
Use udp transport refcnt instead of local port refcnt when accepting new
connections.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ibc34677b1138682497f98e96b6fddb5b96094ff9
Tom Jones [Tue, 30 Jan 2024 09:19:13 +0000 (09:19 +0000)]
svm: Only include sys/user on Linux
Type: improvement
Change-Id: Idb318eb386617013015c43153bf0bd92fa28b9b6
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 09:26:42 +0000 (09:26 +0000)]
vnet: Add required header for pthread_np
Type: improvement
Change-Id: Ia9295b79340a18de6eb5fe80877dcf4ce97b35eb
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Mon, 29 Jan 2024 15:16:27 +0000 (15:16 +0000)]
vppinfra: Place hugepage MMAP call behind linux specific ifdef
Type: improvement
Change-Id: I3a48ec4fd4a4063b6e3792b87def7bb796fc947c
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Mon, 29 Jan 2024 15:12:34 +0000 (15:12 +0000)]
vnet: Use platform specific netlink headers on FreeBSD
Type: improvement
Change-Id: Ifbd84a45edc82c79ac2850dd70ecdd2f9f1289ae
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 09:26:14 +0000 (09:26 +0000)]
vnet: Disable tuntap build on not Linux
tuntap requires porting on FreeBSD, only build on Linux for now.
Type: improvement
Change-Id: I448c462b31f3bc06f291a95d0ff5df9d6f8f24b8
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 13:54:12 +0000 (13:54 +0000)]
vlib: Only init vfio on Linux
Type: improvement
Change-Id: Id1c72928324b85bc67860e600722bf8baeff45b2
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 14:04:12 +0000 (14:04 +0000)]
vpp: Add required socket headers on FreeBSD
Type: improvement
Change-Id: I948e447082233187d9ca794ca56a62fad4592e13
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 17:04:23 +0000 (17:04 +0000)]
vppinfra: Provide FreeBSD implementation of clib_mem functions
Working from the implementation in linux/mem.c add FreeBSD specific
functionality. This duplicates parts of the Linux implementation and a
depuplication job could be run in the future.
Stub out some parts of the API for now, they are either use unavailable
features on FreeBSD or require further implementation than this initial
implementation.
Type: improvement
Change-Id: I1e443e32304d19776a9a4d5e34adfa16ec919427
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Wed, 24 Jan 2024 10:50:14 +0000 (10:50 +0000)]
build: Add FreeBSD as a supported platform for cmake
Allow FreeBSD as a platform in the main CMakeLists file. This requires a
correct target for the compiler and an explicit name in the system
check.
The included subdirs require further changes to build, but the compiler
needs to find them before it can complain.
Type: improvement
Change-Id: Ic56fe68290519ef5d3ed61082e7fb0ba0528a3fc
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 09:06:47 +0000 (09:06 +0000)]
vnet: Provide platform specific if_tap headers
Type: improvement
Change-Id: Ia5cec0afc7f929491e495bb337493e64f752d75f
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 09:07:06 +0000 (09:07 +0000)]
vnet: Only build tap on Linux
tap requires some porting on FreeBSD, while we wait for those changes
only build tap on Linux.
Type: improvement
Change-Id: I4361bf43764fdb046c2138d4a2ee5d7efa31bd5a
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Tue, 30 Jan 2024 09:47:05 +0000 (09:47 +0000)]
vpp: Add platform specific headers for socket and inet
Type: improvement
Change-Id: Idcedc14089a49483d83c28a82ecb79d1b856f225
Signed-off-by: Tom Jones <thj@freebsd.org>
Florin Coras [Sat, 17 Feb 2024 02:36:32 +0000 (18:36 -0800)]
tcp: retransmit fins in last-ack
Fix instances where timers are reset after programming fin.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib80e3a401d585f388a97c7f2bb62e68ee774d50d
Florin Coras [Wed, 7 Feb 2024 19:42:02 +0000 (11:42 -0800)]
udp: unregister ports on all cleanups
UDP transport port refcount is incremented even if port is shared. So
decrement it, by unregistering, whener udp connections are cleaned up.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id0a2c60c5faf4dea8b2cd9ded0334934ad9e918c
Denys Haryachyy [Wed, 7 Feb 2024 14:47:20 +0000 (16:47 +0200)]
vppapitrace: Fixed trace dump API result issue.
Set last thread id and last packet position in TRACE_DUMP_REPLY.
To enable collection of traces from multiple workers using iterator.
Type: fix
Change-Id: I69872af4f6981d50cd050fa3d16de2a3c0d6b496
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
adrianvillin [Tue, 13 Feb 2024 08:26:25 +0000 (03:26 -0500)]
hs-test: shortened interface names to avoid character limit
Type: test
Change-Id: I09df597ccb8a3c4af47b8a36010afb81df533236
Signed-off-by: adrianvillin <avillin@cisco.com>
Florin Coras [Tue, 13 Feb 2024 20:37:20 +0000 (15:37 -0500)]
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>
Florin Coras [Thu, 15 Feb 2024 00:14:46 +0000 (16:14 -0800)]
session: postpone ct cleanup if rx evt pending
Type: fix
Change-Id: I8cfaa62abd38d5356263b0ffd428638d1a027617
Signed-off-by: Florin Coras <fcoras@cisco.com>
Benoît Ganne [Thu, 8 Feb 2024 16:06:22 +0000 (17:06 +0100)]
build: add fib configuring option
Allow to select 8-8-8-8 or 16-8-8 mtrie FIB implementation.
Type: improvement
Change-Id: I2f4aec8bfec987d3f3d9f9cc5a16fabf4b6cc2ac
Signed-off-by: Benoît Ganne <bganne@cisco.com>
adrianvillin [Mon, 12 Feb 2024 07:44:53 +0000 (02:44 -0500)]
hs-test: improved logging
- improved readability of some error messages
- printing container logs to stdout on test failure (last 20 lines)
Type: test
Change-Id: Idbb358bdd89aa7b1a6bdc9d96bf029d4c299ce64
Signed-off-by: adrianvillin <avillin@cisco.com>
Naveen Joy [Wed, 31 Jan 2024 16:46:18 +0000 (08:46 -0800)]
tests: refactor virtual interface tests
Split virtual interface tests in VPP into smaller and modular
tests for testing various interface types and features.
Type: test
Change-Id: Ic38af88379f75eee3090679d411edbdc8fd5d2e5
Signed-off-by: Naveen Joy <najoy@cisco.com>
Niyaz Murshed [Wed, 14 Feb 2024 00:12:32 +0000 (00:12 +0000)]
tls: fix compilation error
After changes done in https://gerrit.fd.io/r/c/vpp/+/40281 ,
mbedtls plugin is failing to build if enabled.
Discussion https://lists.fd.io/g/vpp-dev/topic/
104344802#24060
Type: fix
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
Change-Id: Iee58b69301ac64f058bca0a7f7a0dedd2def4b35
Denys Haryachyy [Wed, 24 Jan 2024 14:31:47 +0000 (16:31 +0200)]
ikev2: dump state and profile name in CLI and API
Type: improvement
Change-Id: Ide4b45da99e3a67376281f6438997f3148be08e5
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
Florin Coras [Tue, 13 Feb 2024 03:33:41 +0000 (22:33 -0500)]
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>
Tom Jones [Fri, 26 Jan 2024 17:44:33 +0000 (17:44 +0000)]
svm: Add FreeBSD specific signal handling path
FreeBSD's siginfo_t doesn't have the ptr value used on linux to encode a
token. Fow now recover the code from siginfo_t and leave the opaque
value as 0.
Type: improvement
Change-Id: Ic6ef96f018b326b99d68534a4488cfc49fdf16e1
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Thu, 25 Jan 2024 10:28:16 +0000 (10:28 +0000)]
vppinfra: Put clib_perf* behind Linux checks and provide stubs for FreeBSD
As a placeholder stub out clib_perf functions on FreeBSD, the interface
for performance counters on FreeBSD is different and will require its
own implementation.
Type: improvement
Change-Id: I61511ebe5ee1fd6fe93d3179c7843c811f47a846
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 14:58:18 +0000 (14:58 +0000)]
vppinfra: Add netlink header on FreeBSD
FreeBSD has support netlink since 13.2, but keeps its header in a
slightly different place. Correctly include netlink/netlink.h for
FreeBSD.
Type: improvement
Change-Id: Iec78ca72db74ea7f9c874e7039c7d17b6321f9dc
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 14:54:57 +0000 (14:54 +0000)]
vppinfra: Protect Linux specific features behind CLIB_LINUX
Place Linux specific features behind CLIB_LINUX. The previous #ifdef
calls would still pass even if CLIB_LINUX is set to 0 in clib.h, instead
use #if.
Type: improvement
Change-Id: Ibe4424eee4bc0065f54764b017b9a56a3e854380
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Wed, 24 Jan 2024 10:46:44 +0000 (10:46 +0000)]
build: Limit external libraries on FreeBSD
Limit the libraries we build on FreeBSD. This change intends to get us
closer to building on FreeBSD, DPDK will require a larger set of changes
so remove it until those changes are ready to integrate.
Type: improvement
Change-Id: I0f672a2b5bc30f2228020049fa71a81a2569ef54
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 17:32:02 +0000 (17:32 +0000)]
svm: Include stdint on FreeBSD
On FreeBSD we need to include stdint.h to get __WORDSIZE.
Type: improvement
Change-Id: I784aa0856fd8298f33016b7ccedecfa3672d5429
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 15:16:57 +0000 (15:16 +0000)]
vppinfra: Make program counter printing more portable
Finding the program counter in the ucontext struct is platform and
architecture specific, place the Linux checks inside an #ifdef and add a
look up for the FreeBSD amd64 specific naming.
Type: improvement
Change-Id: I42fcef5f20227c23d84acee336e37c4870146bb4
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 13:26:28 +0000 (13:26 +0000)]
vnet: Don't use __unused for struct padding
__unused is a clang keyword, this struct member will trip the build when
using clang. Instead call the unused padding 'pad' which should be clear
to the purpose if not the usage.
Type: improvement
Change-Id: I0abae34841651be1ef6b7d94864f0dc8185f0733
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 15:20:02 +0000 (15:20 +0000)]
vppinfra: Add a stubbed out test_perf function for FreeBSD
Type: improvement
Change-Id: If136e0854dbaecfa62fc009ca2b0b94e8d9a56f2
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 14:15:54 +0000 (14:15 +0000)]
vppinfra: MAP_HUGETLB isn't available on FreeBSD
Don't use the MAP_HUGETLB mmap flag on FreeBSD as it isn't available on
the platform.
Type: improvement
Change-Id: Ie2046601c693f9ef12cf8113d6dbd87c322f1cf0
Signed-off-by: Tom Jones <thj@freebsd.org>
Tom Jones [Fri, 26 Jan 2024 17:34:51 +0000 (17:34 +0000)]
vppinfra: Only prealloc hugepages on Linux
FreeBSD doesn't support sysfs or preallocating hugepages directly. In
lieu of refactoring clib_sysfs calls place this one behind an #ifdef
linux.
Type: improvement
Change-Id: I4079ca70175e4cec44d913db2b0407a3ca6306c9
Signed-off-by: Tom Jones <thj@freebsd.org>