vpp.git
2 days agohs-test: fixed timed out tests passing in the CI 29/40729/10 master
Adrian Villin [Fri, 10 May 2024 08:19:35 +0000 (04:19 -0400)]
hs-test: fixed timed out tests passing in the CI

Type: test

Change-Id: Id05ea56bc5dfd80d42b8600cf11e763e25420bd0
Signed-off-by: Adrian Villin <avillin@cisco.com>
2 days agohttp: ignore http_proxy env in tests 96/40896/1
Matus Fabian [Fri, 17 May 2024 09:28:43 +0000 (11:28 +0200)]
http: ignore http_proxy env in tests

Type: test

Change-Id: I45a091a43e7ecb3f321fc9ecc761df2b44c9c351
Signed-off-by: Matus Fabian <matfabia@cisco.com>
3 days agohs-test: updated api calls 31/40731/5
Adrian Villin [Wed, 15 May 2024 08:33:41 +0000 (04:33 -0400)]
hs-test: updated api calls

Type: test

Change-Id: I2583ee74426ef154d03d4991b78ab57c5cec436f
Signed-off-by: Adrian Villin <avillin@cisco.com>
4 days agoip-neighbor: show age instead of time in cli 89/40889/3
Maxime Peim [Wed, 15 May 2024 07:47:16 +0000 (09:47 +0200)]
ip-neighbor: show age instead of time in cli

To match the API behavior, and as it is more useful to have an entry
age than its time last probe.

Type: fix
Change-Id: I07680cd713d0d2b6208a58208b032af7f6a92825
Signed-off-by: Maxime Peim <mpeim@cisco.com>
5 days agohttp: fix unsupported client app method 87/40887/2
Matus Fabian [Tue, 14 May 2024 08:04:35 +0000 (10:04 +0200)]
http: fix unsupported client app method

HTTP client app code currently support only GET method but method
set in message from client app was silently ignored.

Type: fix

Change-Id: I99dc6323d9783ee5a20623e7923cfdbf31474a4f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 days agohttp: notify client when connection failed 83/40883/2
Matus Fabian [Mon, 13 May 2024 08:29:11 +0000 (10:29 +0200)]
http: notify client when connection failed

Type: fix

Change-Id: I87054e9667fe990d9a2dc3950bc3ce348460018a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 days agohttp: fix server sending all status codes 81/40881/3
Matus Fabian [Fri, 10 May 2024 14:20:40 +0000 (16:20 +0200)]
http: fix server sending all status codes

Type: fix

Change-Id: I4bc748e3091c2fbe0142d1b74d21a543a62c4ce0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
5 days agosr: move srmpls to a plugin 66/40866/10
Scott Hutton [Fri, 3 May 2024 14:40:42 +0000 (07:40 -0700)]
sr: move srmpls to a plugin

Move sr_mpls folder under vnet to the plugin folder, update cmake configuration
and header paths, and add plugin.c to register plugin.

JIRA: VPP-2054

Type: improvement
Change-Id: I1ad6f287f67eb0c35588c339bcd51218fadf5f8e
Signed-off-by: Scott Hutton <schutton@cisco.com>
5 days agomarvell: remove uses of uint 72/40772/3
lajoskatona [Mon, 22 Apr 2024 15:29:03 +0000 (17:29 +0200)]
marvell: remove uses of uint

This change changes all instances of `uint` to `unsigned int` to avoid
use of the non-standard type. This fixes problems that some versions of
GCC may have.
For similar patch see: https://gerrit.fd.io/r/c/vpp/+/40762

Type: fix
Change-Id: I0c666de788ac5b3c457e0a073e3e279f2fb99a4f
Signed-off-by: lajoskatona <katonalala@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
5 days agovppinfra: Add platform cpu and domain get for FreeBSD 68/40468/13
Tom Jones [Mon, 6 May 2024 14:53:57 +0000 (14:53 +0000)]
vppinfra: Add platform cpu and domain get for FreeBSD

Type: improvement
Change-Id: I5253f2b1b51493f2d4d0f451ad4c2208fd8f6bf2
Signed-off-by: Tom Jones <thj@freebsd.org>
5 days agovppinfra: fix mhash oob after unset and add tests 38/40438/3
Vladislav Grishenko [Thu, 14 Dec 2023 16:48:28 +0000 (17:48 +0100)]
vppinfra: fix mhash oob after unset and add tests

Fix out of buffer access after mhash_unset
Add format mhash pair functions
Add related mhash tests, similar to hash ones

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

5 days agodpdk: Only prealloc huge pages on Linux 73/40873/2
Tom Jones [Tue, 7 May 2024 10:07:47 +0000 (10:07 +0000)]
dpdk: Only prealloc huge pages on Linux

Type: improvement
Change-Id: I4d9c0f96d81c8b510086a54990b3fcd3d5fdb695
Signed-off-by: Tom Jones <thj@freebsd.org>
5 days agonetmap: Reinstate and update netmap plugin 75/40875/2
Tom Jones [Wed, 7 Feb 2024 14:55:20 +0000 (14:55 +0000)]
netmap: Reinstate and update netmap plugin

Thet netmap plugin was moved to depreciated in commit 998b8fe.

On FreeBSD netmap offers a natively supported kernel interface for
userspace networking and enables VPP without the use of DPDK.

Reinstate the netmap plugin and adapt it to the newer plugin interface.

Type: improvement
Change-Id: I113daa33a490f04cbb29909f9789fa66284ac80e
Signed-off-by: Tom Jones <thj@freebsd.org>
6 days agohttp: fix user agent in request 84/40884/2
Matus Fabian [Mon, 13 May 2024 09:50:46 +0000 (11:50 +0200)]
http: fix user agent in request

App name is used in HTTP request User-Agent header.

Type: fix

Change-Id: Ib761e8a8e793e04e8d77141cc8c0f8514ed0e547
Signed-off-by: Matus Fabian <matfabia@cisco.com>
6 days agovlib: avoid pci scan without registrations 52/40752/2
Vladimir Zhigulin [Fri, 19 Apr 2024 10:08:02 +0000 (12:08 +0200)]
vlib: avoid pci scan without registrations

Type: improvement
Signed-off-by: Vladimir Zhigulin <scripath96@gmail.com>
Change-Id: Id1d78a36cec10a01fbf266b016ba364519e5cb66

6 days agodev: fix mac address dump in trace output 29/40829/3
Alok Mishra [Fri, 26 Apr 2024 13:40:13 +0000 (18:40 +0500)]
dev: fix mac address dump in trace output

"port->attr.hw_addr" is set during the port initialization. It won't be
updated if the mac address of the port is changed via the vpp command
line.
Use "port->primary_hw_addr" to dump the updated mac address correclty.

Type: fix
Fixes: 38c619115b

Change-Id: I6c99fcfdfae67efb3606e17f36781c56716ff7ea
Signed-off-by: Alok Mishra <almishra@marvell.com>
6 days agowireguard: use clib helpers for endianness 64/40764/9
Guillaume Solignac [Thu, 20 Apr 2023 15:59:22 +0000 (17:59 +0200)]
wireguard: use clib helpers for endianness

In some cases, the Linux helpers for endianness conversion are not
present. We use clib helpers to fix this.

Type: fix

Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I4d21fb5edae6fa6413b10f298a84ff4b88bda5db
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
6 days agonat: fix unitialized variable 61/40761/7
Guillaume Solignac [Thu, 14 Apr 2022 09:27:37 +0000 (11:27 +0200)]
nat: fix unitialized variable

Fixes an unitialized variable.

Type: fix
Change-Id: I636dc8433679606262d9a974c01f81d8721634f2
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
6 days agoocteon: add support for mac address update 69/40669/6
Alok Mishra [Wed, 10 Apr 2024 07:34:51 +0000 (13:04 +0530)]
octeon: add support for mac address update

This patch adds support for updating primary hardware address
on octeon port.

Type: feature

Change-Id: Ib0ff6aaa6dafc209eb71c44b8a6504d3df9aa5c8
Signed-off-by: Alok Mishra <almishra@marvell.com>
9 days agodocs: Use newer Ubuntu LTS in tutorial 71/40571/7
Elod Illes [Thu, 21 Mar 2024 14:12:59 +0000 (15:12 +0100)]
docs: Use newer Ubuntu LTS in tutorial

The tutorial uses old 18.04 Bionic Ubuntu release, and tries to
install vpp from packagecloud.io's bionic repository which does not
exist. However newer ubuntu releases' repositories exist, so let's
update to newer Ubuntu LTS version: 22.04 Jammy.

Also, the ubuntu vagrant box is old, so let's replace it to a newer,
generic/ubuntu2204, which uses libvirt provider (instead of virtualbox)
and updated frequently, works well for the tutorial. Due to using
libvirt provider, there is no need to customize the VM as those
customizations are present in the box by default.

The truested=yes part is removed from the apt source list command, as
we add gpgkey anyway, thus, no need for this.

Tutorial and vpp build tested with this new box and looks to be working
fine.

Type: docs
Signed-off-by: Elod Illes <elod.illes@est.tech>
Change-Id: Idcff693240fc6a1496a240e0d07c5ed43fe833e9

10 days agohs-test: logging improvements 25/40725/6
Adrian Villin [Mon, 6 May 2024 10:55:34 +0000 (06:55 -0400)]
hs-test: logging improvements

Type: test

Change-Id: Iffefe085e846b6ba614b0d74c4ba9907080a9a59
Signed-off-by: Adrian Villin <avillin@cisco.com>
10 days agohttp: fix client parse error handling 77/40877/2
Matus Fabian [Thu, 9 May 2024 07:34:27 +0000 (09:34 +0200)]
http: fix client parse error handling

Do not return HTTP errors to server on parse errors in client.

Type: fix

Change-Id: Id3e99d69626855848faa87af73002d559d948516
Signed-off-by: Matus Fabian <matfabia@cisco.com>
10 days agohs-test: add make test-debug target 78/40878/1
Matus Fabian [Thu, 9 May 2024 08:46:58 +0000 (10:46 +0200)]
hs-test: add make test-debug target

Run tests on vpp debug build.

Type: test

Change-Id: I51e6f4ac9449c1c5b7eb649af91347188f9227e1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
11 days agoethernet: check destination mac for L3 in ethernet-input node 56/40756/4
Steven Luong [Fri, 19 Apr 2024 16:49:20 +0000 (09:49 -0700)]
ethernet: check destination mac for L3 in ethernet-input node

When the NIC does not support mac filter, we rely on ethernet-input
node to do the destination mac check, ie, when the interface is in L3,
the mac address for the packet must be the mac address of the
interface where the packet arrives. This works fine in ethernet-input
node when all packets in the frame might have different interfaces, ie,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is not set in the frame. However,
when all packets are having the same interface,
ETH_INPUT_FRAME_F_SINGLE_SW_IF_ID is set, ethernet-input node goes
through the optimized routine eth_input_single_int -> eth_input_process_frame.
That is where dmac check has a bug when all packets in the frame are
either, ip4, ip6, or mpls without vlan tags. Because without vlan tags,
the code handles all packets in fast path and ignores dmac check.
With vlan tags, the code goes to slow path where dmac check is handled
properly.

The fix is to check if we have a bad dmac in the fast path and force the
code to go to slow path which will handle dmac check properly.

Also do a wholesale correction on all the testcases which do not use
the proper dmac when sending L3 packets.

Type: fix

Change-Id: I73153a805cecdc24c4eefcc781676de04737ae2c
Signed-off-by: Steven Luong <sluong@cisco.com>
12 days agohttp: fix client send another request 74/40874/2
Matus Fabian [Tue, 7 May 2024 11:52:16 +0000 (13:52 +0200)]
http: fix client send another request

HTTP client should be able to send another request after large data
receiving.

Type: fix

Change-Id: I8352ea760a4b3de4b79159531c7e4c1fa4e03203
Signed-off-by: Matus Fabian <matfabia@cisco.com>
12 days agohttp: notify client on request error 64/40864/4
Matus Fabian [Fri, 3 May 2024 14:25:40 +0000 (16:25 +0200)]
http: notify client on request error

Notify client app that we errored out while trying to generate request.

Type: fix

Change-Id: I3e20fe22d8a927ae8e9bf8391297e10c974dc941
Signed-off-by: Matus Fabian <matfabia@cisco.com>
12 days agoapi: add to_net parameter to endian messages 25/40825/7
Ole Troan [Fri, 26 Apr 2024 12:11:20 +0000 (14:11 +0200)]
api: add to_net parameter to endian messages

The VPP API auto-generated endian conversion functions are intended to
be symmetrical. They are used both by the API client and the API server.
Called on send to convert from host endian to network endian and on
receive to convert back.

For variable length arrays, we have to iterate over the array and call
a more specific handler for the array type. Unfortunately the length of
the array is part of the api definition, and if it's endian swapped
prior to the for loop, unexpected behaviour will ensue.

There was an earlier fix, for some specific messages, but unfortunately
that only fixed the problem from the VPP (server) side.

This adds a new parameters to the endian handler, so the boundary
argument to the loop can be treated differently depending on if this
message is to the network or from the network.

Type: fix
Change-Id: I43011aed384e3b847579a1dd2c390867ae17a9ad
Signed-off-by: Ole Troan <otroan@employees.org>
12 days agoapi: upgrade cjson and fix realloc 69/40869/3
Ole Troan [Mon, 6 May 2024 09:34:17 +0000 (11:34 +0200)]
api: upgrade cjson and fix realloc

Upgrade cJSON library to patchlevel 17.
Replace internal realloc added earlier 36217e3ca.

Type: fix
Fixes: 36217e3ca
Change-Id: I7d8a80dc4241e9f952895d24adca8fa2d873e746
Signed-off-by: Ole Troan <otroan@employees.org>
13 days agovlib: fix use of RTLD_DEEPBIND for musl 59/40759/5
Eric Sun [Wed, 2 Feb 2022 18:53:34 +0000 (10:53 -0800)]
vlib: fix use of RTLD_DEEPBIND for musl

RTLD_DEEPBIND only exists in glibc. If it isn't defined we can just
ignore it.

Type: fix
Change-Id: I5b2d65b2462020808635b057d5f7665fb75a2444
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Eric Sun <esun@meraki.com>
13 days agotests: remove uses of uint 62/40762/4
Eric Sun [Wed, 21 Jul 2021 22:28:47 +0000 (15:28 -0700)]
tests: remove uses of uint

This change changes all instances of `uint` to `unsigned int` to avoid
use of the non-standard type. This fixes problems that some versions of
GCC may have.

Type: fix
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Change-Id: I08cce367c2a8f31efb2fccabcb8f699d801b0f8a
Signed-off-by: Eric Sun <esun@meraki.com>
13 days agovlib: fix missing integer init 66/40766/4
Guillaume Solignac [Thu, 18 Jan 2024 11:01:57 +0000 (12:01 +0100)]
vlib: fix missing integer init

Some compilers were not clever enough to figure out these inits
weren't needed. Hence adding them.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I50c4e978bfd2ef15ece7a29e517bb8ddba12f960
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
13 days agovlib: revert automatic core pinning changes 03/40803/5
Hadi Rayan Al-Sandid [Tue, 30 Apr 2024 14:17:45 +0000 (14:17 +0000)]
vlib: revert automatic core pinning changes

This reverts commit 71c32a898941e32b5d4f865b50fbe775560c582d.

Type: fix

Reason for revert: vnet pinning is not considered in this patch.
This causes keywords 'workers' and 'skip-cores' to be broken,
as well as keyword 'main-core auto' introduced in this patch.
If this patch is ever reconsidered, it must account for vnet
pinning fix in commit https://gerrit.fd.io/r/c/vpp/+/40711.

Change-Id: I1f3154a6c7e830b100f824375aa00e95b192f7f3
Signed-off-by: hsandid <halsandi@cisco.com>
13 days agoiavf: disable VLAN stripping when VLAN offload is set in caps 24/40724/4
Mohsin Kazmi [Tue, 30 Apr 2024 16:48:45 +0000 (16:48 +0000)]
iavf: disable VLAN stripping when VLAN offload is set in caps

Type: fix

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4cc7433a707649c46d501249477949b62199c8a2

13 days agodpdk: Only use --file-prefix flag on Linux 53/40853/2
Tom Jones [Fri, 2 Feb 2024 14:32:00 +0000 (14:32 +0000)]
dpdk: Only use --file-prefix flag on Linux

--file-prefix is only supported by DPDK on Linux currently.

Type: improvement
Change-Id: I47765ea666b7d14011804e7cc90d9035bce1bc93
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agovlib: Add FreeBSD specific platform files 17/40817/2
Tom Jones [Thu, 25 Apr 2024 14:19:03 +0000 (14:19 +0000)]
vlib: Add FreeBSD specific platform files

Type: improvement
Change-Id: I0739959084d7cfd8309793f54c92c046b94d7a02
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agodpdk: Only reconfigure max pipe size on linux 52/40852/2
Tom Jones [Fri, 2 Feb 2024 14:24:04 +0000 (14:24 +0000)]
dpdk: Only reconfigure max pipe size on linux

FreeBSD dynmically grows pipes based on usage and available system
memory. Don't try to resize pipes on FreeBSD for now.

Type: improvement
Change-Id: I78b06dead5d42a3a7bdf634a67b43ef854e510f8
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agovppinfra: Include param.h on FreeBSD 18/40818/2
Tom Jones [Thu, 25 Apr 2024 14:25:06 +0000 (14:25 +0000)]
vppinfra: Include param.h on FreeBSD

Type: improvement
Change-Id: I5fa90dd26d6cac2cefee009c97dd5ff8dac3ee1e
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agodpdk: Don't depend on rdma-core on FreeBSD 51/40851/2
Tom Jones [Thu, 1 Feb 2024 16:09:56 +0000 (16:09 +0000)]
dpdk: Don't depend on rdma-core on FreeBSD

Type: improvement
Change-Id: Icad058df22d3f9d65b086215cc17b1ab32d59eb8
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agodpdk: Use gnu sed on FreeBSD for header fix ups 49/40849/2
Tom Jones [Thu, 1 Feb 2024 16:09:20 +0000 (16:09 +0000)]
dpdk: Use gnu sed on FreeBSD for header fix ups

FreeBSD sed isn't compatible with gnu seds in place option. On FreeBSD
explicitly use gsed, on Linux and other platforms this is available just
as 'sed'.

Type: improvement
Change-Id: I6e4fcaf11d4d22cd3e4cd0c3327b16393542845f
Signed-off-by: Tom Jones <thj@freebsd.org>
13 days agoocteon: fix rvu vf device id 70/40870/2
Monendra Singh Kushwaha [Mon, 6 May 2024 09:27:28 +0000 (14:57 +0530)]
octeon: fix rvu vf device id

Type: fix
Fixes: I1ea92f

Change-Id: Idf91b3f4cb3cc93081a282a14ffe2421a3628509
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
13 days agoocteon: add max packet length check 53/40753/4
Monendra Singh Kushwaha [Fri, 19 Apr 2024 11:04:49 +0000 (16:34 +0530)]
octeon: add max packet length check

This patch compares packet length with maximum supported
packet length and drops the packet accordingly.

Type: fix

Change-Id: I80ef453d43149818936649e1e58ae90c84a34ab9
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
13 days agoocteon: fix buffer free for more than 6 segment 92/40792/3
Monendra Singh Kushwaha [Thu, 25 Apr 2024 10:06:21 +0000 (15:36 +0530)]
octeon: fix buffer free for more than 6 segment

Type: fix
Fixes: 01fe7ab

Change-Id: I4423d287e8148344754b2f6a13886c093a1384e4
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
2 weeks agovcl: allow more rx events on peek 68/40868/2
Florin Coras [Fri, 3 May 2024 20:23:00 +0000 (13:23 -0700)]
vcl: allow more rx events on peek

If peek touches all data in the fifo, unset fifo event to request new
events when more data is enqueued.

Type: improvement

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

2 weeks agointerface: fix check in set_interface_name api 05/39305/5
Stanislav Zaikin [Tue, 1 Aug 2023 12:28:37 +0000 (14:28 +0200)]
interface: fix check in set_interface_name api

set_interface_name may crash if wrong sw_if_index is passed e.g. ~0

Type: fix

Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Change-Id: Ic7e400c914fb33c2f9eac4f2985bb5b163a18d57

2 weeks agohttp: fix http server in response 58/40858/2
Matus Fabian [Thu, 2 May 2024 09:17:15 +0000 (11:17 +0200)]
http: fix http server in response

App name is used in HTTP response Server header.

Type: fix

Change-Id: Ie3b2d985dd7d554a0352f7e602891f878bebd031
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2 weeks agogso: use the header offsets from buffer metadata 02/36302/11
Mohsin Kazmi [Thu, 29 Sep 2022 15:28:04 +0000 (15:28 +0000)]
gso: use the header offsets from buffer metadata

Type: improvement

Change-Id: I955fbef0e0238cb69307e96cd1c677061737e5f3
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2 weeks agoacl: add missing byteswap header for musl 63/40763/4
Eric Sun [Wed, 2 Feb 2022 19:12:13 +0000 (11:12 -0800)]
acl: add missing byteswap header for musl

On glibc this builds fine; on musl the byteswap header doesn't seem to be
included properly. This change adds it, fixing the build.

Type: fix
Change-Id: I402812409395d471357b6317084774afba39548f
Signed-off-by: Eric Sun <esun@meraki.com>
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
2 weeks agohttp: fix client receiving large data 08/40008/8
Filip Tehlar [Mon, 27 Nov 2023 12:28:36 +0000 (13:28 +0100)]
http: fix client receiving large data

HTTP client was relying on synchronous rx notifications to the client
app when moving lage data from underlying transport proto.
Recent change in session layer made such notifications asynchronous
making http client not working. This patch fixes the issue.

Type: fix

Change-Id: I4b24c6185a594a0fe8d5d87c149c53d3b40d7110
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2 weeks agoocteon: fix roc_nix_npc_mac_addr_get() return value check 88/40788/2
Damjan Marion [Wed, 24 Apr 2024 18:50:01 +0000 (20:50 +0200)]
octeon: fix roc_nix_npc_mac_addr_get() return value check

Type: fix
Fixes: 01fe7ab
Change-Id: I46782c69773085f9e6a8dfff798bb42b1e822c32
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 weeks agotests: remove duplicate SVR test case 35/40835/2
Klement Sekera [Fri, 26 Apr 2024 07:57:39 +0000 (09:57 +0200)]
tests: remove duplicate SVR test case

Type: fix
Change-Id: I4105109c1c659190fc2da4ee1802ef53449a3c15
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
2 weeks agohs-test: disable color output 23/40723/2
Adrian Villin [Mon, 29 Apr 2024 12:27:57 +0000 (08:27 -0400)]
hs-test: disable color output

Jenkins cannot display colors in console output

Type: fix

Change-Id: I5365dec471d773dae1f139c5fabd0711298f8bea
Signed-off-by: Adrian Villin <avillin@cisco.com>
2 weeks agocrypto-native: add SHA2-HMAC 45/40545/8
Damjan Marion [Fri, 15 Mar 2024 18:33:34 +0000 (18:33 +0000)]
crypto-native: add SHA2-HMAC

Type: feature
Change-Id: I9e7ebf43536c972a62621fc7ad7406abec0ce071
Signed-off-by: Damjan Marion <damarion@cisco.com>
2 weeks agohs-test: fix cpu allocator 40/40840/2
Matus Fabian [Mon, 29 Apr 2024 09:06:44 +0000 (11:06 +0200)]
hs-test: fix cpu allocator

Effective CPUs file is different between cgroups v1 and v2.

Type: test

Change-Id: Ic1b9059435b3f0944624120f57e72da45adca223
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2 weeks agopci: fix missing limits.h 65/40765/3
Guillaume Solignac [Thu, 20 Apr 2023 16:02:59 +0000 (18:02 +0200)]
pci: fix missing limits.h

When building with musl, PATH_MAX is not available if we don't add its header
to pci.c.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I3d4e7cf5754d7c1d480834d7cd038d5bda46fd2f
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
3 weeks agohs-test: clean up Makefile for compatibility with ci-management 21/40821/2
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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
4 weeks 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>
4 weeks 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>
4 weeks 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>
4 weeks 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

4 weeks 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>
4 weeks 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>
4 weeks 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>
5 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

5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>