743 Commits

Author SHA1 Message Date
Christian Svensson
79687d92fe misc: define SElinux mapped file permissions
SElinux added support for defining what files can be mmap()'d a while back.
This change defines those files that VPP maps.

This is needed for EL9 support

Type: fix

Signed-off-by: Christian Svensson <blue@cmd.nu>
Change-Id: Iedd26914e29347169c4cc138628df7823ddd5691
2023-03-06 14:22:36 +00:00
Christian Svensson
184a70a58c build: add Rocky Linux 9 support
Currently only RHEL/CentOS 8 and Fedora are supported.
EL9 is a middle ground and thus require some different dependencies.

Type: feature

Signed-off-by: Christian Svensson <blue@cmd.nu>
Change-Id: I7be79e61994800bb796d4e9141f0ff6ad8bdead2
2023-03-06 14:22:36 +00:00
Filip Tehlar
ec5c40b83a hs-test: add support for running vpp in gdb
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I6e03b88ca013cafd73f424ea63f706f105bebe6b
2023-03-02 17:34:24 +00:00
Gabriel Oginski
2da99e5072 vpp-swan: fix memory leaks
This patch fix the memory leaks discovered in the current
implementation, inlcuding expired data, spd dump, and host names.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I3794f5db3c58d1e78df25f242c91e7a67363de53
2023-03-02 13:23:24 +00:00
Nobuhiro MIKI
d346f393fd docs: fixed to use unified "pcap trace" command
Type: docs
Fixes: 33909777c637 ("misc: unify pcap rx / tx / drop trace")
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Change-Id: I049616cfad300658e62e5026c0655ee6f07a2421
2023-03-01 19:36:39 +00:00
Maros Ondrejicka
56bfc63b28 hs-test: update hs-test documentation
Type: docs
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I123898923afa382ff0d4410652f4a17a8740d711
2023-03-01 16:51:02 +00:00
Maros Ondrejicka
b5c731738f hs-test: fix error check
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I445f5357817fceeb9b5ead01c3530edaae45189a
2023-03-01 16:49:39 +00:00
Fan Zhang
ad215f211d vpp-swan: improve Makefile
Type: improvement

Since VPP-SWAN does not really need StrongSwan to be compiled,
this patch refines the Makefile to reflect the change.

In addition README is updated.

Signed-off-by: Fan Zhang <fanzhang.oss@gmail.com>
Change-Id: I185957167ac71a44f4d12e78e1dac31c194f80f4
2023-03-01 15:54:40 +00:00
Florin Coras
e2415f79f7 hs-test: fix wait for app after ldp change
After gerrit 38370 (729b9c94), apps are registered via ldp using program
name. Update tests to support that.

Also add make file help for UNCONFIGURE.

Type: test

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I4ad50abfd175664b47b358df1a72e0758f51190d
2023-03-01 00:12:01 +00:00
Maros Ondrejicka
85396a5488 hs-test: fill configuration files at runtime
Treat certain configuration files, which contain runtime-dependent
information, as templates. The information is filled at runtime and the
files are copied into containers.
This allows to avoid hard-coding IP addresses into configuration files.

Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I1dae8f15f4f76c0bf1779d7c68b7f3859bf5a861
2023-02-28 22:13:21 +00:00
Maros Ondrejicka
7e1d6efb58 hs-test: allow nginx suite to unconfigure topology
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I84209e6d2c914d1c7b9dec7efc3898b75552db1b
2023-02-28 19:52:44 +01:00
Maros Ondrejicka
c2f76f4590 hs-test: test vpp+nginx mirroring with tap ifaces
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I05bbed8fd9d40929f040574044aed5292a475e91
2023-02-28 18:27:17 +00:00
Maros Ondrejicka
af004ddad1 hs-test: add option to unconfigure topology
Adding `UNCONFIGURE=true` argument when running `make test` will skip
test run and unconfigure existing topology for that test.

Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I197747a56ca68807f0b2c3f25b6f61c3dcc41ace
2023-02-28 16:36:41 +00:00
Maros Ondrejicka
40cba405c5 hs-test: refactor netconfig
This joins separate representations of veth and tap interfaces
into a single struct. It removes the need for type interface
and embedding which simplifies the code.

Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I1b2c368bfe90a5bdfaaa9a5129c27d7d96f8fe3b
2023-02-27 17:26:41 +00:00
Gabriel Oginski
9cb3e15c9f vpp-swan: fix segmentation fault in arp function
This patch adds a missing file descriptor free handler to prevent
invalid dereferencing in the future

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Idc809a70b1fedec9a06446344d5481d467c78c19
2023-02-27 13:40:05 +00:00
Maros Ondrejicka
a2d5262afb hs-test: store logs
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I50ad5d8c2e5066d8d24f7959aeb534a2f0a6fae0
2023-02-24 18:56:56 +01:00
Maros Ondrejicka
ad406077af hs-test: modify nginx tests
This will make name of the test unique so that executing specifically
this test won't execute also other tests starting with same name.

Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I8013aa453c2a1c3c156e6476a93fd58bbb850b93
2023-02-24 17:17:09 +00:00
Filip Tehlar
671cf51d6d hs-test: improve test infra
- add support for building/running debug/release images
- have one point of control (Makefile)
- list all test cases

Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: I97949abc2fff85d7a2b3784122be159aeec72b52
2023-02-24 14:38:15 +01:00
Dave Wallace
67dbc4aa80 hs-test: fix install/build on new ubuntu instance
Type: test

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I9c59d98d16e387925057626ba9080210f4334c53
2023-02-22 16:12:37 -05:00
Maros Ondrejicka
300f70d3a3 hs-test: clean-up ip address generation
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I74c505920d1363d0ff2b3213fd831c181b70a173
2023-02-21 18:40:49 +00:00
Maros Ondrejicka
2ddb2fdaaf hs-test: check for missing output in nginx tests
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I08cd492fff4b9d50a1761a29c2b231cc8544313b
2023-02-16 16:26:42 +00:00
Maros Ondrejicka
7d7ab1008a hs-test: clean-up obsolete code
Type: test
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
Change-Id: I52cd825f903e41c35f6c4a9db71f00dbedbb8680
2023-02-14 12:56:49 +01:00
Gabriel Oginski
8de66c090e vpp-swan: removed adding the same rule in SPD
The current implementation of vpp-swan plugin adds the same policy rule
in SPD twice, and it is not necessary to have two the same rules in
inbound-protect database.

This patch fixes an issue that prevents the addition of a second
identical policy rule in SPD.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: Ieef74288e5301455658e4e101433147d6d2482e9
2023-02-14 01:20:34 +00:00
Maros Ondrejicka
7550dd268f hs-test: refactor test cases from no-topo suite
This converts remaining tests to configation of VPP from test context.

Type: test
Change-Id: I386714f6b290e03d1757c2a033a25fae0340f5d6
Signed-off-by: Maros Ondrejicka <mondreji@cisco.com>
2023-02-10 05:23:32 +00:00
Maros Ondrejicka
2908f8cf07 hs-test: refactor test cases from ns suite
This converts more tests to configure VPP from test context.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: Idf26b0c16f87e87c97b198412af39b99d947ced6
2023-02-10 05:23:19 +00:00
Maros Ondrejicka
ffa3f60290 hs-test: configure VPP from test context
Instead of configuring VPP instances running inside of a container,
now the configuration is going to be done from within the test context
by using binary API and shared volume that exposes api socket.

This converts just some of the test cases, rest is to follow.

Type: test
Signed-off-by: Maros Ondrejicka <maros.ondrejicka@pantheon.tech>
Change-Id: I87e4ab15de488f0eebb01ff514596265fc2a787f
2023-02-09 17:02:43 +00:00
Ting Xu
656a550f1f 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
2023-02-07 15:15:07 +00:00
Filip Tehlar
8df3de4882 hs-test: add nginx perf tests
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: Ic609cf70c1d381afa78f393700359434c8bd0452
2023-02-06 22:29:28 +00:00
Atzm Watanabe
fc2d95d115 vpp-swan: allow SAs to be used to the route-based IPsec
This patch adds a "charon.plugins.kernel-vpp.use_tunnel_mode_sa"
key into strongswan.conf.  If this is turned off, SAs will be
installed without tunnel information and can be used to
"ipsec tunnel protect".  For the route-based IPsec, it will be
used with turning "policies" off in swanctl.conf.

Type: feature

Signed-off-by: Atzm Watanabe <atzmism@gmail.com>
Change-Id: I58fb94bfe56627fa7002d9b95c48930a32993d2d
2023-02-03 14:24:51 +00:00
Yulong Pei
a3f1b4c719 af_xdp: update custom XDP program example
Update custom XDP program example to work with libbpf 0.8.0 and
libxdp 1.2.9.

Type: fix

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Change-Id: Ib8d03f0be7f71fe996dfb7da0cfe35165711ebb0
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2023-02-02 12:51:45 +00:00
Ting Xu
02bdd3f5cb 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
2023-02-02 09:30:24 +00:00
Filip Tehlar
5616041aed hs-test: handle error in config serialization
Type: test

Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: If5bbf390df08acd1f67d31428b763f246dbcedf2
2023-01-25 13:56:38 +01: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