513 Commits

Author SHA1 Message Date
Ting Xu
be1b844214 packetforge: fix lack of edge for ipv6 after gtppsc
Add one new edge for ipv6 after gtppsc so that packetforge can parse
this protocol combination.

Type: fix
Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I1bae1ec617c4867de2e0b3de27eda77b89e5580c
(cherry picked from commit 656a550f1feda3ddfa96f8e1fc510e8eebd3ce7a)
2023-02-08 02:21:33 +00:00
Ting Xu
c7131df872 packetforge: fix order of dst/src address of mac
In the defination of mac node, the order of dst and src address is
reversed. Swap their order in this patch.

Type: fix
Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: I039accc0a881eef12f13c75c5becf8b7df97d525
(cherry picked from commit 02bdd3f5cb0f2ff4988f972f31fb44da89fd786e)
2023-02-08 02:21:01 +00:00
Florin Coras
f4fe0168a6 hs-test: zero timeout on docker stop
Should drop execution time for all tests by about 80%.

Type: test

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ib6b4ef9fb4e7745a61b40c0b34e53e4046ccdbcc
2023-01-18 01:06:19 +00:00
Florin Coras
a35f56663f hs-test: add http proxy env to container builds
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I8c116efb41d561e30fd0db1388cdba903e2edffe
2023-01-17 17:44:30 +00:00
Maros Ondrejicka
f643b6f671 hs-test: autodetect ubuntu version during build
Since VPP binaries are being compiled on host system,
it makes sense to autodetect Ubuntu version when building test images
so that containers would be running version equal to host system.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I0e13d9ba1ddcd3ad5835bce1b8cccfc048e5e528
2023-01-17 17:38:47 +00:00
Filip Tehlar
f34f32f319 hs-test: better directory structure
Move config files to resources and docker files to separate directory

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I24dd0705c4a463c06de525f28cb54d882527320a
2023-01-16 20:51:09 +00:00
Filip Tehlar
3f951433b8 hs-test: restrict concurrency on envoy
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I8b06f4554a6ee5b13de829e47eaa82431a76c332
2023-01-16 20:47:33 +00:00
Maros Ondrejicka
8851ccfe4a hs-test: use equal ubuntu versions in test images
Official nginx image is based on Debian with older libc version,
that causes a runtime fail when VPP libraries are compiled in Ubuntu
which has newer libc.
Using equal version of Ubuntu in VPP image and in nginx image
ensures that running nginx won't fail due to different libc versions.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I48f3b23be30a9d9d9144351437ce163d64a4bb6b
2023-01-13 19:54:01 +00:00
Filip Tehlar
dcca9e75a1 hs-test: fix tests using wget
This fixes an issue on systems with http proxy set.

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ic84fcd0b8a7698ef101b369d46be858cbe85fc73
2023-01-12 16:21:55 +01:00
Filip Tehlar
058237e581 hs-test: optimize size of docker image
Copy necessary only plugins in docker image

Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I5f60a8a1ccbbe099ac60774562dc5901f3b4fbed
2023-01-11 19:23:22 +00:00
Maros Ondrejicka
f719adfa89 hs-test: use anchors in yaml config files
Volumes can be referenced with anchors to reduce text duplication
and to explicitly show which containers share a volume.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: Id408a78262573b3faf2257c32bfa569eca2e2049
2023-01-11 19:21:49 +00:00
Filip Tehlar
993c86f339 hs-test: remove exec flags from source files
Type: style

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ia87b28e81b6fd06c8c3681bf3cb1dd6ce8c84f41
2023-01-09 15:48:40 +01:00
Filip Tehlar
f3ee2b636a hs-test: fix code style
This will add a new target (fixstyle) to Makefile that runs gofmt tool.

Type: style

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Icba60633f82aa8bbc75749f080e00f0375b55a18
2023-01-09 12:14:23 +01:00
Filip Tehlar
c204c87c18 hs-test: add nginx test
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Idd5352f254df0d1f36c1270e73440c9287247b81
2023-01-09 11:39:06 +01:00
Filip Tehlar
bb98aac422 hs-test: small improvements
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ifa56da632b139acd5e743c3076c24b5b55388924
2022-12-21 17:06:39 +00:00
Maros Ondrejicka
8753180a80 hs-test: add runtime options
Options
 "-p" to not remove topology elements after the test finishes
 "-v" from now on extra output from tests is hidden by default,
      this will show it again

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I626188561c883534e9004d5130ee2a972d12b4e2
2022-12-20 18:49:49 +00:00
Maros Ondrejicka
db823ed6e9 hs-test: abstract away topology from test cases
Definition of shared volumes and containers has been moved
to yaml files to be together with network topology.
Containers are automatically run at the beginning of each test case
and stopped afterward.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I264cbb4f1355f8bd7aade221e9609fb5b9bd693e
2022-12-19 17:11:52 +00:00
Maros Ondrejicka
98a91e8260 hs-test: use assert-like approach in test cases
Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I1653001461d4dfc52f1fb3a9e0cf458a506b8324
2022-12-07 16:05:20 +00:00
Maros Ondrejicka
0e79abbe2e hs-test: manage containers and volumes within test suite
Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I614111814af5a99dcaa22c8581ea2d339572ae1c
2022-12-06 20:06:35 +00:00
Maros Ondrejicka
5b746319d8 hs-test: test tcp with loss
This adds basic, functional-only, test of TCP connection with delay and
packet loss introduced by Network Delay Simulator.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: Ibedf4c680c152921b733cf39d99b178412748d3c
2022-12-06 20:12:40 +01:00
Maros Ondrejicka
11a03e972e hs-test: add test suite features
Test suite now supports assertions which on fail stop test case run,
also it allows to create docker containers which are going to be
stopped automatically after the test run is finished.

Type: improvement
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I2834709b1efd17b8182d36cc0404b986b4ed595d
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
2022-12-02 21:35:10 +00:00
Maros Ondrejicka
7943c90b2e hs-test: document host stack test framework
Type: docs
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I47d2794283a85a644448e60538f543644a0edfdc
2022-11-26 01:51:25 +00:00
Filip Tehlar
1a9dc75fe8 hs-test: auto register test actions
Type: improvement

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Icb5db6f69eda93181aba69b1f8676a73c0a4561b
2022-11-25 00:37:20 +00:00
Timur Celik
20721177ec vpp-swan: Fix segfault for multiple addresses
In order to loop over the list of `vl_api_ip_address_details_t`,
increment the pointer by one instead of `i`.

Type: fix
Change-Id: I8554d1388d67bb95e029eddf444d383fb85ecac7
Signed-off-by: Timur Celik <mail@timurcelik.de>
2022-11-23 14:46:32 +00:00
Filip Tehlar
468d7876b9 hs-test: skip vcl reattach test
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I594ecc347f367887890a3182e7c24028bf9a7f50
2022-11-14 20:59:01 +00:00
Huawei LI
abf81c3add build: fix lib install dir and add vat2 lib install when build rpm.
Type: fix

Signed-off-by: Huawei LI <lihuawei_zzu@163.com>
Change-Id: I5ac557756ff2b3de13ce328a27ffdd289ab3173e
2022-11-13 01:29:07 +00:00
Filip Tehlar
b15a0000ff hs-test: add http client connect test
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: If705d311065e128b4b6df7d8d80910e4be72d3e6
2022-11-10 18:35:31 +00:00
Yulong Pei
de0c1af447 vpp-swan: remove step to copy vpp_sswan source for docker image
Since vpp_sswan plugin already merged in /vpp/extras/strongswan,
no need to provide additional vpp_sswan source files for docker image.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: I35bad22b1046e0dddbcf39e1af38d589d1438239
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2022-11-01 20:20:50 +00:00
Maros Ondrejicka
0db15758ed vcl: register workers when reattaching to vpp
Type: improvement
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I82a286e2872338974c1930138c30db78103ae499
2022-10-27 15:06:27 +00:00
Ting Xu
c9d916c7cc packetforge: fix GTP-Extension header field data
Fix the incorrect fields data of GTP-Extension header.

Type: fix
Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Iafc5e852910649afcf0e583a5513b1ab33f5b5e8
2022-10-25 02:07:35 +00:00
Matus Halaj
af36e96d07 gomemif: migrate to govpp repository
Type: make
Signed-off-by: Matus Halaj <mhalaj@cisco.com>
Change-Id: I1d48c7e44fdf23438132996fd3288b29da1fe36e
2022-10-13 18:23:10 +00:00
Maros Ondrejicka
eeaf6c8973 misc: avoid permission issue when running envoy
Because envoy didn't have permission for `envoy.log` file it would stop.
This made tests involving envoy fail.
Adding `ENVOY_UID` environment variable makes envoy run as root,
which avoids the problem.

Type: fix
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I910416ad1c87137396e7da89c13de7739ce74c70
2022-10-13 13:54:25 +00:00
Gabriel Oginski
ce62d6f01c vpp-swan: fix linked library to plugin
Due to refactor keeping api common code in vlibapi, changes order
linked library to this plugin.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Id94c0b78cbce4954d34a82123506a76370b12b23
2022-10-12 21:16:54 +00:00
Daniel Béreš
82ec908acb gomemif: update to libmemif version 4.0
Type: improvement

This patch provides:
1. interrupt mode support,
2. abstract socket support,
3. overriding responder example and divides it to two examples:
	-icmp_responder_cb
	-icmp_responder_poll

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Change-Id: I99c86d053521760c457541fc596ed554f4077608
2022-10-06 12:22:07 +00:00
Gabriel Oginski
95875774bc vpp-swan: Add scripts for testing
Added scripts to reparing setups for testing

To prepare and run containers:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh prepare_containers

To prepare setups:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh config

To clean-up settups:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh clean

To deleted all containers and images in Docker:
sudo ./extras/strongswan/vpp_sswan/docker/run.sh deleted

Type: feature
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I77f01c0419dccc95f610046c8552ae825f2c7e12
2022-09-28 17:46:04 +00:00
Gabriel Oginski
4e88e041ad vpp-swan: Add plugin for vpp-swan
Added plugin vpp-swan is a plugin that helps offloading
Strongswan IPsec ESP process from Linux Kernel to VPP.

Type: feature
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Iec77945892453fac1890d3c49d7d86fc6b09c893
2022-09-28 17:45:26 +00:00
Andrew Yourtchenko
8ffe8f6092 misc: experimental script to get the list of the reviewers for a commit
The script accepts zero or one argument (the commit hash), and outputs
the detected components, the component maintainers,
and the final suggested reviewer list. See the script
for the example output.

Change-Id: Ief671fe837c6201bb11fd05d02af881822b0bb33
Type: docs
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2022-09-20 20:54:28 +00:00
Ting Xu
ce4b645178 packetforge: add packetforge for generic flow to extras
Add a new tool packetforge to extras. This tool is to support generic flow.
Packetforge is a library to translate naming or json profile format flow
pattern to the required input of generic flow, i.e. spec and mask. Using
python script flow_create.py, it can add and enable a new flow rule for
an interface via flow VAPI, and can delete an existed flow rule as well.
Command examples are shown below. Json profile examples can be found in
./parsegraph/samples.

Naming format input:
python flow_create.py --add -p "mac()/ipv4(src=1.1.1.1,dst=2.2.2.2)/udp()"
-a "redirect-to-queue 3" -i 1
python flow_create.py --del -i 1 -I 0

Json profile format input:
python flow_create.py -f "./flow_rule_examples/mac_ipv4.json" -i 1

With this command, flow rule can be added or deleted, and the flow
entry can be listed with "show flow entry" command in VPP CLI.

Packetforge is based on a parsegraph. The parsegraph can be built by
users. A Spec can be found in ./parsegraph as guidance. More details
about packetforge are in README file.

Type: feature

Signed-off-by: Ting Xu <ting.xu@intel.com>
Change-Id: Ia9f539741c5dca27ff236f2bcc493c5dd48c0df1
2022-09-20 20:44:42 +00:00
Filip Tehlar
229f5fcf18 misc: add test framework for host stack
Type: feature

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I5a64a2c095cae3a4d5f8fdc73e624b010339ec8e
2022-09-19 21:00:18 +00:00
Laszlo Kiraly
987318e0d1 build: Cleanup python2 from suse build and uplift opensuse version
- default to opensuse-leap 15.4, no python2 support in this version
 - deprecate version openSUSE 15.0, openSUSE 15.3 still supported

Type: make

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: Ic7178ff5238e2669bc45166c1f13d3f077f6069b
Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
2022-09-07 13:04:14 +00:00
Mohsin Kazmi
8a34484057 libmemif: fix the buffer size
Type: fix

Previously, libmemif can only use buffer size which
have to be power of 2. memif protocol does not enforce
this. This patch fixes this issue.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Ic71e6a51685e2c2228c744920797064d4c7c65c9
2022-08-29 07:07:07 +00:00
Mohsin Kazmi
6e284ef6ce libmemif: add support for custom buffer-size and headroom in icmp example app
Type: improvement

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I2bdaee7938a3747e3217d6901ec3c66f1ee3da61
2022-08-29 07:05:23 +00:00
Neale Ranns
fd2417b2a4 ip-neighbor: ARP and ND stats per-interface.
Type: feature

stats of the like from:
  https://datatracker.ietf.org/doc/html/draft-ietf-rtgwg-arp-yang-model-03#section-4

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Icb1bf4f6f7e6ccc2f44b0008d4774b61cae96184
2022-08-09 14:17:46 +00:00
Mohsin Kazmi
8636a32041 libmemif: fix chain buffer support
Type: fix

This patch fixes chain buffer support as transmit side
missing to set the flag to the descriptor in case of
chain buffers.

Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: I73ff11be69a388f14fea39a19272d8eb76148fba
2022-07-25 14:03:48 +00:00
Filip Tehlar
9196ed798a misc: update config script in IKEv2 test
Type: fix

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Iba82f8e0f18f3e1e4da57f4c23ba9272e87afd93
2022-05-18 09:46:33 +00:00
Klement Sekera
d9b0c6fbf7 tests: replace pycodestyle with black
Drop pycodestyle for code style checking in favor of black. Black is
much faster, stable PEP8 compliant code style checker offering also
automatic formatting. It aims to be very stable and produce smallest
diffs. It's used by many small and big projects.

Running checkstyle with black takes a few seconds with a terse output.
Thus, test-checkstyle-diff is no longer necessary.

Expand scope of checkstyle to all python files in the repo, replacing
test-checkstyle with checkstyle-python.

Also, fixstyle-python is now available for automatic style formatting.

Note: python virtualenv has been consolidated in test/Makefile,
test/requirements*.txt which will eventually be moved to a central
location.  This is required to simply the automated generation of
docker executor images in the CI.

Type: improvement
Change-Id: I022a326603485f58585e879ac0f697fceefbc9c8
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-05-10 18:52:08 +00:00
Daniel Béreš
c69655e3bd libmemif: timer causes spin at 100% cpu
In case of timer is set and expires:
1. timer_fd is readable and stay readable.
2. timer_fd is part of epoll_fd set. This makes epoll_pwait()
   calls return immediately instead of sleeping.

Type: fix

Signed-off-by: Daniel Béreš <dberes@cisco.com>
Change-Id: I9b228464fe45b83def9b182c885d6febf428049c
2022-04-26 15:46:00 +00:00
Florin Coras
66d6146ad5 rpm-packaging: remove mbedtls dependency
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Idf325b7f1ce75e973dbea4d5836609590c85dc38
2022-04-18 16:22:15 +00:00
Laszlo Kiraly
bf91b48cbb build: opensuse: remove nasm, change to clang
Type: make

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
Change-Id: I3951be5be95a7fb76f54c4ce0daab0748cb8419c
2022-04-08 16:16:19 +00:00
Jakub Grajciar
e74c04fc9f libmemif: refactor examples
- icmp_responder: responds to ICMPv4 and ARP requests
- loopback: connects two interfaces and sends a
  verification packet from master memif to slave memif
  where it is looped back
- loopback (reverse path): reverses direction of packet
  in loopback application (slave memif to master memif)

Type: refactor

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie90aaa3367269408efb6c5d538ad5aa827432238
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2022-03-28 22:34:33 +00:00