14028 Commits

Author SHA1 Message Date
Adrian Villin
f5b832e729 hs-test: always build when running 'make build'
- running 'make build' will now always build docker images,
  'make test' will try to skip building them unless FORCE_BUILD=true
- now also checking ubuntu version

Type: make

Change-Id: Ie16e8dc4712963de19e2450e058b867c1cede7ee
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-13 12:53:10 +01:00
Adrian Villin
ea360b570b hs-test: skip building images if no new changes
- skip building if new changes are .go, .sum, .mod, .txt, .test,
  IP address files or dotfiles

Type: test

Change-Id: Ib041a077fa34120e86ebb43cd19e50142ef01f16
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-12 19:59:24 +00:00
Adrian Villin
2c4b699359 hs-test: update docs, makefile, maintainers
- don't run 'make list-tests' after 'make help'

Type: docs

Change-Id: I1b2ae02faf53b072b96c91f2e1fead52128f4710
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-12 19:56:37 +00:00
Adrian Villin
f901f13b2c hs-test: added a test counter and time elapsed
- only works when not running in parallel

Type: test

Change-Id: Iab9881f8a2a93c6ef5129742e3c0ad950f9e5328
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-12 19:54:53 +00:00
Oleksandr Hnatiuk
8ae4454bba vapi: remove directory name from include guards
Script vapi_c_gen.py uses full paths to source files to generate include
guards in files with `.vapi.h` extension. This makes the content of
header files depend on build directory which causes reproducibility
issues (cannot get identical build output when building in a different
directory).

Commit 4c64b6edc86f7 fixes this for .hpp files, but seems to forget
about .h files. Use its fix for these as well.

Type: fix
Change-Id: Ida638c7b4630fac1f6d968a9203a409648bef55c
Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com>
2024-12-12 18:20:48 +00:00
Adrian Villin
fb0cbc64e6 hs-test: fix a runtime error
- framework panicked if core_pattern was set to "core"

Type: test

Change-Id: I14211cc59779090a61e6e08a18d16fd7399b2bed
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-12 16:46:35 +00:00
Oleksandr Hnatiuk
20956385c7 build: use VPP_BUILD_TOPDIR from environment if set
Commit 3d14f036199d added the possibility to use `VPP_BUILD_USER` and
`VPP_BUILD_HOST` from environment (if they are set) to avoid
reproducibility issues by hard-coding such data in the build system.
However, there's no way to provide VPP_BUILD_TOPDIR externally. Add this
feature to improve binary reproducibility.

Type: improvement
Change-Id: I3a7ee47d75af9635b636fa3750a3688314eaa60d
Signed-off-by: Oleksandr Hnatiuk <ohnatiuk@cisco.com>
2024-12-12 15:48:32 +00:00
Guillaume Solignac
aac5e686f3 armada: fix feature arc for secondary interfaces
Fixes an issue preventing a feature to be configured on a secondary interface.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I8ecd80988d22291013cd0addae6dc25043aaea98
2024-12-12 15:34:16 +00:00
Benoît Ganne
8fadde6f01 pg: misc improvements and fixes
1) pg can typically injects packets in ethernet-input, ip4-input or
ip6-input. Make sure offload offsets are correctly set for ip4-input and
ip6-input.
2) add hw-addr support for ethernet mode (only available through cli)
3) refactor pg creation code to improve the readability by using
data structure pg_interface_args_t
4) fix the pg input and output traces to use headers according to
pg interface mode
5) introduce pg interface flags i.e. checksum, gso, gro

Type: improvement

Change-Id: Iffed502e9c6357d7ef8e8a72217867e8297236aa
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2024-12-12 14:45:14 +00:00
Florin Coras
504a7d1c93 session: disable fifo tuning on app close
Type: fix

Change-Id: Id6aa410a75356ece1d114a2970f70cf32203997f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-12-12 02:34:32 +00:00
Adrian Villin
0f97947f36 hs-test: fix nginx http3 dockerfile
- now working with UBUNTU_VERSION=24.04

Type: test

Change-Id: I60aa62b8dcf3e96392af7179925e0f0fa3e15f11
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-11 17:47:34 +00:00
Adrian Villin
af5fcbfa71 hs-test: replaced container/interface getter func
- replaced s.GetContainerByName("xyz") with s.Containers.Xyz in tests
  and suites
- same thing for interfaces
- each suite has its own structs with containers/interfaces
- structs are initialized in SetupSuite

Type: test

Change-Id: I5bd99605b40921b7b8c844e8650f6fb0915e9e99
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-11 17:47:04 +00:00
Hadi Rayan Al-Sandid
fb8f51697c bpf_trace_filter: allow pcap filtering without classifier
Type: improvement

Change-Id: I7ca860dbee0d0a24b7f00943142d8c878ed90e80
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-12-11 08:58:32 +00:00
Adrian Villin
dd02eb893b hs-test: added multi-threaded proxy tests
- TCP and UDP iperf proxy tests added

Type: test

Change-Id: Ic6f429cc6d48388ce9a17f8b9cd7c4b54b9a7e4d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-10 23:10:59 +00:00
Adrian Villin
1c2f0f22d9 hs-test: skip vppctl assert on teardown
- core dump check would get skipped if vpp crashed and vppctl
  was called on teardown

Type: test

Change-Id: I9dda7036042158332c8ec815f6eb4bb3c2f7000f
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-10 23:05:53 +00:00
Matus Fabian
499a9dd875 http: fix http_free_header_table
Type: fix

Change-Id: I014aebc84d0c219cc0c99120e9cd51fcc520a41c
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-12-10 17:54:54 +00:00
Ole Troan
18eedde9f2 ip: add enable ip4 api
A philosophical question. Do an interface have to have an IPv4 address
to process IPv4 packets? For ICMP error generation it's sufficient that
it has an address available on the node.

More concretely this patch is to allow an extern DHCP client to process
IP packets before it configures an address on the interface, without
having to have an node early in the ip4-unicast feature-arc like
ip4-dhcp-client-detect to intercept the packets.

Type: improvement
Change-Id: I780c579eec28ba564cf8417fbcc87e7a7876fdd2
Signed-off-by: Ole Troan <otroan@employees.org>
2024-12-10 13:03:54 +00:00
Matus Fabian
82b3cc1826 http: connection upgrade mechanism
Handle "Connection" and "Upgrade" headers in http transport layer which
are used to create a tunnel for some other protocol on the same
connection.

Type: improvement

Change-Id: Icf5479f36fbcc7259b157eaad957211be5ea2aae
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-12-10 05:10:41 +00:00
Matus Fabian
c4b4cd5e77 hs-test: arm support
CPU arch dependencies cleanup. Everything works fine apart from
redis-benchmark test.

Type: test

Change-Id: I4a1e7d3bce994f6ea0681e06955ef9c621468642
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-12-10 05:06:06 +00:00
Adrian Villin
8b2a67c8f3 hs-test: improved iperf testing
- set iperf to json output
- added iperf json parsing function
- we can now check if iperf transferred more than X megabytes
  (other asserts can be added)

Type: test

Change-Id: I560104a153456b46f22a1affee4301018063b99d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-10 05:03:54 +00:00
Adrian Villin
a661b90a4c hs-test: remove client app retries
- simple fix to avoid apps trying to start after a test
  timeout/interrupt

Type: test

Change-Id: I4e6fcbb2bb00c07e35cda1ebf6fcb76a913f7a32
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-10 05:03:54 +00:00
Mohsin Kazmi
f0a126a1eb cnat: add support for icmp traceroute
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ief1e97d03b7a934547add35ac3ed1f93f2499a20
2024-12-09 09:21:42 +00:00
Steven Luong
2e67a3f377 session: add ip4-fib-id and ip6-fib-id to app ns CLI
Problem
The API app_namespace_add_del allows specifying ip4_fib_id and
ip6_fib_id. But the CLI does not. It only allows interface.
Interface binding may change after the application namespace
is created and there is no registration for the callback
when the interface binding changes.

Fix
Add ip4-fib-id and ip6-fib-id to app ns CLI. When both
interface and fib-id's are specified, interface takes
precedence. When interface is not specified, either ip4-fib-id
or ip6-fib-id or both ip4 and ip6 fib-id's may be specified.
If only ip4-fib-id is specified, ip6 is disable for this
particular app namespace. If only ip6-fib-id is specified,
ip4 is disable for this namespace.

When the interface binding changes to different vrf and the
application namespace was created via interface option, we
delete the application namespace and recreate the application
namespace with the new interface binding. Notice when the
application namespace is removed, all session rules and
sdl rules previously created for the deleted application
namespace will be deleted. However, if the fib table/session
table  was shared by another namespace, the other namespace
will still contain the session rules and sdl rules.

Type: improvement

Change-Id: I76eb30da1ed8a39d06694c1e66d0675bf03516bf
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-12-08 23:39:24 +00:00
Steven Luong
fd896fc9fa session: enhance display for show app
Display segment manager information for show app <index> verbose
Mark segment manager as listener if it is a listener segment.

Type: improvement

Change-Id: I8d91f4c2ed5b8f39620f2c8b06950c0e7ee2225e
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-12-08 23:20:06 +00:00
Matus Fabian
3d0b4ab20c http: http_decap_udp_payload_datagram fix
Properly handle incomplete capsule.

Type: fix

Change-Id: Ied7fca861f02e401451beaff09e612bcf471d8e0
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-12-08 22:56:40 +00:00
Florin Coras
4c1f178063 vcl: fix ldp getsockopt tcp_info length check
netinet/tcp.h and linux/tcp.h have different lenghts but overlap. LDP
uses the former while iperf the latter. Accept both lengths for now as
we do not support exposing tcp metrics via ldp.

Type: improvement

Change-Id: I13a149d68715ed9451773630a3595c09c421aa29
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-12-08 21:32:39 +00:00
Florin Coras
4e271dda7b vcl: improve handling of thread cancelation in vls
Meant for multi-threaded applications that share a vls and vcl worker.
Disable thread cancelation on thread new thread detection and add a new
pthread cancelation point in vls_mt_mq_lock

Type: improvement

Change-Id: I21b16ee7c6a5ec31b8f6363325cc7ffa463c7b5c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-12-07 16:27:22 -05:00
Varun Rapelly
b8af24b26d tls: add async processing support
Adds support for tls async processing using OpenSSL.
Adds new CLI command to configure OpenSSL TLS configurations used by
OpenSSL context and session. New CLI format is:
tls openssl set-tls [record-size <size>]
                    [record-split-size <size>]
                    [max-pipelines <size>]
Sets default values to below TLS configuration parameters:
 - first_seg_size: 32MB
 - add_seg_size:   256MB

Type: feature

Signed-off-by: Varun Rapelly <vrapelly@marvell.com>
Change-Id: I990be31fced9e258fdb036f5751cd67594b0bce7
2024-12-07 21:18:54 +00:00
Florin Coras
0ec906694d vcl: fix epoll wait assert
Type: fix

Found by Lucas.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I3e10d3a9f40ef28cb9bda58f199a04dfc3e41d27
2024-12-07 00:26:41 +00:00
Joel Ahn
72bd2e585d misc: move ppp to a plugin
Type: refactor

Move PPP folder under vnet to the plugin folder, and modify some of path
of the #inlude<header> to the new path.

Add a plugin.c file to register a plugin.

Resolve ip4_input and ip6_input's dependency on PPP functions by moving
those calls to PPP's initialization.

Resolve osi's inter-plugin dependency on PPP by having it retrieve the
function pointer

Add ppp to the list of valid spelling words

JIRA: VPP-2052

Change-Id: I1a26ef0663a91857d13f7d87a3bb14bc38893194
Signed-off-by: Joel Ahn <joeahn@cisco.com>
2024-12-06 22:18:42 +00:00
Steven Luong
41ae1e20e6 session: clean up session table when re-adding an existing application namespace
The app ns semantics allows the same app ns to be re-added with different
interface. For example,

app ns add id blue secret 1 if tap0
app ns add id blue secret 1 if tap1

If tap0 is bound to table 0 and tap1 is bound to tap1, we need to clean
up the existing session table and possibly allocate a new session table
for the app ns.

Type: fix

Change-Id: I566d621081b7cdbd7d0c481fda53953b39c26001
Signed-off-by: Steven Luong <sluong@cisco.com>
2024-12-06 16:59:10 +00:00
Dau Do
dc9f5e9519 memif: add num pkts received/sent per queue
Add memif stats per queue for performance tuning.

Type: improvement
Change-Id: Ifacc80c0adfe92075d91179857c8956d1cbf3a70
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-12-06 13:00:27 +00:00
Dave Wallace
f7964e5fa6 build: upgrade to openssl 3.4.0 in vpp-opts-deps package
Type: make

Change-Id: I8f801057f9f4b10d50f6ace5541e726f75f262e8
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-12-05 22:38:33 -05:00
Adrian Villin
1c0af1fb68 hsa: fix proxy udp issue
- when testing multithreaded proxy with udp iperf, iperf wouldn't
  connect -> made client_sep a vector so multiple transport protocols
  can be saved

Type: fix

Change-Id: I91936bd3214f40deb914792c02783112ae59942c
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-05 17:43:04 +00:00
Adrian Villin
91e63915e1 tap: update tap_flags
- added TAP_API_FLAG_CONSISTENT_QP = 256

Type: improvement

Change-Id: I57d95503395baf265c29d48a92bd69347f0a7333
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-12-05 16:36:15 +00:00
Dau Do
502461af6a crypto: add config option to adjust crypto sw scheduler queue size
Type: improvement
Change-Id: I63c16365a0d4a26b8ecb05bde81ad7b532df50a0
Signed-off-by: Dau Do <daudo@yahoo.com>
2024-12-05 15:43:07 +00:00
Andrew Yourtchenko
6313d9a30c misc: VPP 24.10 Release Notes
Type: docs
Change-Id: I3774ed636671c3e7f2cacc8ef910c1f3476e7933
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit cfa0953251cbab435307baf3dcd249fd95afaf1f)
2024-12-04 17:29:50 +00:00
Renato Botelho do Couto
eec332b036 dev: include limits.h for PATH_MAX
Type: fix
Change-Id: I66607164b1552011b39808bafc8e02b5a24f883c
Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
2024-12-04 17:25:30 +00:00
Hadi Rayan Al-Sandid
f71c6d436b docs: mention command to display nodes supporting tracing
Type: docs
Change-Id: Id94539cae001059d1acdde6a90c3b2f16990bd47
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-12-04 16:51:22 +00:00
Ivan Ivanets
19e2c7ac01 tests: remove decorator tag_fixme_ubuntu2204
Type: test

There is no need to use the tag_fixme_ubuntu2204 decorator.
All tests that previously used it are now stable. The neighbor test
has been moved to the extended suite because it is not related to the
type of operating system.

Change-Id: Ifa0a30cbeeeaabb2bbe4d213fa61e6fbde8789ca
Signed-off-by: Ivan Ivanets <iivanets@cisco.com>
2024-12-04 16:26:21 +00:00
Florin Coras
63b34c8d22 vcl: fix poll support
Type: fix

Change-Id: I827f19d893153277baba3c2d0efde5f2827eb0ff
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-12-02 21:11:38 -08:00
Benoît Ganne
6b224de844 svm: fix overflow when no region is big enough
- if no region is big enough to accommodate need_n_bits, we can scan
   past the end of the bitmask
 - rewrite the search loop for clarity

Type: fix

Change-Id: I82637bc91eb7e7ae922785bc626fa224638cb4e4
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-11-29 21:55:28 +00:00
Benoît Ganne
709f40c29d vapi: fix vapi_ctx_alloc
clib_time_init() may use clib main heap when it needs to parse /proc
or /sys. Make sure the main heap is initialized early.

Type: fix

Change-Id: I891504f3455b97c06da25e4833a8fb6941eb428a
Signed-off-by: Benoît Ganne <bganne@cisco.com>
2024-11-29 14:14:16 +01:00
Florin Coras
978d48b765 vcl: store libc_epfd in vls instead of vcl
ldp stores the libc epfds it uses in conjunction with vcl epfds in vcl
attributes. Apart from being an ldp, as opposed to vcl, specific
attribute, the epfd is retrieved on session close with vls locks that
could be acquired from multiple threads.

Avoid grabbing locks when retrieving the attribute.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I5fc52d72667a7693b1557d209c3890a968422f1e
2024-11-28 21:58:56 +00:00
Adrian Villin
3628353e09 hs-test: added ldp iperf tcp test
- renamed other iperf tests

Type: test

Change-Id: I9cc7b49f23e9e0c6a01d2f74aef722d580478f75
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-11-27 16:52:42 +00:00
Adrian Villin
f9f5717633 hs-test: don't use reserved UDP ports for binding
Type: test

Change-Id: Ief0d238bbbf533779618b971f01099aa113c1c08
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-11-27 16:51:38 +00:00
Hadi Rayan Al-Sandid
7d469364c5 api: fix bug in pcap capture api
pcap api cleanup can cause crash in certain scenarios
e.g.missing/invalid 'filename' parameter.

Type: fix

Change-Id: I92417765960de84e30ed7cb945d40c50d722fb6c
Signed-off-by: Hadi Rayan Al-Sandid <halsandi@cisco.com>
2024-11-27 08:20:17 +00:00
Dave Wallace
1beb88ed3b tests: remove use of python 2.7 compatibility module 'six'
- python 2.7 is no longer supported, clean up technical
  debt with use of 'six' module in test code

Type: test

Change-Id: I70e737920a6048c5e9caa20fece5ee21b91bb353
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-11-27 07:42:00 +00:00
Dave Wallace
75c67ac5db tests: use v3 version of session sdl dump api in ip6 test
- session_sdl_v2_dump api command is deprecated

Type: fix

Change-Id: I4f7a140e7e39fae8076caa54fd8bfb0c755c6767
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-11-27 04:48:01 +00:00
Matthew Smith
41ac8ee88f vapi: only wait if queue is empty
Type: fix
Fixes: 4b9935cd54

In vapi_wait(), check that the queue is empty before waiting. The
condvar is only signaled on addition of the first message.
pthread_cond_wait() will block approximately forever if there are
already messages in the queue.

Change-Id: Ic52befe443509f3c53aa9a872ba62bb05aaac25e
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
2024-11-27 03:06:33 +00:00