704 Commits

Author SHA1 Message Date
adrianvillin
707210c636 hs-test: updated golang and packages
ioutil.ReadFile is deprecated, replaced with os.ReadFile

Type: test

Change-Id: I9f8075796d05d47ea4dddd7e986026a267a7fe0c
Signed-off-by: adrianvillin <avillin@cisco.com>
2024-01-26 16:59:02 +00:00
Filip Tehlar
9418143bd4 hs-test: change convention for skipping tests
Also re-enable external echo QUIC test.

Type: test

Change-Id: I3973409c31fd7c42b97ac3ceae1a5cbad6f1b2b6
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-19 17:02:03 +00:00
Mohsin Kazmi
c60266d1ea memif: use VPP cacheline size for memif when compiling within VPP
Type: make

memif.h file is independent code which can be used outside of
VPP. Hence it uses its own cacheline size MACRO. This patch
sets the value of MEMIF_CACHELINE_SIZE in the cmake file for
memif plugin to VPP_CACHE_LINE_SIZE.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I8185e78897f4571f1a0430dd7e758816e127444c
2024-01-19 12:32:55 +00:00
Tom Jones
c3b416c492 build: Explicitly use bash for shell scripts
VPP requires bash for all shell scripts. Align shebang lines in build
and test scripts to look up the location of bash rather than hard coding
'/bin/bash'.

Look up the location of bash for makefiles.

Type: improvement
Change-Id: I23b705d81d60389fa8af61c680cf0abd74f0ea24
Signed-off-by: Tom Jones <thj@freebsd.org>
2024-01-19 12:30:01 +00:00
Filip Tehlar
87241fefd9 hs-test: use specific port for http3 test
curl sometimes uses 2 different source ports during the test.

Type: test

Change-Id: Ib27e9d22a9cc951f4729f4bd0ae99d80bf8d938b
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-18 17:06:00 +00:00
Damjan Marion
01fe7ab88e octeon: native driver for Marvell Octeon SoC
Type: feature
Change-Id: I6898625c4e8854f777407dac3159e4c639a54860
Signed-off-by: Monendra Singh Kushwaha <kmonendra@marvell.com>
Signed-off-by: Damjan Marion <damarion@cisco.com>
2024-01-17 20:44:10 +01:00
Tianyu Li
d7c96324c0 libmemif: fix segfault and buffer overflow in examples
- Fix buffer overflow caused by strncpy(dst, src, strlen(src)),
use sized buffer to ensure overflow safe.

- Fix test_app getopt usage

 When use example/icmp_responder in slave mode
- Fix segfault when buffer size is not specified
- Fix wrong packet send out.

Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Change-Id: I5ed47fd8e630420d7ae0203a2605d2b9abd33d2a
2024-01-12 03:22:56 +00:00
mbly
00e9fe6ca7 libmemif: fix for memif_init_queues slot math
Increase slot variable to u32 to address combinations of num-queues and queue-size that cause slot variable to wrap when declared as u16, e.g. num-queues > 8 && queue-size is 2^12

Type: fix
Change-Id: I5bd6198d60395156a06f1a280ea2594824ceaa9d
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:30 +00:00
mbly
a908779820 libmemif: Fix for memif_buffer_alloc rewind logic
Rewind logic was not supporting count = 1, where size was > memif_buffer_size and a rewind is required.
Fixed slot-->next_buf bug for !master as well.

Type: fix
Change-Id: I65cf0d3d0c105f37125412a613e5ff8c5da9a3a2
Signed-off-by: mbly <mbly@ciena.com>
2024-01-12 03:22:06 +00:00
Daniel Béreš
9853342194 libmemif: added tests
This patch provides unit tests for libmemif written in Unity

Type: test

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I19116def6e6d28efd5f460c93911245474a11321
2024-01-12 03:21:41 +00:00
Filip Tehlar
56e17cf7a2 hs-test: add more asserts
Type: test

Change-Id: Ia285ff39d9b19464ea086ec847ceaf52c6c0195c
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 19:45:06 +00:00
Filip Tehlar
3336eefaa8 hs-test: add tls proxy test
Type: test

Change-Id: I8f3f4c464907356bb1990ea53f0f46befc057acf
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:35:54 +00:00
Filip Tehlar
4fa0ba6ac0 hs-test: retry command on test setup failure
Type: test

Change-Id: Iad744c4b3f79820e8bd0dd2ef9f18e4f7718e845
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2024-01-11 10:27:09 +00:00
Florin Coras
7428eaa4a1 session: support for cl port reuse
Adds support for connectionless listener port reuse. Until now, cl
listeners had fifos allocated to them and therefore only one app worker
could ever listen, i.e., a session cannot have multiple fifos.

To circumvent the limitation, this separates the fifos from the listener
by allocating new cl sessions for each app worker that reuses the app
listener. Flows are hashed to app worker cl sessions but, for now, this
is not a consistent/fixed hash.

Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ic6533cd47f2765903669f88c288bd592fb17a19e
2024-01-09 17:07:54 +00:00
Florin Coras
98d24a5fea hs-test: more proxy vars for docker builds
Type: improvement

Change-Id: Ica9d87abde7a1dc0b4007911a7e0abab46dfb75d
Signed-off-by: Florin Coras <fcoras@cisco.com>
2023-12-23 01:01:09 +00:00
Florin Coras
f26bbeac4b hs-test: use prebuilt curl with http3 support
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4d17ae3f7736dc10c68ca6e304699ea39d012f6c
2023-12-22 17:19:11 +00:00
Filip Tehlar
48744b9aa3 hs-test: decrease docker image size
Type: test

Change-Id: Ic1ad2f1f983ad8f8e8e8813f941e11757930c92e
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 17:50:06 +00:00
Filip Tehlar
5ebdd51c60 hs-test: remove unnecessary app ns configs
Type: test

Change-Id: I0226227dc756a5a3af5e9d3b0d65a38c0aa55b3d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-12-15 13:38:31 +01:00
Filip Tehlar
cc1475cdc2 hs-test: add http prom test
Type: test

Change-Id: Ia15ecc3cf2c087a6959601ff02e187c32570ff60
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-11-30 03:33:02 +00:00
Steven Luong
ac49cf9205 docs: Remove references to vlan-strip-offload as it is deprecated
Type: fix

Change-Id: I3a258433cf507f48cd67332387eb7fef103a88f8
Signed-off-by: Steven Luong <sluong@cisco.com>
2023-11-15 14:07:33 +00:00
Filip Tehlar
efe875e7cd hsa: unify echo test setup
Type: test

Change-Id: I8665492c2f7755901a428aacdb27e98329ff557a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-10-26 16:32:17 +00:00
Gabriel Oginski
b953532ed4 vpp-swan: fix config to run containers
This patch changes config to run containers on Ubuntu 22.04.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3be48099cb48d2c4a04526c15780244614bef3d4
2023-10-05 10:37:37 +00:00
Gabriel Oginski
052b023488 vpp-swan: fix configuration of policies
This patch fixes configuration of priority, port and type of protocol
for inbound and outbound policies in policy-based IPsec of this plugin.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I01ddc2e13ebbe87380e66a525aac1b615f619604
2023-09-15 11:19:16 +02:00
Filip Tehlar
109f3ce4eb hs-test: point gdb to vpp source files
Type: test

Change-Id: Ie5867737e5d49fd45cc15b690af3493263fb2f6f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-05 15:55:55 +00:00
Filip Tehlar
3b770881b9 hs-test: verbose output on single test run
Type: test

Change-Id: I12ae7db36a6f7f9758fd195088877dfcd5606f84
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-05 15:58:28 +02:00
Filip Tehlar
4b3598e39a hs-test: log external apps
Type: test

Change-Id: Id2b0d408bd46f20b81422506f9db4eb655feddac
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-04 20:56:14 +00:00
Filip Tehlar
a6b1a7d809 hs-test: fix gdb attach
Type: test

Change-Id: Ic48ca7a3aab47df50d4e38e6123c90140c944172
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-09-04 20:55:56 +00:00
Dave Wallace
7b8b465269 tests docs: update python3 venv packages
- Package update performed by
  1. updating pip, pip-tools, setuptools
  2. 'make test-refresh-deps' on ubuntu 22.04
  3. fixing 'make test' and 'make docs' issues
     on ubuntu 22.04
  4. 'make test-refresh-deps' on ubuntu 20.04
- Add dependency for 'make test-refresh-deps'
  to insure python venv is set up.
- Update of python formatter, black,
  caused reformating of 41 python code
  files.

Type: make

Change-Id: I7cafdf4b5189065ac57cb6b254937f6e0897a924
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-08-16 19:53:12 +00:00
Mohsin Kazmi
c709f2cd9d libmemif: add support for buffer size
Type: improvement

buffer size can be configurable:
./test_app -b 9216

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Id77f6baac27d45dec3d5b7ea8a9a53acf2a302fc
2023-07-31 09:55:41 +00:00
Filip Tehlar
543cd57ea2 hs-test: improve get stats
Type: test

Change-Id: Ie681ee43007f4fe787d51d80bda9b433dcb6c09a
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-07-28 18:55:55 +00:00
Gabriel Oginski
c3f505fe7b vpp-swan: fix handler API messages
In the current implementation there is a bug related to the incorrect
message handling due to the wrong id.

The fix changes logic responsible for handling incoming API messages
by correcting their ids.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iea29506053c9fd2e1d01bce83e7f4a6e1de39321
2023-07-24 08:15:21 +00:00
Gabriel Oginski
0e1fe7ba86 vpp-swan: change flow in function for add route
This patch addresses the issue when the list of available interfaces
is not up to date. Due to this issue adding a new route fails
and finally the connection is not established.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3a63c0dd99ebc28ea149b4b23867440937682761
2023-07-19 02:38:00 +00:00
Gabriel Oginski
efd2350d65 vpp-swan: fix incorrect msg ID in register_event
This patch addresses the issue where the message ID registration
in the register_event function is incorrect. Due to this incorrect
registration, the lookup for the corresponding callback on received
messages fails, eventually leading to a segmentation fault
and double-free memory space.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: If95182f972f64adb44d514e18c831cc9627d8f0f
2023-07-19 02:32:11 +00:00
Gabriel Oginski
73d82d1273 vpp-swan: fix function to get sw_if_index
In the current implementation there is a bug in the function
responsible for getting software interface index by the name of the
interface. Incorrect function is used to send the API message, also
the handler with replied message is incorrect.

The fix changes function to send dump message and also adds handler
with replied message in the correct way.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Id1a3ba2ce7e92d216907f344431b9e2acb1d5572
2023-07-19 02:31:21 +00:00
Laszlo Kiraly
6b4aa2b7f4 build: generate debug info rpm packages for opensuse
Enabling debug info RPM creation in spec file.

Type: fix

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Id284b135ec4125905145f7902a6e1cf42ba65aa4
2023-07-06 14:46:41 +00:00
Ting Xu
61762c7aac packetforge: fix has_key invalid in python3
Python Dict attribute "has_key" was removed in Python3. Use "in"
operation instead.

Type: fix

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I7b63b0689e9970ca798921368c5616875f7d5682
2023-07-04 06:45:17 +00:00
Filip Tehlar
31eaea9eef hs-test: add nginx+quic test
Type: test

Change-Id: I15e4f2fb84cb4f34b6fea95978db000854a63e78
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-27 15:58:47 +00:00
Dave Wallace
1c95e12b0d tests docs: fix lcov code coverage report generation
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199

Type: test
Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-06-22 13:35:28 +00:00
Filip Tehlar
5aa59c7cfc hs-test: increase test run timeout
Type: test

Change-Id: Ica211c79373777c3352d6ccbb619c0d67b70fa06
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-08 17:33:15 +00:00
Filip Tehlar
3a910ab768 hs-test: rename address allocator
Type: test

Change-Id: I1745719315d4e0785df5a03aa4312f84c40cb18f
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2023-06-08 17:04:36 +00:00
Filip Tehlar
d3b47c6d79 hs-test: fix vcl test parameter
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ieb6e46439d8e66a792f9c508e7dc49ecdd392487
2023-06-01 15:50:59 +00:00
Mohsin Kazmi
7280e3f866 libmemif: add testing application
Type: test

This application creates two memif interfaces which connect
to an external application i.e. VPP.

Usage:
1) Start VPP with following config.
create interface memif id 0 master
create interface memif id 1 master
set int state memif0/0 up
set int state memif0/1 up
create packet-generator interface pg0
set int state pg0 up
create packet-generator interface pg1
set int state pg1 up

set int l2 xconn pg0 memif0/0
set int l2 xconn memif0/0 pg0
set int l2 xconn pg1 memif0/1
set int l2 xconn memif0/1 pg1

packet-generator new { \
  name memif           \
  limit -1             \
  node ethernet-input  \
  size 64-64           \
  interface pg0        \
  worker 0             \
  data {               \
    IP4: 42:01:0a:00:00:0a -> 02:fe:4b:6e:4d:c1 \
    UDP: 172.16.2.2 -> 172.16.0.2               \
    UDP: 1234 -> 1234                           \
      length 30 checksum 0 incrementing 1       \
  }                                             \
}

2) Compile and Run the test_app in another terminal.
mkdir -p extras/libmemif/build
cd extras/libmemif/build
cmake ..
make
sudo ./examples/test_app

3) Run in VPP cli
vpp# packet enable

4) Run monitor to see the throughput and pps
vpp# monitor interface memif0/0
Or
vpp# monitor interface memif0/1

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I4b9062fca8ad3020225adb7b1b09e5d66b1a7d48
2023-05-30 09:01:53 +00:00
Filip Tehlar
71fc194703 hs-test: add vcl echo tests
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I3e543cb292c7ed0f9d240f8f2473a1db07aff0fd
2023-05-24 17:38:10 +00:00
Filip Tehlar
608d0069d9 hs-test: support for multiple workers
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ie90e4b02c268bc3ca40171b03829f5686fb83162
2023-05-20 15:51:02 +00:00
Ting Xu
f34420ff11 packetforge: add option to show spec and mask only
In some cases with Generic FLow, it is only required to show the pattern
of spec and mask, but no need to add the flow. Therefore, add an option
in packetforge so that users can show spec and mask only.

Type: improvement

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I7b3040689eb82d0b58924712ee6fc9cfa0a42fa1
2023-05-15 20:20:12 +00:00
Dave Wallace
d0df24dc47 hs-test: add missing make target for .deps.ok
Type: make

Change-Id: I8983778b4c2f5123b27aeeb1fdc4721c8e9c9160
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2023-04-26 18:04:41 -04:00
Filip Tehlar
e08fdf316a hs-test: remove untagged images after build
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I55731fa546df01ac4bd327b444ac1a5c2052bed1
2023-04-26 18:03:35 +02:00
Gabriel Oginski
980f3fb2d3 vpp-swan: assign src/dst port in udp encap
This patch add in missing src/dst port assignment in SA for udp port
if encap.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I84219c016c5a32590aba0371c01ad8d44cbf4c5c
2023-04-25 15:50:05 +00:00
Koki Kiriyama
140ca0fa95 build: correct variable name
Type: fix
Signed-off-by: Koki Kiriyama <kiriyama.kk@gmail.com>
Change-Id: I47c4c91aa6f973bd93dca352f470642e90aa70e0
2023-04-25 15:12:23 +00:00
Filip Tehlar
dda1f6871e hs-test: adjust performace testing parameters
Apache ab sometimes fails during extensive performace testing.
This patch makes sure hs-test perf tests always pass.

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I0921682f0f07df3af45b342b9a7ddfa1af037ceb
2023-04-24 18:32:44 +02:00