vpp.git
37 hours agohs-test: more debug output in http3 test 85/41085/1 master
Florin Coras [Thu, 6 Jun 2024 07:08:27 +0000 (03:08 -0400)]
hs-test: more debug output in http3 test

Type: test

Change-Id: I4d2b949f5ef5446c04ca6f35b0bd659ce389170f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2 days agohs-test: keep ab/wrk containers alive until teardown 63/40963/2
Adrian Villin [Wed, 5 Jun 2024 09:53:50 +0000 (05:53 -0400)]
hs-test: keep ab/wrk containers alive until teardown

- Fixes errors while obtaining container logs on test failure
  (NginxPerf tests), ab/wrk containers are now stopped on test teardown
  like other containers.

Type: test

Change-Id: Ic336fcd3ed6bf68dd345d378262cb28eb5efc789
Signed-off-by: Adrian Villin <avillin@cisco.com>
2 days agotests: organize test coverage report generation 01/40201/5
Dave Wallace [Tue, 16 Jan 2024 18:12:27 +0000 (13:12 -0500)]
tests: organize test coverage report generation

- Remove code from test report that is effectively
  untested and categorize based on reason for lack
  of testing.

Type: test

Change-Id: I6ca5444055b3a81a4880945b6845afc867556277
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2 days agobuffers: support per-numa-domain buffer size 35/41035/3
Lukas Stockner [Tue, 4 Jun 2024 14:14:55 +0000 (16:14 +0200)]
buffers: support per-numa-domain buffer size

Currently, buffers-per-numa is used for all NUMA domains, and there's
no way to allocate different amounts for each domain.

Therefore, this adds a per-NUMA-domain buffer config section, which
currently has a single option to set the number of buffers.

If it's not specified or set to zero, the code falls back to
buffers-per-numa as before.

Type: improvement
Change-Id: If35d7a9eff6f8d1d78063ea7873dbf50780d0ec3
Signed-off-by: Lukas Stockner <lstockner@genesiscloud.com>
3 days agohs-test: fix coverage integration 62/40962/3
Adrian Villin [Tue, 4 Jun 2024 12:59:58 +0000 (08:59 -0400)]
hs-test: fix coverage integration

- fixed 'make test-cov' not generating gcda files

Type: test

Change-Id: I9745c6501a97248ab343a5dbb39dddcc75f715fd
Signed-off-by: Adrian Villin <avillin@cisco.com>
3 days agoipsec: fix missing udp port check 28/40928/8
Fan Zhang [Fri, 24 May 2024 15:46:00 +0000 (16:46 +0100)]
ipsec: fix missing udp port check

Type: fix

This patch fixes the missing UDP port check in IPsec NAT-T
case. As of RFC3948 UDP encapped ESP traffic should have
destination port ID of 4500, which was missing.

The related tests are updated with this port ID, too.

Change-Id: I73ecc6a93de8d0f4b642313b0f4d9c2f214a7790
Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
4 days agoip: add support for drop route through vpp CLI 19/40719/3
Mohsin Kazmi [Fri, 19 Apr 2024 11:02:28 +0000 (11:02 +0000)]
ip: add support for drop route through vpp CLI

Type: improvement

Change-Id: Ib822f36ff7b3ecda162fc99bf3892f912d0649f0
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 days agofib: set the value of the sw_if_index for DROP route 18/40718/3
Mohsin Kazmi [Fri, 19 Apr 2024 09:10:46 +0000 (09:10 +0000)]
fib: set the value of the sw_if_index for DROP route

Type: fix

fib_api_path_decode() is utilized by the IP route API call
to translate the path from the API to the fib_route_path_t
structure. The ip_route_add_del_handler_t function initializes
the fib_route_path_t structure to zeros, consequently setting
the sw_if_index value to 0, which is a valid value in VPP.
Typically, the default VRF (Virtual Routing and Forwarding)
has a local interface at index 0, leading to normal functionality.
However, a custom VRF table without any interface will result
in a crash.

The issue arises because the DROP route in fib_api_path_decode()
does not override the sw_if_index value with the one provided
in vl_api_fib_path_t. Subsequently, when this sw_if_index is
attempted to be resolved in the VRF table where the interface
does not exist, it leads to a crash.

This patch addresses the problem by setting the sw_if_index of
fib_route_path_t to the sw_if_index value of the API path.

To reproduce the issue, please remove the fix and run the following command:
make test-debug TEST=test_ip4.TestIPv4RouteLookup.test_exact_match

Change-Id: I5d72e91e5c701e749a92873941bee7b7b5eabd41
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
4 days agohs-test: add libunwind dependency to nginx dockerfile 61/40961/1
Adrian Villin [Mon, 3 Jun 2024 08:58:58 +0000 (04:58 -0400)]
hs-test: add libunwind dependency to nginx dockerfile

- Libunwind was missing in Dockerfile.nginx, causing some tests to fail.
  Tests that were temporarily disabled because of that issue
  are now re-enabled.

Type: test

Change-Id: I3f544be483784e8a7a1f22737cafca615b9f836b
Signed-off-by: Adrian Villin <avillin@cisco.com>
6 days agovlib: clean up r2 plugin registration relocator 28/41028/1
Dave Barach [Sat, 1 Jun 2024 12:44:28 +0000 (08:44 -0400)]
vlib: clean up r2 plugin registration relocator

Thanks, Eliot!

Type: fix
Change-Id: I3737f62d08d5cd2db803af86285f9a2e456bab72
Signed-off-by: Dave Barach <vpp@barachs.net>
7 days agohs-test: temp skip some tests 60/40960/2
Adrian Villin [Fri, 31 May 2024 14:11:34 +0000 (10:11 -0400)]
hs-test: temp skip some tests

- Some tests are broken in the CI, skipping them
  for now

Type: test

Change-Id: I3d4efeee63b819956e5ffa1b3920e81962a2fcc9
Signed-off-by: Adrian Villin <avillin@cisco.com>
7 days agohs-test: container logging improvements 59/40959/1
Adrian Villin [Fri, 31 May 2024 10:46:52 +0000 (06:46 -0400)]
hs-test: container logging improvements

- Reduced the amount of error messages while obtaining container logs
  when a test fails by keeping track of started containers. NginxPerf
  tests still have those error messages, because wrk/ab containers shut
  themselves down before the test ends.

Type: test

Change-Id: I40a193345e5b46aec1834774f23aebc822eee885
Signed-off-by: Adrian Villin <avillin@cisco.com>
7 days agohs-test: add libunwind dependency to vpp dockerfile 16/41016/3
Dave Wallace [Thu, 30 May 2024 18:27:35 +0000 (14:27 -0400)]
hs-test: add libunwind dependency to vpp dockerfile

- missing from https://gerrit.fd.io/r/c/vpp/+/40929 due to hst not running in CI yet.

Type: fix

Change-Id: Ib5d9b877725624ef7de9f2be5e517609aec7c5a1
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
8 days agohs-test: added targets to makefiles to get coverage from HS tests 77/40177/10
adrianvillin [Thu, 11 Jan 2024 10:59:47 +0000 (11:59 +0100)]
hs-test: added targets to makefiles to get coverage from HS tests

Type: make

Change-Id: Iae7998692890264dfeea98c165617d0efa024d42
Signed-off-by: adrianvillin <avillin@cisco.com>
8 days agohs-test: set longer timeouts while debugging 57/40957/2
Adrian Villin [Thu, 30 May 2024 10:10:59 +0000 (06:10 -0400)]
hs-test: set longer timeouts while debugging

Type: test

Change-Id: I87baba7efa36dd40f086523b35bc6d3b0a26a1b5
Signed-off-by: Adrian Villin <avillin@cisco.com>
8 days agohs-test: pin CPUs to containers 56/40956/4
Adrian Villin [Mon, 27 May 2024 13:52:59 +0000 (09:52 -0400)]
hs-test: pin CPUs to containers

Type: test

Change-Id: I412be2dec7ff352740e50e838e0ac466bf0a6674
Signed-off-by: Adrian Villin <avillin@cisco.com>
8 days agoocteon: convert link speed from Mbps to Kbps 87/40987/3
Monendra Singh Kushwaha [Wed, 29 May 2024 11:47:07 +0000 (17:17 +0530)]
octeon: convert link speed from Mbps to Kbps

Type: fix
Fixes: 01fe7ab88e

Change-Id: I88d03adcd4ef2a585ed77834b3bf8ef9d50b15c9
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
9 days agovlib: stack trace and signal handler improvements 29/40929/9
Damjan Marion [Thu, 23 May 2024 13:06:39 +0000 (13:06 +0000)]
vlib: stack trace and signal handler improvements

 - use libunwrap which seems to be industry standard
 - display traceback on console if running interactive or with syslog
   disabled (color output unless nocolor specified)
 - print hexdump of offending code
 - print library filename for each stack frame

Type: improvement
Change-Id: I61d3056251b87076be0578ccda300aa311c222ef
Signed-off-by: Damjan Marion <damarion@cisco.com>
10 days agohttp_static: sanitize path before file read 76/40976/2
Matus Fabian [Tue, 28 May 2024 11:39:13 +0000 (13:39 +0200)]
http_static: sanitize path before file read

Romove dot segments from requested target path before start reading
file in file handler to prevent path traversal.

Type: fix

Change-Id: I3bdd3e9d7fffd33c9c8c608169c1dc73423b7078
Signed-off-by: Matus Fabian <matfabia@cisco.com>
10 days agoocteon: add support for Marvell Octeon9 SoC 08/40508/6
Monendra Singh Kushwaha [Wed, 28 Feb 2024 07:39:06 +0000 (13:09 +0530)]
octeon: add support for Marvell Octeon9 SoC

Type: feature

Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Change-Id: I5db58b8ec41b45596bc03b4a336a184c17871294

10 days agoocteon: fix lbk vf initialization 22/40922/2
Monendra Singh Kushwaha [Thu, 23 May 2024 10:46:42 +0000 (16:16 +0530)]
octeon: fix lbk vf initialization

Type: fix
Fixes: 0a2fdc56

Change-Id: I5d232a86be66edeec8b740a883104f5a22516697
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
10 days agourpf: export to use it externally 97/40497/10
Maxime Peim [Mon, 11 Mar 2024 09:35:16 +0000 (10:35 +0100)]
urpf: export to use it externally

Type: improvement
Change-Id: Ia70f16c92dfc153256db6dcdf23f5487d5a7b678
Signed-off-by: Maxime Peim <mpeim@cisco.com>
10 days agourpf: node refactor 03/40703/9
Maxime Peim [Mon, 15 Apr 2024 08:13:58 +0000 (10:13 +0200)]
urpf: node refactor

Type: refactor
Change-Id: Icb3c6cbe1425331c7a8a4b0dd583389f2257befa
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2 weeks agoudp: fix csum computation when offload disabled 25/40925/4
Florin Coras [Fri, 24 May 2024 01:22:48 +0000 (18:22 -0700)]
udp: fix csum computation when offload disabled

Type: fix

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

2 weeks agoip6: fix icmp throttling error index 26/40926/1
Maxime Peim [Fri, 24 May 2024 13:29:50 +0000 (15:29 +0200)]
ip6: fix icmp throttling error index

Type: fix
Change-Id: I57ce42c193fd9408b9d4790482ea76d784148c30
Signed-off-by: Maxime Peim <mpeim@cisco.com>
2 weeks agovlib: improvement to automatic core pinning 19/40919/8
hsandid [Wed, 22 May 2024 13:30:24 +0000 (15:30 +0200)]
vlib: improvement to automatic core pinning

Type: feature

If 'main-core' is not specified, the main thread is pinned
by default to the cpu it is running on during initialization.
This change does not impact manual core-pinning, which
requires the 'main-core' argument
e.g. 'cpu {main-core x corelist-workers n}.

Change-Id: I874034591bf0acf4d71b231dfbbb0f6de8fe6060
Signed-off-by: hsandid <halsandi@cisco.com>
2 weeks agovirtio: Add RX queue full statisitics 76/40576/2
Steven Luong [Wed, 20 Mar 2024 19:28:49 +0000 (12:28 -0700)]
virtio: Add RX queue full statisitics

In production network, often the host and the vm are managed by different
groups. The host statistics may not be readily available to the folks who
manage the VM. Having the RX queue full statistics in VPP can inform
that there might possibly be drops in the host.

Type: improvement

Change-Id: I43206647ac0d8092968c4187236d9696ae0acccd
Signed-off-by: Steven Luong <sluong@cisco.com>
2 weeks agohs-test: fix CPU alloc when running in parallel 35/40735/3
Adrian Villin [Wed, 22 May 2024 13:26:47 +0000 (09:26 -0400)]
hs-test: fix CPU alloc when running in parallel

Type: test

Change-Id: I6062eddffb938880d9ec004c8418a9a731891989
Signed-off-by: Adrian Villin <avillin@cisco.com>
2 weeks agovppinfra: support libunwind for backtrace 21/40921/2
Guillaume Solignac [Thu, 23 May 2024 09:59:53 +0000 (11:59 +0200)]
vppinfra: support libunwind for backtrace

On non-glibc systems, execinfo is the only option available, but the lib
is old and can crash when unwinding. We now can use libunwind to unroll
it instead of using execinfo.h.

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

2 weeks agovlib: prevent some signals from being executed on workers 12/40912/3
Guillaume Solignac [Wed, 22 May 2024 08:47:33 +0000 (10:47 +0200)]
vlib: prevent some signals from being executed on workers

Before this commit, SIGINT, SIGHUP and SIGTERM could be executed on the
workers. Since those signals don't stop execution, it meant that atexit
handlers (like the `vl_unmap_shmem`) could run while the main thread was
still running, which can cause race conditions. To avoid that, we
prevent workers from handling those signals.

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

2 weeks agomisc: Initial 24.10-rc0 commit 33/40733/1 v24.10-rc0
Andrew Yourtchenko [Wed, 22 May 2024 10:58:06 +0000 (12:58 +0200)]
misc: Initial 24.10-rc0 commit

Type: docs
Change-Id: If9cfc421a0769b68a8520e99c41c954db1973ca9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2 weeks agosession: remove ipv6 lookup threading assert 09/40909/1
Brian Morris [Tue, 21 May 2024 15:25:30 +0000 (15:25 +0000)]
session: remove ipv6 lookup threading assert

This makes session_lookup_connection_wt6 consistent with session_lookup_connection_wt4 -
they both just return an error for wrong thread.

Type: fix
Change-Id: Ide38976e9a7274b53311e65711098e6b22a3f8d5
Signed-off-by: Brian Morris <bmorris2@cisco.com>
2 weeks agobuiltinurl: mark api as deprecated 03/40903/1
Matus Fabian [Mon, 20 May 2024 18:01:04 +0000 (20:01 +0200)]
builtinurl: mark api as deprecated

Plugin will be removed since it is incorporated in http_static plugin
for longer time.

Type: refactor
Change-Id: I6ed99d1b118fb5951aafceb05a953f39d325e87e
Signed-off-by: Matus Fabian <matfabia@cisco.com>
3 weeks agohs-test: fixed timed out tests passing in the CI 29/40729/10
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>
3 weeks 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 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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

3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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

3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks 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

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

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

5 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

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