vpp.git
28 hours agohs-test: clean up Makefile for compatibility with ci-management 21/40821/2 master
Dave Wallace [Thu, 25 Apr 2024 20:21:37 +0000 (16:21 -0400)]
hs-test: clean up Makefile for compatibility with ci-management

Type: test
Change-Id: Ic767bc1eef0180941dd8730f9fcca1389ad7e043
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
37 hours agovcl: Only exclude vcl ldpreload on FreeBSD 16/40816/2
Tom Jones [Thu, 25 Apr 2024 13:39:05 +0000 (13:39 +0000)]
vcl: Only exclude vcl ldpreload on FreeBSD

Previously all of the vcl library was excluded from the build on
FreeBSD, this was too agressive as only the ldpreload component requeres
platform specific implementation for FreeBSD

Type: improvement
Change-Id: I94e70d7730878cc98060561eedf07cb7e4d1868a
Signed-off-by: Tom Jones <thj@freebsd.org>
41 hours agohsa: Link against libepoll-shim 95/40795/1
Tom Jones [Thu, 25 Apr 2024 13:33:34 +0000 (13:33 +0000)]
hsa: Link against libepoll-shim

Type: improvement
Change-Id: I08610ce71282f10c587d956b27e0f572a812bedd
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: bump rdma-core to 51.0 87/40787/3
Dave Wallace [Wed, 24 Apr 2024 17:19:18 +0000 (13:19 -0400)]
dpdk: bump rdma-core to 51.0

- Per dpdk 24.03 release notes (rdma-core >= 50.0)

Type: feature
Change-Id: Ieed077dc9b54cc1c59c75ebdbccfc683c7636222
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 days agovlib: Add FreeBSD thread specific header and calls 41/40341/10
Tom Jones [Mon, 29 Jan 2024 10:55:09 +0000 (10:55 +0000)]
vlib: Add FreeBSD thread specific header and calls

Type: improvement
Change-Id: Ia84683936da02968991ea717316a834a5da1a517
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agovppinfra: Link against lib execinfo on FreeBSD 70/40270/4
Tom Jones [Fri, 26 Jan 2024 16:36:52 +0000 (16:36 +0000)]
vppinfra: Link against lib execinfo on FreeBSD

Type: improvement
Change-Id: Ie3d6cba886e0779949e8d574f82cff62abc7ebed
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agovppinfra: Add FreeBSD method for updating pmalloc lookup table 39/40639/3
Tom Jones [Fri, 2 Feb 2024 14:25:24 +0000 (14:25 +0000)]
vppinfra: Add FreeBSD method for updating pmalloc lookup table

FreeBSD has a different interface to request memory mapping information.
Add a FreeBSD specific method for reading physical addresses and make it
available at build time.

Type: improvement
Change-Id: I3588dde8e0a6f6d53333040245341ed09cebef9d
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: bump to DPDK 24.03 79/40779/2
Kai Ji [Tue, 23 Apr 2024 16:10:13 +0000 (16:10 +0000)]
dpdk: bump to DPDK 24.03

This patch bumps DPDK version to 24.03

Type: feature
Change-Id: I4d7d1348f905579ece3cbe4ab89873abd212c636
Signed-off-by: Kai Ji <kai.ji@intel.com>
2 days agohsa: fix http client error handling 81/40781/2
Matus Fabian [Wed, 24 Apr 2024 08:29:41 +0000 (10:29 +0200)]
hsa: fix http client error handling

Type: fix

Change-Id: I5595260b903e3e1f15caccd168914f33f7161b59
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2 days agomisc: fix int/enum mismatch errors reported by gcc-14 82/40782/2
Damjan Marion [Wed, 24 Apr 2024 11:21:05 +0000 (11:21 +0000)]
misc: fix int/enum mismatch errors reported by gcc-14

Type: fix
Change-Id: I80e90cab8e2e9fef837779e36e0256baf791b801
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 days agodpdk: remove unnecessary includes 83/40783/2
Damjan Marion [Wed, 24 Apr 2024 11:36:01 +0000 (11:36 +0000)]
dpdk: remove unnecessary includes

Type: improvement
Change-Id: Idf3d440ee9763b54c973e6d87394b786eb66e307
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 days agodpdk: remove dead code 84/40784/2
Damjan Marion [Wed, 24 Apr 2024 11:41:12 +0000 (11:41 +0000)]
dpdk: remove dead code

Type: improvement
Change-Id: I888f29e1ff15c5aa59a2a74dc0b2a818baf0bfde
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 days agovlib: Add a skeleton pci interface for FreeBSD 73/40473/5
Tom Jones [Tue, 30 Jan 2024 10:39:23 +0000 (10:39 +0000)]
vlib: Add a skeleton pci interface for FreeBSD

Implement a subset of the pci interface with unimplemented methods
marked with a comment. This is enough functionality to allow dpdk to
attach to pci devices and forward traffic on FreeBSD.

Type: improvement
Change-Id: I0d87778cd92ae332a6802c11083d3d99988678a1
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agofateshare: Add FreeBSD specific API for controlling processes 11/40611/2
Tom Jones [Thu, 8 Feb 2024 14:55:36 +0000 (14:55 +0000)]
fateshare: Add FreeBSD specific API for controlling processes

Type: improvement
Change-Id: I7ea8b5505a2663d6751208f0001e4b9ba2deb150
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agoapi: Add FreeBSD specific mechanisms for unix sockets 37/40637/4
Tom Jones [Mon, 29 Jan 2024 15:08:01 +0000 (15:08 +0000)]
api: Add FreeBSD specific mechanisms for unix sockets

FreeBSD doesn't support SCM_CREDENTIALS, but has an equivalent mechanism
called SCM_CRED. This is documented in unix(4), use SCM_CREDS on
FreeBSD.

Type: improvement
Change-Id: Iaf4ec0d68445239c06fa0eef6c25db7e3328e989
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: Use FreeBSD specific values for network interface classes 46/40646/2
Tom Jones [Fri, 2 Feb 2024 14:28:38 +0000 (14:28 +0000)]
dpdk: Use FreeBSD specific values for network interface classes

The PCI class values used to identify devices are different between
platforms. Add a selector for the values used on FreeBSD.

Type: improvement
Change-Id: I981f0dc24954457068fc94bcc4681b120ee253db
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: Only use vmbus on Linux 45/40645/2
Tom Jones [Fri, 2 Feb 2024 14:28:09 +0000 (14:28 +0000)]
dpdk: Only use vmbus on Linux

Type: improvement
Change-Id: If181c4bfd7fc93583a608d478bd070930c853f52
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: Disable building FreeBSD kernel modules 44/40644/2
Tom Jones [Thu, 1 Feb 2024 16:07:54 +0000 (16:07 +0000)]
dpdk:  Disable building FreeBSD kernel modules

Disable building the FreeBSD kernel modules, while these are required
to run, this dpdk step will fails inside the vpp build.

If the build succeeded this step would try to install the kernel modules
as root in the vpp build which also isn't desirable. For packaging the
kernel modules should be provided in a seperate package rather than
through the vpp build process.

Type: improvement
Change-Id: I01f1ae2845445e2babad380b675054b80d4b325b
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: Only use vmbus on Linux 42/40642/2
Tom Jones [Thu, 1 Feb 2024 16:05:31 +0000 (16:05 +0000)]
dpdk: Only use vmbus on Linux

Type: improvement
Change-Id: Iba3e287f420c0bdc8d248695163e7dfe1acd24d8
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agodpdk: Only require libnuma on Linux 43/40643/2
Tom Jones [Thu, 1 Feb 2024 16:06:25 +0000 (16:06 +0000)]
dpdk: Only require libnuma on Linux

On FreeBSD the numa APIs are always available.

Type: improvement
Change-Id: I34b8f6b0a81bc3d73f9b95b10d3a788dcdd71b65
Signed-off-by: Tom Jones <thj@freebsd.org>
2 days agovppinfra: Add method for getting current executable name 94/40394/6
Tom Jones [Wed, 24 Apr 2024 10:30:20 +0000 (10:30 +0000)]
vppinfra: Add method for getting current executable name

Add a unix method for getting the current executable name. This is
implemented to match the readlink api for existing calls.

Type: improvement
Change-Id: Id06a55892d09d0b305a56b55a424f53ffb685a72
Signed-off-by: Tom Jones <thj@freebsd.org>
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 days agotls: don't upper-case cipher string 80/40780/1
Brian Morris [Tue, 23 Apr 2024 20:17:10 +0000 (20:17 +0000)]
tls: don't upper-case cipher string

Change-Id: Ic8308046610aa5d49d9595bcd450f9651b9915e4
Signed-off-by: Brian Morris <bmorris2@cisco.com>
The string is allowed to contain lower case characters, for example "TLSv1.2"
Type: fix

3 days agoipsec: fix CLI for create ipsec itf 68/40768/3
Gabriel Oginski [Thu, 18 Apr 2024 12:14:34 +0000 (12:14 +0000)]
ipsec: fix CLI for create ipsec itf

This commit adds missing support in CLI for creating ipsec itf
in p2mp mode.

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

3 days agoocteon: add promisc support 62/40662/4
Guillaume Solignac [Tue, 9 Apr 2024 09:40:51 +0000 (11:40 +0200)]
octeon: add promisc support

We add the capability to enable and disable promiscous mode on the
octeon port.

Type: feature
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I9a1464d2e1e8a0570ff16e221a4896aedc3ed6f8

3 days agotests: allow ip table name 49/40649/7
Maxime Peim [Fri, 5 Apr 2024 12:16:39 +0000 (14:16 +0200)]
tests: allow ip table name

Type: refactor
Change-Id: I4abbc77a447358f4beaa05505299cae732a3f374
Signed-off-by: Maxime Peim <mpeim@cisco.com>
3 days agoikev2: uptime 70/40570/5
Denys Haryachyy [Tue, 20 Feb 2024 07:59:55 +0000 (09:59 +0200)]
ikev2: uptime

Introduced SA and child SA uptime.

Type: improvement

Change-Id: I28cf9f90d35ebe035a31ed0a985a5e462c8536a8
Signed-off-by: Denys Haryachyy <garyachy@gmail.com>
4 days agohs-test: add tests repeat option 74/40774/2
Matus Fabian [Mon, 22 Apr 2024 17:47:27 +0000 (19:47 +0200)]
hs-test: add tests repeat option

Type: test

Change-Id: I0143d26d929f6408a5399d7ca536e48cbd9d46bb
Signed-off-by: Matus Fabian <matfabia@cisco.com>
4 days agohs-test: fix TCP with loss test 69/40769/2
Matus Fabian [Mon, 22 Apr 2024 11:42:00 +0000 (13:42 +0200)]
hs-test: fix TCP with loss test

Load NSIM plugin.

Type: test

Change-Id: I250f51e6622419d98fd17216031a5b4d2da07fba
Signed-off-by: Matus Fabian <matfabia@cisco.com>
4 days agoocteon: add support for SDP device 08/40708/2
Monendra Singh Kushwaha [Mon, 15 Apr 2024 06:11:45 +0000 (11:41 +0530)]
octeon: add support for SDP device

This patch adds support for SDP (System DPI Packet Interface Unit)
device.

Type: feature

Change-Id: Idf1f53b151edf2992613746d5818409187b4b051
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
4 days agovlib: Place linux pci headers in a linux include block 36/40636/2
Tom Jones [Mon, 29 Jan 2024 10:34:21 +0000 (10:34 +0000)]
vlib: Place linux pci headers in a linux include block

Type: improvement
Change-Id: I6b30ffd1eabfa9544d548082b7e38b8fe7224c07
Signed-off-by: Tom Jones <thj@freebsd.org>
4 days agonat: add saddr info to nat44-ed o2i flow's rewrite 89/39989/6
lijh_7 [Mon, 19 Feb 2024 01:17:47 +0000 (09:17 +0800)]
nat: add saddr info to nat44-ed o2i flow's rewrite

Type: fix

Change-Id: Ic303ff9b21872b7cc31f23c92e48ec3737eeb8fe
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
7 days agoipip: specify af for a tunnel ip addresses 55/40755/2
Anton Nikolaev [Fri, 19 Apr 2024 15:22:44 +0000 (15:22 +0000)]
ipip: specify af for a tunnel ip addresses

Currently ipip tunnel allows to use an empty addresses for dst when we
trying to add tunnel, but it doesn't return it correctly on ipip dump
call. There is case when we create an ipip tunnel with an empty ipv6
address, address is zero, but AF is ipv6. And when we dump ipip tunnels
we get an emtpy ipv4 address instead of an empty ipv6 address.
There is no point to detect AF for each address in
send_ipip_tunnel_details, because ipip tunnel can't handle different
AF for src and dst addresses, and prohibits creating ipip tunnel
with different AF of dst and src addresses.

With this fix, send_ipip_tunnel_details function return a correct AF
despite address value.

Type: fix
Change-Id: Ib343293ad79a300cdb70135fffbfd156dfef6e27
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
7 days agohs-test: transition to ginkgo test framework 17/40517/13
Adrian Villin [Thu, 14 Mar 2024 15:42:55 +0000 (11:42 -0400)]
hs-test: transition to ginkgo test framework

Type: test

Change-Id: Ia38bf5549d20b22876f6082085b69a52a03d0142
Signed-off-by: Adrian Villin <avillin@cisco.com>
Signed-off-by: Matus Fabian <matfabia@cisco.com>
8 days agosr: use correct reply to sr_policy_add_v2 99/40699/2
Vratko Polak [Thu, 11 Apr 2024 14:06:29 +0000 (16:06 +0200)]
sr: use correct reply to sr_policy_add_v2

Type: fix
Fixes: c4c205b091934d96a173f4c0d75ef7e888298ac7

Change-Id: I110729601a9f19451297883b781ec56e2b31465b
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
9 days agosession: force session cleanups on app detach 37/40737/6
Florin Coras [Tue, 16 Apr 2024 23:53:14 +0000 (16:53 -0700)]
session: force session cleanups on app detach

Force transport and session cleanup on session detach if transport is
already closing. This should also avoid races between transport
initiated session cleanups and pending session control events.

Type: improvement

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

11 days agoip: fix comments for icmp4 16/40716/2
lijinhui [Mon, 15 Apr 2024 02:07:46 +0000 (10:07 +0800)]
ip: fix comments for icmp4

Type: fix
Change-Id: I5f309ca4db4ae4a3e475d87b8f0188c4ead5e562
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
11 days agocrypto-sw-scheduler: crypto-dispatch improvement 73/40373/2
Niyaz Murshed [Wed, 21 Feb 2024 19:52:31 +0000 (19:52 +0000)]
crypto-sw-scheduler: crypto-dispatch improvement

Currently sw_scheduler runs interchangeably over queues of one selected
type either ENCRYPT or DECRYPT, then switches the type for the next run.
This runs perfectly when we have elements in both ENCRYPT and DECRYPT
queues, however, this leads to performance degradation when only one
of the queues have elements i.e either all traffic is to be encrypted or
decrypted.
If all operations are encryption, then 50% of the time, the loop exits
without dequeueing.With this change, that dequeueing happens on every
loop. This increases the performance of single mode operation (ecryption
or decryption) by over 15%.

This change was also added in commit https://github.com/FDio/vpp/commit/61cdc0981084f049067626b0123db700035120df
to fix similar performance issue when the crypto-dispatch node is in interrupt
node, however was removed by https://github.com/FDio/vpp/commit/9a9604b09f15691d7c4ddf29afd99a31e7e31eed
which has its own limitations.

Type: improvement
Change-Id: I15c1375427e06187e9c4faf2461ab79935830802
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
11 days agolinux-cp: fix seg fault in get_v2 methods 74/40674/3
Anton Nikolaev [Thu, 22 Feb 2024 09:21:45 +0000 (09:21 +0000)]
linux-cp: fix seg fault in get_v2 methods

vl_api_lcp_itf_pair_get_v2_t_handler method was not be able to
handle invalid sw_if_index, it caused a seg fault.

With this fix, the method checks for an invalid sw_if_index and
sends error back to caller.

Type: fix
Change-Id: I4e89b0cab34f9109c4ce2689021ecfc2786055ab
Signed-off-by: Anton Nikolaev <anikolaev@netgate.com>
2 weeks agog2: fix gpointer cast complaints 96/40696/2
Florin Coras [Thu, 11 Apr 2024 01:31:57 +0000 (18:31 -0700)]
g2: fix gpointer cast complaints

Type: fix

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

2 weeks agostn: fix non-NULL terminated string overflow 61/40661/2
Benoît Ganne [Mon, 8 Apr 2024 09:54:01 +0000 (11:54 +0200)]
stn: fix non-NULL terminated string overflow

Type: fix

Change-Id: I9d7e6dd099cf9f4b7f6bb06d9e8a17fac7d7e772
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 weeks agotcp: check for header truncation 64/40664/3
Benoît Ganne [Tue, 9 Apr 2024 10:03:53 +0000 (12:03 +0200)]
tcp: check for header truncation

Type: fix

Change-Id: I0a43a37971d03a700926d59e848f0b6e6dbeb19a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 weeks agosession: add api to detach session from app 68/40668/5
Florin Coras [Tue, 9 Apr 2024 20:27:53 +0000 (13:27 -0700)]
session: add api to detach session from app

Type: improvement

Change-Id: Ib824d0ca9efc7d8967e043db69017655b2dcf6b5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2 weeks agovlib: fix vlib_buffer_free_inline() AVX-512 overflow 63/40663/2
Benoît Ganne [Mon, 8 Apr 2024 14:49:06 +0000 (16:49 +0200)]
vlib: fix vlib_buffer_free_inline() AVX-512 overflow

'queue' is declared on the stack and must be big enough to handle
queue_size + max processed elements per loops.
When AVX-512 was added, this additional max was not increased from 4 to
8 accordingly.

Type: fix
Fixes: 767a9ab4b1

Change-Id: I15f2f930fc316f92da2e4642f41852d856c06a48
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 weeks agobuild: use GNUInstallDirs where possible 60/40260/3
Wim de With [Sun, 28 Jan 2024 10:05:15 +0000 (11:05 +0100)]
build: use GNUInstallDirs where possible

Some installation destinations were already converted to the
GNUInstallDirs standard in e3cf4d0cf. This patch converts the share and
include directories (typically /usr/share and /usr/include respectively)
as well.

Type: improvement
Change-Id: Id481b16604f3f52203166a5c0647f43d6eb05239
Signed-off-by: Wim de With <wf@dewith.io>
2 weeks agovppinfra: add support for precomputed SHA2 HMAC key and chained buffers 65/40665/3
Damjan Marion [Tue, 9 Apr 2024 12:37:25 +0000 (12:37 +0000)]
vppinfra: add support for precomputed SHA2 HMAC key and chained buffers

Change-Id: Ic1fa3bd164e80c2ca1146be001870da0238a5f2e
Type: improvement
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 weeks agotests: allow to add paths to default route 01/40601/4
Maxime Peim [Tue, 9 Apr 2024 07:08:00 +0000 (09:08 +0200)]
tests: allow to add paths to default route

After adding a path to the default route, the prefix still be there
in the table as it is a mandatory prefix. However, the registry hence
fail to remove the route from VPP.

Type: fix
Change-Id: Ic4ad72455ac7a1a2f1d8baba59a7a3afe1610726
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2 weeks agotests: Added a simple prom(etheus exporter) plugin test 58/40058/5
adrianvillin [Tue, 5 Dec 2023 10:47:00 +0000 (11:47 +0100)]
tests: Added a simple prom(etheus exporter) plugin test

Type: test

Change-Id: Ibceabc411f09d80cc23be6f2e7c8abd56d4c4ac2
Signed-off-by: adrianvillin <avillin@cisco.com>
2 weeks agobuild: Error out Makefile if bash can't be found 08/40608/2
Tom Jones [Tue, 6 Feb 2024 10:05:06 +0000 (10:05 +0000)]
build: Error out Makefile if bash can't be found

Type: improvement
Change-Id: I3bba4e53364dbcc0d7a373fdc9cac2db3bbb4249
Signed-off-by: Tom Jones <thj@freebsd.org>
2 weeks agoacl: Use clib_net_to_host rather than library bswap 83/40383/4
Tom Jones [Thu, 14 Mar 2024 12:24:04 +0000 (12:24 +0000)]
acl: Use clib_net_to_host rather than library bswap

Type: improvement
Change-Id: I51345fb75843c67c6bf6a4c56380e1f0899c45b1
Signed-off-by: Tom Jones <thj@freebsd.org>
2 weeks agofib: fix off-by-one error in rewrite length check 64/40464/3
Benoît Ganne [Wed, 6 Mar 2024 18:02:18 +0000 (19:02 +0100)]
fib: fix off-by-one error in rewrite length check

The rewrite string can be up to max_size, and max_size can be up to
VNET_REWRITE_TOTAL_BYTES. Don't waste the last byte.

Type: fix

Change-Id: I2fb7e9873b6b4c1e6a55b172c7f753f3c5910802
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2 weeks agompls: fix default mpls lb hash config 47/40447/3
Vladislav Grishenko [Wed, 24 Jan 2024 11:17:23 +0000 (16:17 +0500)]
mpls: fix default mpls lb hash config

In case of multiple path within tunnel, mpls lookup node
computes lb hash with mpls_compute_flow_hash config value 0,
so only mpls label and l4 ports gets accounted, not 5-tuple.
This leads to flow traffic polarization and disbalance over
mpls paths.

Use mpls hash config from lb instead, usually it'll be
MPLS_FLOw_HASH_DEFAULT with 5-tuple plus flowlabel.
As optimization, fix flow hash reuse from the previous lookup
node if present, like ip_lookup does. Previously mpls lookup
always calcs the hash.
Test lb distribution for both cases.

Also, use the same flow hash hex format in ip4/ip6 and mpls
traces for easier reading, most code changes is due fixstyle
formatting.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ib89e1ab3edec14269866fe825a3e887d6c817b7c

2 weeks agovnet: fix ARP for unnumbered 82/40482/7
Pim van Pelt [Fri, 8 Mar 2024 08:27:40 +0000 (09:27 +0100)]
vnet: fix ARP for unnumbered

On unnumbered interfaces, ARP fails because there is no attached route.
Allow replies to peer-to-peer addresses on unnumbered interfaces:
  eg. 192.0.2.1/32 <-> 192.0.2.2/32

Type: fix
Change-Id: Ibeb8d8ebc8d58d5bfb0724739a17694e0217356e
Signed-off-by: Pim van Pelt <pim@ipng.nl>
2 weeks agotls: fix session state update on accept 58/40658/3
Florin Coras [Fri, 5 Apr 2024 21:50:10 +0000 (14:50 -0700)]
tls: fix session state update on accept

Only set state to ready if session is not already closing.

Type: fix

Change-Id: Ic95667f43ed09d693f1cf7c9f1c16f7f995ea2d8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2 weeks agovppinfra: fix mask compare and compress OOB reads 49/40149/4
Dmitry Valter [Wed, 6 Mar 2024 22:43:27 +0000 (22:43 +0000)]
vppinfra: fix mask compare and compress OOB reads

Use mask_load_zero to avoid out-of-buffer reads in vectorized
function versions.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Change-Id: I12bcb817ccf2db210c1c99fdfa444dc3f540035b

3 weeks agoocteon: fix memory ordering issue in tx batch free 35/40635/4
Damjan Marion [Fri, 29 Mar 2024 20:33:03 +0000 (21:33 +0100)]
octeon: fix memory ordering issue in tx batch free

Type: fix
Fixes: 01fe7ab
Change-Id: I4425e809f0977521ddecf91b58b26fe4519dd6e0
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 weeks agosession: fix cleanup for refused sessions 56/40656/2
Florin Coras [Fri, 5 Apr 2024 05:09:58 +0000 (22:09 -0700)]
session: fix cleanup for refused sessions

Type: fix

Change-Id: I739b7129c7e5a3fccefcdeeaf7f4a298223dd8eb
Signed-off-by: Florin Coras <fcoras@cisco.com>
3 weeks agoocteon: fix buffer free on full tx ring 25/40625/2
Damjan Marion [Sat, 30 Mar 2024 13:56:51 +0000 (14:56 +0100)]
octeon: fix buffer free on full tx ring

Type: fix
Fixes: 01fe7ab
Change-Id: I4419107c4bcb7f85b76addfc62178b6e75e10a52
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 weeks agoapi: fix [un]formatting in vpp/api/types.c 34/40634/4
Klement Sekera [Tue, 2 Apr 2024 10:51:10 +0000 (12:51 +0200)]
api: fix [un]formatting in vpp/api/types.c

vl_api_prefix_t.len is 1 byte only, but unformat %d writes 4 bytes
add helper functions unformat_u(8|16) which don't write more than
appropriate amount of bytes
fix other similar errors in vpp/api/types.c

Type: fix
Change-Id: I74a61a377147c373f8c25ed083052b2287763c39
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
3 weeks agoip6: fix icmp trace flag copy 53/40653/1
Maxime Peim [Thu, 4 Apr 2024 09:41:04 +0000 (11:41 +0200)]
ip6: fix icmp trace flag copy

Type: fix
Change-Id: I56c1a2717f197c889425449b37f51b0f2cc89ea5
Signed-off-by: Maxime Peim <mpeim@cisco.com>
3 weeks agotests: upgrade python packages 51/40651/2
Dave Wallace [Wed, 3 Apr 2024 16:31:42 +0000 (12:31 -0400)]
tests: upgrade python packages

Type: test

Change-Id: I01500466f3d15c79e38028677ce7e5c75d427fdc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 weeks agotests: figure out correct version of sed to run 38/40638/1
Matthew Smith [Tue, 2 Apr 2024 18:27:19 +0000 (18:27 +0000)]
tests: figure out correct version of sed to run

In run_in_venv_with_cleanup.sh, sed was changed to gsed to allow the
script to run properly on FreeBSD because the sed script uses an
expression that is specific to the gnu sed. Gnu sed is available to
be invoked as gsed on FreeBSD systems, but there is no executable or
symlink which allows sed to be run by the name gsed on ubuntu 22.04.

Check for the existence of gsed. If it's found, use it. Otherwise, just
use sed.

Type: fix
Fixes: b3c863eae4

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Change-Id: I487197e486f500711aa3e87ec7ba899a53606b40

3 weeks agosession: fix closing ntfs handling for refused sessions 32/40632/4
Florin Coras [Tue, 2 Apr 2024 02:51:22 +0000 (19:51 -0700)]
session: fix closing ntfs handling for refused sessions

Type: fix

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

3 weeks agofib: coverity 335348 out-of-bounds access 37/40237/5
Dave Wallace [Tue, 23 Jan 2024 04:05:39 +0000 (23:05 -0500)]
fib: coverity 335348 out-of-bounds access

- also fix memory leak in adj_glean_walk_proto()

Type: fix

Change-Id: I3cd72b14506e6bfc9d8d77a65d7b9b2703992367
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
3 weeks agovppinfra: fix array_mask_u32 underrun 63/40463/2
Dmitry Valter [Wed, 6 Mar 2024 17:17:54 +0000 (17:17 +0000)]
vppinfra: fix array_mask_u32 underrun

Properly handle small buffers in the AVX256 version of array_mask_u32.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.com>
Fixes: f62ed3f9c1ec3e8db36f63d6a54f46b7bea43723
Change-Id: Idf1cb43ccf37bd7c439d11e4f68fe30064c6d09a

3 weeks agoapi: fix rx timeout thread busy loop after reconnect 42/40442/2
Vladislav Grishenko [Sat, 13 Mar 2021 10:17:03 +0000 (15:17 +0500)]
api: fix rx timeout thread busy loop after reconnect

After memclnt api client disconnect, read timeout is set to zero
and stays the same even after same client reconnect. It causes
client process to spin in timeout loop up to 100% cpu.
Fix it by resetting timeout process state upon every (re)connect.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I56812972a69c343f869eebbdfebdcbefd3d201e0

3 weeks agomap: BR rule lookup update 15/40515/10
Dan Geist [Wed, 13 Mar 2024 15:24:05 +0000 (11:24 -0400)]
map: BR rule lookup update

Update to the MAP rule lookup (in IPv6) based on the rule's source
prefix instead of DMR

Type: improvement

Per RFC, the DMR is allowed to serve multiple MAP Basic Mapping Rules, but this
capability was prevented by the above logic.

Updates to the code include populating a new hash table based on the MAP rule
ip6 prefix and length, changing several functions to reference this new table,
and slight alterations to a few functions regarding pre-lookup bitmasking.

All changes are commented with [dgeist] and are in need of peer review,
especially the bitmask alterations.

An attempt was made at generating an additonal MAP rule in the test_map_br test
harness, but the coding appears very much oriented towards testing just one
rule. I would appreciate suggestions on how to test multi-rule cases.

Issue: VPP-2111
Change-Id: Id1fea280eba625e23cd893575d9b63aac7f48405
Signed-off-by: Dan Geist <dan@polter.net>
3 weeks agomisc: in crcchecker.py, don't check for uncommitted changes in CI 40/40540/2
Dave Wallace [Fri, 15 Mar 2024 01:41:00 +0000 (21:41 -0400)]
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>
3 weeks agovapi: avoid memory leak 04/40604/2
Klement Sekera [Mon, 25 Mar 2024 14:23:55 +0000 (15:23 +0100)]
vapi: avoid memory leak

Erase removed elements to avoid memory leaks.

Type: fix
Change-Id: I1605bea8df7e08455691364efb0a12eb0d9dae93
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
3 weeks agolb: fix using vip after free 65/40465/2
Georgy Borodin [Wed, 25 Oct 2023 23:44:12 +0000 (01:44 +0200)]
lb: fix using vip after free

fix use of vip after it was deleted

Type: fix
Fixes: 041eacc81656d2ed5bc01b96b15a7d03a1700f13
Change-Id: I5723485c5da7507fbc6c86ff6eb9f77127439f67
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
3 weeks agotests: Use gnu sed explicitly in test setup/tear down 10/40610/2
Tom Jones [Wed, 7 Feb 2024 13:36:53 +0000 (13:36 +0000)]
tests: Use gnu sed explicitly in test setup/tear down

Type: improvement
Change-Id: Ie79fd8a5bcfd72a97bf460ef6437913ac34f439c
Signed-off-by: Tom Jones <thj@freebsd.org>
3 weeks agotests: Add missing socket imports in tests 59/40559/3
Tom Jones [Wed, 7 Feb 2024 13:26:41 +0000 (13:26 +0000)]
tests: Add missing socket imports in tests

Type: fix
Change-Id: I646f96517d3bda5c0f5644e6bb89ade7818fc466
Signed-off-by: Tom Jones <thj@freebsd.org>
3 weeks agol2: fix vxlan src port entropy with mpls payload 48/40448/4
Vladislav Grishenko [Wed, 24 Jan 2024 15:33:12 +0000 (20:33 +0500)]
l2: fix vxlan src port entropy with mpls payload

l2 tunnels like vxlan, gtpu, geneva use vnet_l2_compute_flow_hash() to
compute flow hash for udp src port entropy. In case of inner mpls tunnels
to the same lsr ethernet src and dst macs are the same, so l2 flow hash
is also the same leading to no src port entropy and the only rss queue
overflow on receiver side.

Fix it for all the possible vnet_l2_compute_flow_hash callers by making
mpls playload hash in additon to ip4/ip6. Visible performance impact is
not expected as it's only one check for mpls ethertype for common cases.

Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I69153d42fb3d7c094a670c674fac8d14039c626a

3 weeks agolinux-cp: add support for tap num queues config 41/40441/4
Vladislav Grishenko [Sat, 7 Oct 2023 18:04:03 +0000 (23:04 +0500)]
linux-cp: add support for tap num queues config

This change allows to limit lcp interface queues
to be used by explicit host interface workers.

Type: improvement
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: I0626f66021e5a5f251470156231dc44ddaea5ee6

3 weeks agofib: add early config support for IP and IP6 default FIB table names 05/40605/4
Jon Loeliger [Fri, 22 Mar 2024 17:22:36 +0000 (12:22 -0500)]
fib: add early config support for IP and IP6 default FIB table names

Type: improvement
Change-Id: I8c248d9e224bd069b641a174da57d448371470af
Signed-off-by: Jon Loeliger <jdl@netgate.com>
3 weeks agovhost: Only enable plugin on Linux 12/40612/3
Tom Jones [Thu, 8 Feb 2024 14:59:03 +0000 (14:59 +0000)]
vhost: Only enable plugin on Linux

Type: improvement
Change-Id: I6cf5adbd609d911e15dcc6d976cda4ad21ce89ad
Signed-off-by: Tom Jones <thj@freebsd.org>
3 weeks agovlib: fix counter_index check 92/39992/3
lijinhui [Thu, 22 Feb 2024 03:16:10 +0000 (11:16 +0800)]
vlib: fix counter_index check

Ensure counter index is valid before using it to lookup
the counter.

Type: fix
Change-Id: I423c7a6aa6b65f6367b18d8e99cf40f52e06b416
Signed-off-by: lijinhui <lijh_7@chinatelecom.cn>
3 weeks agoocteon: specify pool when alloc buffers 19/40619/2
Damjan Marion [Wed, 27 Mar 2024 21:53:21 +0000 (22:53 +0100)]
octeon: specify pool when alloc buffers

Type: fix
Fixes: 01fe7ab
Change-Id: I72fdaca250468d91a31efcce2fb447c97ba49dc7
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 weeks agoocteon: refill even if nothing dequeued from rx queue 18/40618/2
Damjan Marion [Wed, 27 Mar 2024 21:19:15 +0000 (22:19 +0100)]
octeon: refill even if nothing dequeued from rx queue

It may happen that rx queue is empty of free buffers due to previous
alloc failure.

Type: fix
Fixes: 01fe7ab
Change-Id: I344dcda11525444bd1358b3d36ffdf8ab9aa2677
Signed-off-by: Damjan Marion <damarion@cisco.com>
3 weeks agoipsec: fix clang compile issue 20/40620/2
Kai Ji [Thu, 28 Mar 2024 17:21:37 +0000 (17:21 +0000)]
ipsec: fix clang compile issue

Type: fix

Change-Id: Ic015b37e18a43c49c3fb3dbff284a17fa2c5fd99
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
Signed-off-by: Kai Ji <kai.ji@intel.com>
3 weeks agotls: fix rescheduling when no data available 23/40623/3
Florin Coras [Fri, 29 Mar 2024 22:39:58 +0000 (15:39 -0700)]
tls: fix rescheduling when no data available

Don't force tx rescheduling of tls session if no forward progress is
made. The session will still be rescheduled by the session infra if
there's pending tx data.

Type: fix

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

4 weeks agosession: fix api coverity warnings 24/40624/2
Florin Coras [Sat, 30 Mar 2024 01:28:35 +0000 (18:28 -0700)]
session: fix api coverity warnings

Type: fix

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

4 weeks agosession: add new api for enq tx io events 99/40599/10
Florin Coras [Fri, 22 Mar 2024 23:29:09 +0000 (16:29 -0700)]
session: add new api for enq tx io events

Type: improvement

Change-Id: Iefe5c2e610a26241a88ca783ac548fd8f2317bb0
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 weeks agosession: use custom types for session flags and state 21/40621/3
Florin Coras [Fri, 29 Mar 2024 03:07:31 +0000 (20:07 -0700)]
session: use custom types for session flags and state

Type: improvement

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

4 weeks agosession: improve use of session handles 29/39329/16
Florin Coras [Fri, 4 Aug 2023 23:14:01 +0000 (16:14 -0700)]
session: improve use of session handles

First step towards moving to an 8 byte struct instead of u64.

Type: improvement

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

4 weeks agovlib: improve automatic core pinning 06/40606/11
hsandid [Mon, 25 Mar 2024 16:51:31 +0000 (17:51 +0100)]
vlib: improve automatic core pinning

Type: feature

Auto core pinning now fetches vpp cpu affinity list
using pthread api. This enables us to do core-pinning in
environments where the host cpu list does not necessarily align
with cpus available to vpp

Change-Id: Ife8c2a2351c08c5c6c4fdf7c729eeff2697bc39a
Signed-off-by: hsandid <halsandi@cisco.com>
4 weeks agomisc: deprecate lawful-intercept 13/40613/3
hsandid [Tue, 26 Mar 2024 17:44:19 +0000 (18:44 +0100)]
misc: deprecate lawful-intercept

Type: refactor
Change-Id: Ifd7f5b351401cdcaaaf57fefc5dbbfdaf235054e
Signed-off-by: hsandid <halsandi@cisco.com>
4 weeks agoacl: rework headers to enable out-of-tree usage 39/40539/3
Mohammed Hawari [Thu, 14 Mar 2024 21:51:55 +0000 (22:51 +0100)]
acl: rework headers to enable out-of-tree usage

Change-Id: I1f8adf1f5650ab6c04e03c95d7a8d0bfa39b5f2d
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
4 weeks agotls: init session for accepted ctx 14/40614/1
Florin Coras [Wed, 27 Mar 2024 02:47:27 +0000 (19:47 -0700)]
tls: init session for accepted ctx

Make sure session is marked as invalid.

Type: improvement

Change-Id: I1c861645de95ef15a24acd4fe6dd5364a55b4fb8
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 weeks agotcp: avoid fr segments less than mss if possible 98/40598/5
Florin Coras [Fri, 22 Mar 2024 23:12:53 +0000 (16:12 -0700)]
tcp: avoid fr segments less than mss if possible

Type: improvement

Change-Id: I958e059384db3c13a29f64be96877f57617bbae2
Signed-off-by: Florin Coras <fcoras@cisco.com>
4 weeks agotests: Add support for getting corefile patterns on FreeBSD 63/40563/3
Tom Jones [Wed, 7 Feb 2024 13:29:51 +0000 (13:29 +0000)]
tests: Add support for getting corefile patterns on FreeBSD

Type: improvement
Change-Id: I960edc05a9a77eb55f67cb1ec01d2b3122298ef8
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agotests: Add platform handling for FreeBSD 61/40561/3
Tom Jones [Wed, 7 Feb 2024 13:27:44 +0000 (13:27 +0000)]
tests: Add platform handling for FreeBSD

FreeBSD doesn't have an easy mechanism to discover CPU features
currently. For tests declare we don't support anything we are asked
about.

Add the FreeBSD spelling of amd64 while we are here.

Type: improvement
Change-Id: I3eb5db856ee5cbc71250e47eee619e2f620de33a
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agotests: Add missing struct import 60/40560/2
Tom Jones [Wed, 7 Feb 2024 13:26:58 +0000 (13:26 +0000)]
tests: Add missing struct import

Type: fix
Change-Id: I957877d7a82dea437c072e493561894f11321aaf
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agotests: Use errno value rather than a specific int 62/40562/2
Tom Jones [Wed, 7 Feb 2024 13:28:58 +0000 (13:28 +0000)]
tests: Use errno value rather than a specific int

For portability we use errno defines rather than explicit int values
when checking for errors.

Type: improvement
Change-Id: Ib5fc1db357da150d008d5a11bef5dbc7ec354cfb
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agotests: Add a socket timeout 65/40565/6
Tom Jones [Wed, 7 Feb 2024 13:34:56 +0000 (13:34 +0000)]
tests: Add a socket timeout

On FreeBSD a races seems to occur between the states socket connecting
and VPP accepting the connection and calling getpeername. The recv_fd
call here will fail with no fds before the VPP process has time to
handle the connection.

Introducing a socket timeout removes this failure on FreeBSD and allows
the test suite to run. Add a timeout on all platforms to try to avoid
this race everywhere.

Type: improvement
Change-Id: I96f77f924a9491222bc213b534cb17001d081f3f
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agobuild: Detect number of CPUs for build processes on FreeBSD 09/40609/3
Tom Jones [Wed, 7 Feb 2024 13:17:17 +0000 (13:17 +0000)]
build: Detect number of CPUs for build processes on FreeBSD

Type: improvement
Change-Id: Ia3a00266f47f0c3e567efa143ef08bf4e8cffe35
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agopapi: Use CMSG_SPACE for sizing ancillary buffer space 64/40564/5
Tom Jones [Wed, 7 Feb 2024 13:31:50 +0000 (13:31 +0000)]
papi: Use CMSG_SPACE for sizing ancillary buffer space

CMSG_LEN provides the length required to store an ancillary item, but it
does not consider padding. RFC 3542 requires portable applications to
use CMSG_SPACE(), this is documented in the python API:

https://docs.python.org/3/library/socket.html#socket.CMSG_LEN

Type: improvement
Change-Id: I0eab470585f2f39bea38639db95d6b0e047d2cff
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agonat: Include platform specific headers on FreeBSD 85/40385/3
Tom Jones [Tue, 30 Jan 2024 16:47:27 +0000 (16:47 +0000)]
nat: Include platform specific headers on FreeBSD

Type: improvement
Change-Id: I43f59037181ec6b76499e8ee1d82c04670119dc9
Signed-off-by: Tom Jones <thj@freebsd.org>
4 weeks agovrrp: fix vrrp_garp_or_na_send()'s memory leak 02/40602/3
luoyaozu [Mon, 25 Mar 2024 12:32:26 +0000 (20:32 +0800)]
vrrp: fix vrrp_garp_or_na_send()'s memory leak

need free bi after send packets

Type: fix

Signed-off-by: luoyaozu <luoyaozu@foxmail.com>
Change-Id: I98d03820366c3d106df212c4eb353ec6a228e20e

4 weeks agovcl: add api to retrieve num bytes for tx 46/40546/5
Florin Coras [Mon, 18 Mar 2024 19:25:38 +0000 (12:25 -0700)]
vcl: add api to retrieve num bytes for tx

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

4 weeks agotls: pass session state to engine on client init 75/40575/3
Florin Coras [Fri, 22 Mar 2024 21:47:16 +0000 (14:47 -0700)]
tls: pass session state to engine on client init

Type: fix

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