samplevnf.git
3 years agoReporting test details for all tests 77/71677/1 stable/jerma opnfv-10.0.0
Luc Provoost [Tue, 8 Dec 2020 20:53:41 +0000 (21:53 +0100)]
Reporting test details for all tests

Test details were only implemented in rapid_flowsizetest.py. When
executing other tests, an error occured. That is now fixed, although in
some cases, None is returned.
The format.yaml files defines now alsowhat will be reported in the
Xtesting details.

Change-Id: I5feae62dcf228664b24451d3fc5dfaaadf7edb5e
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoFinal documentation update for Jerma release 11/71611/1
Luc Provoost [Thu, 3 Dec 2020 18:48:12 +0000 (19:48 +0100)]
Final documentation update for Jerma release

Final changes to the documentation

Change-Id: Ibefd33feb15efb692b445dd6a025ec3854d2ed5a
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoMore documentation updates 03/71603/1
Luc Provoost [Wed, 2 Dec 2020 11:33:58 +0000 (12:33 +0100)]
More documentation updates

Added 04-running_the_test.rst describing how to change the default test.
This section is describing the parameters the parameters you can use and
how to change the Dockerfile and the testcases.yaml file.

Change-Id: Ieaa173ebc61dd320659ca6be3d2ce31684298d42
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoAdditional documentation fixes 70/71570/1
Luc Provoost [Mon, 30 Nov 2020 17:10:13 +0000 (18:10 +0100)]
Additional documentation fixes

Fixed some errors causing an invalid rst format.

Change-Id: Ide739a48abbd32b5c88b017a74ad7afc406c2c34
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSampleVNF Jerma documentation update 62/71562/1
Luc Provoost [Mon, 30 Nov 2020 14:36:18 +0000 (15:36 +0100)]
SampleVNF Jerma documentation update

Some more documentation updates for the Jerma release.

Change-Id: I0626ae2ac18dd858f6d1e5fa341371aca6ec639d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoJerma documentation rewrite 74/71474/1
Luc Provoost [Mon, 23 Nov 2020 17:24:10 +0000 (18:24 +0100)]
Jerma documentation rewrite

First step in a rewrite of the sampleVNF documentation whcih is now
focused on the TST009 testing using PROX and rapid.

Change-Id: Id95cd44831ae7db518ccdf1d8da55890197d2fcb
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoChanging the committers for the sampleVNF project 17/71417/1
Luc Provoost [Thu, 19 Nov 2020 08:56:08 +0000 (09:56 +0100)]
Changing the committers for the sampleVNF project

Per TSC decision as documented in
https://wiki.opnfv.org/display/meetings/OPNFV+TSC+Meeting+2020-09-29,
changing the INFO file with committer info for sampleVNF project. The
project is now focusing only on the rapid-PROX based dataplane
benchmarking using TST009 spec.

Change-Id: I61a6f69b84af9e1e30e071771a1d2e36b833cf84
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSupport for xtesting 02/71402/5
Luc Provoost [Mon, 16 Nov 2020 12:43:14 +0000 (13:43 +0100)]
Support for xtesting

Some files were added to for rapid testing in the xtesting framework

Change-Id: Id912789c5007ca8390a67fb5b359296089aa9618
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoFix for latency reporting and log file handler 90/71390/1
Luc Provoost [Fri, 13 Nov 2020 15:06:46 +0000 (16:06 +0100)]
Fix for latency reporting and log file handler

The latency histogram dat did not contain samples collected during the
first measurement of each step. The maximum latency did take the first
step into account. As a result, you  might see a test run with a maximum
latency not showing up in the latency histogram data. This has been
fixed by also including the data from the first measurement in the
histogram data. In some cases, we also reported the wrong speed from the
last unsuccessful step. This is now fixed and we do report the speed
from the last successful step.
In rapid_log.py, a fix was added to execute the rollover on the file
handler of the log file in all cases. In some cases, the file handler
with index 0 was not the file handler of the log file.

Change-Id: I6c2b16c21dd0ee17d1d14e46c4c544e185324256
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoFix potential crash in parsing unusual commands 34/71334/2
Xavier Simonart [Fri, 30 Oct 2020 15:46:31 +0000 (16:46 +0100)]
Fix potential crash in parsing unusual commands

'reset values all' and 'reset randoms all' commands were
potentially causing some crash. This has been fixed.

Change-Id: Idc2c4f7c90db73e7fdf9e8ef76b00ba956a0d854
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix setting imx pkt sizes through config files 45/71345/1
Xavier Simonart [Thu, 5 Nov 2020 11:31:45 +0000 (12:31 +0100)]
Fix setting imx pkt sizes through config files

Change-Id: I0e5098747cc496da8632e8d6f779e418da03dc4a
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoDocumentation for Jerma release 66/71266/1
Luc Provoost [Mon, 19 Oct 2020 09:47:50 +0000 (11:47 +0200)]
Documentation for Jerma release

JIRA: SAMPLEVNF-161

Adding Release notes and pointers to the documentation in the wiki

Change-Id: Ifce28b844ae336b5a54479b614b3959193acc42d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSupport dataplane subnet mask & latency histogram 93/71193/3
Luc Provoost [Wed, 30 Sep 2020 14:57:30 +0000 (16:57 +0200)]
Support dataplane subnet mask & latency histogram

There is a new parameter in the config_file: dataplane_subnet_mask. This
parameter is added to the dataplane IP addresses and is needed by the
Linux stack to deal with some protocols (e.g. ARP). If not present, the
default value of 24 will be used. In the end, this will make sure that
IP addresses in the rapid.env file will have this mask, e.g. /24
If you use other tools than createrapid.py to create the rapid.env file,
make sure to add the mask.
This commit also introduces a change when exiting: we only copy the
prox.log files from the different prox instances in case we expect a new
prox.log file to be created in these instances.
When using a valid format.yaml file, the tool will now also send the
latency distribution data (histogram) to the URL.
The tool is now also checking the value of bucket_size_exp: it needs to
be 11 or more.

Change-Id: I633cdc64ef687fdb6625be1e7482a5a371f83e93
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoReport failure when tap port is not mapped to real dpdk port. 66/71166/3
Xavier Simonart [Tue, 22 Sep 2020 10:42:06 +0000 (12:42 +0200)]
Report failure when tap port is not mapped to real dpdk port.

When using "vdev=" in port section, a tap device and an additional dpdk
port are created. In most cases, we still want to use a real DPDK device
(i.e. bound to an interface such as virtio or a PF or a VF).
PROX will now report by default an error when the used [port] is not a
DPDK bound device.
An additional parameter "virtual=yes" can be added in the port section
in case one want to disable this error checking (e.g. specify additional
parameter for the vdev device).
This patch also fixes a potential endianess issue when configuring IP
addresses.

Change-Id: Iffdd9552308be3b77cfe2067630647acac2c01fe
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoNew PROX version, background traffic reporting 82/71182/3
Luc Provoost [Wed, 23 Sep 2020 12:45:23 +0000 (14:45 +0200)]
New PROX version, background traffic reporting

deploycentostools.sh is now installing a recent PROX version. When using
background traffic, the tool is also reporting the total traffic that
was handled by the NFVi stack, including foreground & background
traffic.
The use of the prox_socket and prox_launch_exit was also broken in a
previous release and is now fixed.
When setting prox_socket to false for a PROX instance, we will not
create a socket connection to control that PROX instance. Setting this
option to false is not meaningful for the generator PROX instances since
we would not be able to control the behavior of the PROX generator
during the test. You could use the generator against another non-PROX
instance and then set prox_socket to false for that non-PROX instance.
Default is true.
prox_launch_exit is used to start and stop the PROX program inside the
instance. Default is true. This is useful in case you want to start PROX
manually to be able to inspect the PROX UI, but at the same time, let
the rapid scripts control the testing.

Change-Id: Ib5aa809f4be201859542769f5f55f4989dad97ef
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoAdd git version. 20/71120/3
Xavier Simonart [Mon, 14 Sep 2020 07:25:05 +0000 (09:25 +0200)]
Add git version.

git version is now printed in prox.log file.
- git_version.c is always recompiled
- If source have been locally changed, the build is shown as dirty
- If git is not available on the build system, a message such as
'make: git: Command not found'
will be printed, but the build will succeed.

Change-Id: If551832c6079f5e3bd04cd4d8ac5f8204e6be8cd
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for multiple vlans in ipv4 vdev mode 30/70530/2
Xavier Simonart [Fri, 10 Jul 2020 10:59:40 +0000 (12:59 +0200)]
Added support for multiple vlans in ipv4 vdev mode

When the following conditions are met:
- ipv4
- vdev enabled
Then multiple vlans are supported.
Multiple vlans can be configured using the vlan_tag option within the port section of the config file.
Multiple (different) local_ipv4/prefix must then also be configured within the same section.

Note that for ipv6 multiple vlans are not supported (yet)
Also, when vdev is not enabled, multiple vlans are also not (yet) supported.

Change-Id: I38b6cd98ff2a0f484d1bf0910b15413ba21ae6d6
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoImprove performance in IPv6 generator 29/70529/2
Xavier Simonart [Sat, 11 Jul 2020 13:54:49 +0000 (15:54 +0200)]
Improve performance in IPv6 generator

Change-Id: I3abc92652402162d15249e345446debdeb778176
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for VLAN in IPv6 28/70528/2
Xavier Simonart [Sat, 11 Jul 2020 13:51:47 +0000 (15:51 +0200)]
Added support for VLAN in IPv6

Change-Id: Ib1b3d54f9cb8e4284eee7ed0998e96370762a17e
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for gateway ipv6 & cmd for sending unsollicited neighbor advertisement 51/70251/5
Xavier Simonart [Mon, 1 Jun 2020 18:52:57 +0000 (20:52 +0200)]
Added support for gateway ipv6 & cmd for sending unsollicited neighbor advertisement

Change-Id: Iae35d3fa19ad7cf90d8c2e0c104b0e798ac34787
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for reporting packet (mis)order. 27/70527/3
Xavier Simonart [Thu, 2 Jul 2020 08:02:40 +0000 (10:02 +0200)]
Added support for reporting packet (mis)order.

The "Latency" screen has been updated with 3 columns:
- mis-ordered
  Count the number of mis-ordered packets.
- extent:
  Gives an indication of how mis-ordered the packets are.
  Receiving packet "x - 5" after receiving packet "x" will
  cause an extent of 5.
- duplicate:
  Count number of duplicate packets.

Following commands have been added for the impair mode:
- proba no drop: replaces the former "probability" command.
  Percentage of forwarded packets. So 99.5 means 0.5% of packet drop.
- proba delay
  Percentage of delayed packets for the impair mode.
- proba duplicate
  Percentage of duplicate packets.

Similar parameters are supported within the config files:
- proba no drop
- proba delay
- proba duplicate

Note: it is recommanded to use the signature when measuring packet
misorder, as otherwise unexpected packet would cause miscounts.

Change-Id: I037f606f264d6e2bd7f123df5ed57ab7df8386d7
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoUsing python concurrent futures 56/71156/1
Luc Provoost [Thu, 17 Sep 2020 15:17:36 +0000 (17:17 +0200)]
Using python concurrent futures

Different PROX instances are now started in parallel. The script is
starting multiple threads.

Change-Id: Ia8785a792240d4e9b5d5d98174bc4c5d7ae5657c
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoramp generator traffic & prox.log copy 34/71134/1
Luc Provoost [Wed, 16 Sep 2020 07:52:06 +0000 (09:52 +0200)]
ramp generator traffic & prox.log copy

A new parameter can be put in the *.test files so that the requested
traffic is not generated at once, but slowly increasing up to the
requested traffic. This is important for some SW switched that adapt and
learn from the applied traffic. When suddenly applying a high traffic,
the switch might not have enough time to learn and lose packets. Only
after a period of time (up to 10 seconds?), the switch can cope with the
traffic without packet loss. In order to get reproducible results in
this case with low packet loss, please put the parameter ramp_step in
the test section of the *.test file. The step is expressed in percentage
of a 10Gb/s traffic. If the parameter is not present, the load will be
immediately applied.
When the runrapid.py script is now finished, it also copies the prox.log
files from all the prox instances. In case of issues, please investigate
this log file.
When using background traffic, the tool will also print the average
background traffic for each step in the DEBUG log. In this way, you can
check that the background traffic is actually dealing with the same
amount of traffic as the foreground. The tool is printing the packet
reception rate of the background generators.
A bug was also fixed regarding the latency percentile reporting. When
using tests involving l2gen.cfg, the values of the percentile latency
were wrong.

Change-Id: Id3dd02ed5cab084414c717cf898b30e6980ddf31
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agodeploycentostools.sh to use latest PROX 10/71010/1
Luc Provoost [Mon, 7 Sep 2020 14:57:26 +0000 (16:57 +0200)]
deploycentostools.sh to use latest PROX

Rapid scripts are communicating to the PROX instances. Rapid scripts
will not work with every PROX version sice sometime we change the
interface between the scripts and PROX. Hence we have a commit ID in
deploycentostools.sh to make sure we have a version of PROX that we can
work with. This change will now ensure we have a recent PROX version
when we use deploycentostools.sh to build an image.

Change-Id: Ia634f61a2dc8f49188cec6697ebf5f980d35ce7d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoAllow latency thresholds for TST009 testing 36/70836/1
Luc Provoost [Thu, 20 Aug 2020 16:03:11 +0000 (18:03 +0200)]
Allow latency thresholds for TST009 testing

Even if the latency thresholds were defined in the TST009 test files,
the values were ignored and replaced by 'inf', whcih means the
thresholds were not taken into account to define a successful step. If
the thresholds are not defined in the test files, they are still set to
'inf'.

Change-Id: I9559f05fb6066ab8759900abe3eb53ff4662e510
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoAdd all_rx_queues port flag to use all rx queues 18/70818/3
Luc Provoost [Mon, 17 Aug 2020 12:53:11 +0000 (14:53 +0200)]
Add all_rx_queues port flag to use all rx queues

In the port section of the PROX configuration file, a new parameter can
be added: all_rx_queues. The default is all_rx_queues=no.

When the rx port variable of a task is listing a port name, all rx
queues will be used when the all_rx_queues is set for that port.
If not set, only one queue of that port will be "consumed", each time
the port is referenced in the rx port variable.
When the all_rx_queues is set for a port, you should NOT reference that
port more than once in the rx port variables.

Change-Id: If9662b1ac07adeec9db88d2a25ca68aed0b9e213
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSetting mq_mode for virtio to ETH_MQ_RX_NONE 17/70817/3
Luc Provoost [Mon, 17 Aug 2020 12:12:28 +0000 (14:12 +0200)]
Setting mq_mode for virtio to ETH_MQ_RX_NONE

As described in https://patches.dpdk.org/patch/60354/, we cannot set
mq_mode for a vertio device to ETH_MQ_RX_RSS. Therefore adding this
extra test before setting mq_mode.

Change-Id: I8a33cf73afaa2cef8b9b012bf8ebe7296e1e692d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSupport DPDK 19.11 rc0 85/70685/1
Luc Provoost [Fri, 7 Aug 2020 08:55:32 +0000 (10:55 +0200)]
Support DPDK 19.11 rc0

Change-Id: I7ac1bb78fe00407ff66945fcdf7b5d54c9025214
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agofix: IPV6 packet generation, packet loss reporting 83/70683/1
Luc Provoost [Thu, 6 Aug 2020 12:11:05 +0000 (14:11 +0200)]
fix: IPV6 packet generation, packet loss reporting

UDP and IP packet length and source UDP port and destination UDP port
were wrongly set for IPv6 packets.
In the *.test files, there is now an optional boolean field (ipv6) in
the [TestParameters] section. When set to true, the generator will use
the IPv6 packet layout to place the right values at the proper offset
in the packet. If not present or set to false, the IPv4 layout will be
used. Note also that packet size needs to be at least 84 bytes for IPV6
traffic since we need space for latency and other information in each
packet.
Packet loss ratio is now printed as a percentage of the total packets
sent.

Change-Id: I2136e87f3032348ae95b69052be7da8461c6303c
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoImproved IRQ measurements and pushing results 48/70548/5
Luc Provoost [Wed, 15 Jul 2020 11:51:02 +0000 (13:51 +0200)]
Improved IRQ measurements and pushing results

The IRQ test has been reworked to increase the accuracy of the IRQ
measurements. Results can now also be pushed to a Prometheus push
gateway or to OPNFV's Xtesting. In order to do so, a new file
format.yaml has been introduced. Please use this file now to specify the
details of the PushGateway or the Xtesting server.
Added new test: increment_till_fail.test

Change-Id: I111aae3e099bc03e3d2ddd1014a0301bac356e0b
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoFix execution in the Kubernetes environment 84/70584/1
Yury Kylulin [Fri, 24 Jul 2020 16:13:57 +0000 (16:13 +0000)]
Fix execution in the Kubernetes environment

Due to the recent changes in the rapid scripts, Kubernetes environment need to be adjusted.

Ready for test flag file for the runrapid script created during the container start.
TUN device configuration added.

Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Change-Id: I097aafbd1d1d102aa61b8b86842afcb2d6a51338

3 years agoFix gateway l3 wrongly inserting VLANs 22/70522/2
Xavier Simonart [Fri, 10 Jul 2020 11:09:23 +0000 (13:09 +0200)]
Fix gateway l3 wrongly inserting VLANs

Change-Id: I187ed4f282c6332a7e906bc03b51d26295a475ac
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFixed compilation issue on dpdk 19.08 (and more recent) 24/70524/1
Xavier Simonart [Fri, 10 Jul 2020 14:27:06 +0000 (16:27 +0200)]
Fixed compilation issue on dpdk 19.08 (and more recent)

Change-Id: Iae0a0d95b5a216463ec7511337be4019fdd4359f
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix minor compilation issue on recent gcc compilers 83/70483/1
Xavier Simonart [Thu, 2 Jul 2020 08:05:49 +0000 (10:05 +0200)]
Fix minor compilation issue on recent gcc compilers

Change-Id: I7eeaaa3a0dfa1c0a831863e772b50697c5ff5054
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdding vdev support and vfio 48/70348/2
Luc Provoost [Mon, 15 Jun 2020 10:02:46 +0000 (12:02 +0200)]
Adding vdev support and vfio

Using vfio in stead of igb_uio. DPDK 2020.5 is NOT compiling the igb_uio
driver by default any more.
For the l3 mode, we are now using the new PROX vdev feature. This is
achieved by adding the vdev parameter in the port section of the PROX
config files. One of the advantages is that we can now ping a port
managed by PROX: the requests will be forwarded by PROX to the LINUX
stack, who will reply to the ping. A tap device is being created by PROX
to support this feature.
Installing old version of nasm since latest causes some issues.
If not pushgateway is being used, it should be commented out in the
config_file.
vfio is now loaded by specifying the module in /etc/modules-load.d
There is also an after_boot.sh script that will be run by
check_prox_system_setup.sh, which can be used for further configuration
of the instance after boot.
There is now also a file created /opt/rapid/system_ready_for_rapid by
the check_prox_system_setup.sh script. This file is created once all
configuration is done. The runrapid.py script will wait till this file
is created before executing any tests.

Change-Id: Ic5c41af82642066af42134c3323297f5a06f6f72
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoClean up for the test pods 83/70283/1
Yury Kylulin [Fri, 5 Jun 2020 16:05:28 +0000 (16:05 +0000)]
Clean up for the test pods

Option for Kubernetes environment clean up (createrapidk8s.py -c) from the test pods added.

Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Change-Id: I1c6c7090462b55fbadd1d8f1a277470a6eeb2dee

3 years agoFix for containers to use /opt/rapid 62/70262/1
Yury Kylulin [Wed, 3 Jun 2020 14:04:25 +0000 (14:04 +0000)]
Fix for containers to use /opt/rapid

Fix scripts and build procedure to use /opt/rapid as a main directory for
binaries and config files.

Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Change-Id: Icb38c37a85a78a6f2de2e751df5fafd624b4f1b3

3 years agoUsing /opt/rapid to run prox 54/70254/2
Luc Provoost [Tue, 2 Jun 2020 14:02:17 +0000 (16:02 +0200)]
Using /opt/rapid to run prox

All config files are now copied into /opt/rapid. We are not using the
home directory any more. The prox executable is now also copied into the
same /opt/rapid.

Change-Id: I838636167f370bf8a855a3cfb0796c659e27a3ad
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoFixing some more copyright dates 36/70236/2
Luc Provoost [Fri, 29 May 2020 11:47:03 +0000 (13:47 +0200)]
Fixing some more copyright dates

New files created in 2020 have now the right date in the copyright
notice.

Change-Id: I8eb244beec3d793e819cce1f63c39671f18286a1
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoUpdated PROX version to 20.05 to reflect support of DPDK 20.05 39/70239/1
Xavier Simonart [Fri, 29 May 2020 22:17:29 +0000 (00:17 +0200)]
Updated PROX version to 20.05 to reflect support of DPDK 20.05

Change-Id: Iad6882cc28ac2039984b12f6b7a897b81d975d9b
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix compilation issues on old DPDK 38/70238/2
Xavier Simonart [Fri, 29 May 2020 21:15:04 +0000 (23:15 +0200)]
Fix compilation issues on old DPDK

Also fixed minor issues such as
- prevent using vdev on DPDK <= 17.05 as not supported
- potential segmentation fault after panic (if panic thrown early
  in prox initialization)

Change-Id: I49a1962e95a4a44dddadd1fdd906e1b3b232465c
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoVLAN support with vdev devices + few other changes 34/70234/3
Xavier Simonart [Thu, 28 May 2020 22:06:45 +0000 (00:06 +0200)]
VLAN support with vdev devices + few other changes

- vdev devices now support VLAN.
- kernel tap device can be configured with a netmask (/24 was
  always used in previous version).
- when sending a (fake) packet to the kernel, this packet will now
  not be routed by the kernel (i.e. it will leave through the
  interface configured by PROX). This might change in the futture
  when PROX supports multiple VLANs per port. But today it prevents
  ARP being sent on management interfaces.
- Log error in case kernel unable to send packet.
- Added support for comments (';') in lua sections.
- Prevent duplication of local_ipv4 - should now be configured in port section
  local_ipv4 in core section still supported

Change-Id: I8f9a40fe6ad6f3013ff91b58b44627c7f34081e6
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdd support for latency measurement for IMIX packets 23/70223/2
Xavier Simonart [Wed, 27 May 2020 13:17:52 +0000 (15:17 +0200)]
Add support for latency measurement for IMIX packets

Before this patch latency measurements were only
supported if signature was disabled.

Change-Id: I565b00f76818ab42e9cca4ddc32f9d857648929d
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix Idle count 17/70217/2
Xavier Simonart [Tue, 26 May 2020 09:56:41 +0000 (11:56 +0200)]
Fix Idle count

Change-Id: Idd72b593504139ac9d42c33767f8a18395b2cc87
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix source mac address when applying imix 16/70216/2
Xavier Simonart [Tue, 26 May 2020 09:46:41 +0000 (11:46 +0200)]
Fix source mac address when applying imix

Change-Id: I8cbbe1b08af9b5472c304f2fba3635f0a084fdd8
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix potential core dump when closing ports at exit 15/70215/2
Xavier Simonart [Tue, 26 May 2020 09:20:22 +0000 (11:20 +0200)]
Fix potential core dump when closing ports at exit

Change-Id: I45ea9741be1c552d8f13a7de027994c23995df69
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded initial support for NDP (IPv6) 59/69859/8
Xavier Simonart [Mon, 11 May 2020 19:00:33 +0000 (21:00 +0200)]
Added initial support for NDP (IPv6)

Following messages are now handled by PROX
- router_solicitation
- neighbour_solicitation
- router_advertisement
- neighbour_advertisement

The following parameters are supported (through the PROX config file)
- sub mode=ndp
This will enable handling of router and neighbour solicitation
and advertisement.
- local ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx
This will configure the local IPv6 address of the port.
This parameter is optional. If not specified, the local IPv6
will be calculated from the EUI.
- global ipv6=xxxx:xxxx:xxxxx:xxxx:xxxx:xxxx:xxxx:xxxx
This will configure the global IPv6 address of the port.
This parameter is optional. If not specified, the global IPv6
will be calculated from the EUI and the router prefix received
from the router.
- ipv6 router=yes
This will cause the core to behave as an IPv6 router
i.e. it will generate Router Advertisement messages
This is only useful in back to back cases, when no real
IPv6 router is present in the setup.
- router prefix=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
The router prefix usedin the router advertisement
The prefix will be used by the node to build an IPv6 global
address in cases none were configured.

"Unsollicited NA" parameter has been added within the core/task section.
If set to yes (Unsollicited NA=yes), then an unsollicited neighbour
Advertisement is sent at startup

A same core/task cannot support both l3 and ndp mode.

Those messages will be generated or handled when submode
is set to "ndp":
- neighbour sollicitation
- neighbour advertisement
- router sollicitation
- router advertisement

An example configuration is provided: config/ipv6.cfg in which
port 0 / core 1 plays the role of the generator and port 1 /
core 2 plays the role of the swap.

Change-Id: Id0ab32d384448b4cf767fb4a1c486fc023f4f395
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for IMIX through config and command line 88/69488/5
Xavier Simonart [Fri, 3 Jan 2020 02:09:19 +0000 (03:09 +0100)]
Added support for IMIX through config and command line

In Prox configuration IMIX can be specified using the following syntax:
imix=pkt_size,pkt_size... Up to 127 different pkt sizes can be specified.

Through command line, the following syntax can be used
imix core_id task_id pkt_size,pkt_size... Up to 127 packet sizes can be specified.

When IMIX is enabled, PROX will loop through the list of packet sizes.

PROX supports two different submodes to handle pcap files.
In the 1st submode (default, no submode specified), timestamps from
the pcap file are ignored. In this submode IMIX is supported as well and each
packets in the pcap file will be generated with all IMIX sizes.

In the second submode, called pcap in gen mode, packets are generated at
the timestamp specified in the pcap file. This submode does not support IMIX.

Change-Id: I53cbf1378a5364254285b81e6848350d98561184
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for secondary process & virtual devices 40/69840/3
Xavier Simonart [Mon, 23 Mar 2020 23:31:13 +0000 (00:31 +0100)]
Added support for secondary process & virtual devices

A virtual device can be created adding the following option on the eal field within
the eal options section:
--vdev=net_ring0
This will cause a new (virtual) dpdk port to be created.

Such a device can then be used in a primary process as other DPDK devices i.e.
a [port x] section must be defined in the configuration file

For a secondary process, there is no need to add --vdev, but, of course
--proc-type=secondary (or --proc-type=auto) must be set within the eal field.

There are two ways to use such a virtual device in a secondary process
1) Using the DPDK port number. Note however that the DPDK port number of virtual devices
in the secondary process might not start from 0 and might hence have to be guessed
e.g. if using 2 virtual devices in primary process (--vdev=net_ring0 --vdev=net_ring1)
the port_id will be 0 and 1 in primary process and 2 & 3 in secondary process.

2) Using the port name, as defined in --vdev in the primary process. In this way,
no [port] section must be defined, and the virtual port names are directly used within
the "rx port" and "tx port" configuration e.g.:
rx port=net_ring0
tx port=net_ring1

Limitations
===========
There seems to be a PROX leak causing DPDK port id to increase when restarting the
secondary process (causing the secondary process configuration through port id more difficult).

As the primary process configures the port (including the number of rx and tx queues)
based on its config file, the secondary process can't setup its own queues.
Simple configurations (such as using gen or lat in primary, and swap in secondary) work as PROX
allocates a RX queue even in gen mode and a TX queue even in lat mode. Better configuration/support
for secondary process should be designed.

The use of dpdk port names is only supported by PROX within "rx port" and "tx port". It is not
supported by other configuration fields such as "tx ports from routing table".

The use of dpdk port names in "rx port" and "tx port" is limited to only 1 port.

Change-Id: Iaa606625da471403713a21df79d3ded4bb91b91e
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix mbuf leak and stop sending pseudo packet 76/70176/4
Xavier Simonart [Mon, 11 May 2020 09:26:49 +0000 (11:26 +0200)]
Fix mbuf leak and stop sending pseudo packet

In addition to  a mmbuf leak when receiving netlink routes packets
this commit prevents sending the PROX pseudo packet i.e.
the packet PROX sends to the kernel socket to have it generate
an ARP request.

Change-Id: Iabbdecbe412e4b90ac0df7e30fa36d096c5326f0
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded initial VLAN support with vdev devices 75/70175/4
Xavier Simonart [Sun, 10 May 2020 22:20:51 +0000 (00:20 +0200)]
Added initial VLAN support with vdev devices

For kernel supported devices, add for vlan tag support
This can be configured through port parameter:
vlan tag=<vlan tag>
If this parameter is set, a vlan tagged interface is created
on top of the tap device
This is only supported for vdev tap devices

When sending (untagged) packet to the tap device (through socket)
the tap should react in sending tagged packet

Note that receiving in L3 mode (w/o tap support) a tagged packet
is not yet supported.

Change-Id: I363fa2f8d2341ac41ef23620222ece1d944bf336
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoImprove performance in l3 submode 73/70173/3
Xavier Simonart [Sun, 10 May 2020 19:04:08 +0000 (21:04 +0200)]
Improve performance in l3 submode

Two cases where performance has been improved
- When using a gateway from a routing table (l3 submode),
  store the mac within the next hop table, to avoid a hash_lookup.
  This gives ~10% improvement.
- Read tsc only once per bulk (of up to 64 packets).
  This gives ~10% improvement to swap, 4% to gen.

In addition a small fix has been added, preventig "No route" Error
to be written too aften.

Change-Id: I8a7ab74a32f09c8ff47f751ee91e84afee1b2147
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded initial support for BGP 28/70128/5
Xavier Simonart [Sat, 2 May 2020 19:51:24 +0000 (21:51 +0200)]
Added initial support for BGP

Through this commit BGP messages are forwarded to tap device
Netlink messages are enabled to receive route Updates.

In addition, generating tasks can also specify a routing table
which will be used when sending packets

The routes initialized by the routing table can be changed through
the reception of BGP messages

Change-Id: I187ba9a921885cbc9b209aae5fb654309e3388b8
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix ctrlplane handling vdev 38/70038/3
Xavier Simonart [Tue, 28 Apr 2020 23:51:30 +0000 (01:51 +0200)]
Fix ctrlplane handling vdev

Change-Id: I8f570940d2c4e1fc09ebae03105e436f5caebbd3
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoImprove ctrlplane performance 37/70037/4
Xavier Simonart [Tue, 28 Apr 2020 23:22:10 +0000 (01:22 +0200)]
Improve ctrlplane performance

The crlplane performance has been improved. This is necessary when
handling many IP in L3 mode (i.e. many ARP Requests/Replies).

Before this change, arp timer was updated as soon as an
arp request was tentativaly sent to the master. This means that,
if the request failed to be sent (e.g. ring full) we had to wait
arp_update_time (default 1sec) before trying again.

Now arp_update_time is only used when an arp reply is received.
If a request has been successfully sent, then the arp timer
is updated by 1 second (i.e. we will not send any arp reuest for this
IP within this second)
If we failed to send the request, then the timer is updated by 100 msec
which means we will wait 100 msec before trying again.
A too high value here would have meant that we have to wait a long time
before trying again. A too short value overload the master ring with
request to transmit ARP requests, so that master is unable to handle
arp replies.

arp_update_time is now also partly randomized to avoid all IPs to request
arp request at the beginning of the test. So if arp_update_time is 10 sec
then the configuration sets it to 5 to 15 sec.

As a final note the following parameter (already implemented before)
can be changed to improve ctrlplane performance (at the cost of dataplane)

ctrl path polling frequency=10000

Change-Id: I9660458a22e7442eaa0c83aaa0c9893a15069f98
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdded support for netlink 83/69983/6
Xavier Simonart [Fri, 24 Apr 2020 19:52:12 +0000 (21:52 +0200)]
Added support for netlink

Through this commit ARP and ICMP messages are forwarded to the kernel
when vdev tap devices are enabled, as well as PROX l3 mode.
ICMP support has also been added to master (i.e. PROX L3 mode) and to
swap (so when L3 submode is not enabled).

Change-Id: Ie6bf52cbae7171bfca041ff18651d4ec866f44cd
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoAdd support for vdev tap devices 82/69982/5
Xavier Simonart [Mon, 20 Apr 2020 21:25:22 +0000 (23:25 +0200)]
Add support for vdev tap devices

This commit adds support for the creation of tap devices.
To create a tap device, and associate it with a DPDK port,
add within the port section:
vdev=<tap_name>
local ipv4=<ip_assigned_to_port>
<tap_name> will appear as a kernel network device, with an IP <ip_assigned_to_port>

ARP packets received from the network on the DPDK interface will be forwarded to the kernel.
1st packet which needs to be generated to a new IP will cause an IP packet
to be sent to the kernel (using socket sendto) forcing the kernel to send an ARP_REQUEST.

In this commit, there is no notification from the kernel about ARP table changes.
This is subject to further commits.

Two config files, gen_tap.cfg and swap_tap.cfg have been created. They work one against each other.
*** Note however that they do not work if running within the same host
(with the port being connected back to back) ***
This is due to the fact that the kernel would bypass the ports and use local interface...

Change-Id: Iadeec0d99e3c693472ea44bdb9163a3bf97df2fa
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
3 years agoFix for container .env file and small updates 35/70235/1
Luc Provoost [Fri, 29 May 2020 08:22:45 +0000 (10:22 +0200)]
Fix for container .env file and small updates

Since runrapid.py is now supporting more than 1 dataplane interface, we
need to use a port index in the rapid.env file for the dataplane ports.
In k8sdeployment.py, we only support 1 dataplane port, but we are
writing dp_ip1 and dp_mac1 in the environment file. The copyright dates
are also updated. Some references to VM have also been changed to instance.

Change-Id: Ie1d036c13ef5d6f0aa1f35aa068a9760a1cfc2a9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoIPV6 testing & minor changes and fixes 32/70232/1
Luc Provoost [Thu, 28 May 2020 10:57:46 +0000 (12:57 +0200)]
IPV6 testing & minor changes and fixes

IPV6 test has been added. The generator will now generate IPV6 packets
using NDP to resolve MAC addresses. The hex IP addresses in the inline
definition of the packets in the cfg files is now calculated by a lua
function called in parameters.lua. The hard-coded path /home/centos has
been replaced by ~. An error in the speed calculations has been fixed.
See the RapidTest class for details. The actual number of generated
flows is now reported. If the requested number of flows is not a power
of 2, the lowest power of 2 that is larger than the requested number of
flows will be used and reported.

Change-Id: I36b8d345b4a03c2cf358c19ec353ca8ad2831293
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoSupport for imix packet sizes 92/70192/1
Luc Provoost [Fri, 15 May 2020 09:51:56 +0000 (11:51 +0200)]
Support for imix packet sizes

All packet size in the *.test files have been replaces with imix sizes.
imix is now a list of packet sizes. If you want to run with only a
pakcet size of 64, you need to specify a list containing only 1 size:
[64].
You can also specify multiple imix values by specifying a list of list
of sizes. The keyworkds in the test files are now imix & imixs.

Change-Id: Iea47c0266b022133b7bbfc9a6811e3199ae41521
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agocreaterapid.py is now using heat templates yaml 77/70177/2
Luc Provoost [Mon, 11 May 2020 09:06:17 +0000 (05:06 -0400)]
createrapid.py is now using heat templates yaml

yaml files have been added to the repo as an example. Please check the
README explaining the output section reqs for this yaml file. There is
also a new file (config_file): it also specifies which yaml files to
use. multiple dataplane interfaces per VM can now be specified and will
appear in the <STACK>.env file. An error in setting the packet size has
been fixed (see set_udp_packet_size for packet size setting details)

Change-Id: Ie89a4940521dac7dd3652acca477739abb9f5497
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
3 years agoCode rewrite and Python3 support 99/69999/2
Luc Provoost [Mon, 27 Apr 2020 16:32:43 +0000 (12:32 -0400)]
Code rewrite and Python3 support

The code has been rewritten in multiple classes and files for better
readability and maintainability. You should now also use Python3 to run
the scripts. Some of the variables in the config files have moved to
other sections. The pushgateway parameter moved to the [varia] section
of the rapid environment file.

Change-Id: Ic61a1bc3baa39447d42b21dfcc0f16c28fcdfa6e
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoFix configuration of arp_timeout and arp_update_time 36/70036/1
Xavier Simonart [Tue, 28 Apr 2020 23:25:46 +0000 (01:25 +0200)]
Fix configuration of arp_timeout and arp_update_time

Change-Id: I9e90c9bdd4d6e83ce0533fd38e1980dca1841bdb
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix dump packets command 57/69957/2
Xavier Simonart [Thu, 16 Apr 2020 14:09:14 +0000 (16:09 +0200)]
Fix dump packets command

dump packets (e.g. dump 1 0 1) was in some cases dumping more
packets than expected.
Proper count of packets is now dumped.

Change-Id: I0974465d617eda00e77ee87148bf96991ecd3ed7
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoAdded support for DPDK 19.11 58/69858/2
Xavier Simonart [Fri, 31 Jan 2020 17:20:15 +0000 (18:20 +0100)]
Added support for DPDK 19.11

Change-Id: I58fa7a0ab7aaa27e9f9383f7995bb71bf0952618
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoImproved variable init and bug fixes 30/69830/1
Luc Provoost [Mon, 23 Mar 2020 10:53:39 +0000 (06:53 -0400)]
Improved variable init and bug fixes

Variables were initiales based on the file name of the PROX
configuration files. These decisions are now based on the content of
these files and other variables, rather than just the name of a file.
This commit also fixes some bugs: irq test was not executing any more,
some issues with the push gateway reporting.

Change-Id: I39308effad3c80cf52d96e4d85d92d4b5f0be9a5
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoAdd support for kubernetes deployment in rapid scripts. 59/69259/2
Yury Kylulin [Tue, 3 Dec 2019 15:29:00 +0000 (18:29 +0300)]
Add support for kubernetes deployment in rapid scripts.

In case of kubernetes based deployments procedure for test environment
creation is different. Please refer to README.k8s file for more
details.

Dockerfile and dockerimage.sh files can be used to create a docker
image with prox.

There is separate createrapidk8s.py script which is used to create
appropriate number of PODs for testing based on the rapid.pods
configuration.

port_info is a helper application to identify port MAC address.

Change-Id: I73611f066ac54260aa11dd17c173379df06f46a5
Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
4 years agoMerge changes from topic "TST009_benchmark"
Xavier Simonart [Fri, 31 Jan 2020 17:13:30 +0000 (17:13 +0000)]
Merge changes from topic "TST009_benchmark"

* changes:
  New PROX commit ID and bug fix
  code review comments and PROX commit ID
  Code review feedback & back-ground traffic support
  Fix run_iteration when not using the sut_sock
  Specify latency bucket size & correct calculation
  Initial support for percentile latency measurements
  Combine code for fixed rate and variable rate tests
  Better Latency accuray warning message
  Support for ETSI GS NFV-TST 009

4 years agoNew PROX commit ID and bug fix 18/69618/1
Luc Provoost [Fri, 31 Jan 2020 17:06:02 +0000 (12:06 -0500)]
New PROX commit ID and bug fix

Updated deploycentos.sh with latest PROX commit ID and took another code
review comment into account.

Change-Id: Iedfa695be7496459d990f36e2dc00c8890b19fb3
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoMerge "Update PROX version to (preprod) 1908 to reflect DPDK 19.08 support"
Xavier Simonart [Fri, 31 Jan 2020 16:54:54 +0000 (16:54 +0000)]
Merge "Update PROX version to (preprod) 1908 to reflect DPDK 19.08 support"

4 years agocode review comments and PROX commit ID 03/69603/1
Luc Provoost [Wed, 29 Jan 2020 13:22:32 +0000 (08:22 -0500)]
code review comments and PROX commit ID

Implemented the code review comments I got on previous commits and using
commit ID 2cd03b7 to select the PROX version that will be installed in
the VMs through deploycentostools.sh

Change-Id: Ifc4c18c657a8bd57c68a7fc9d885c75ffdcb7b5d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoUpdate PROX version to (preprod) 1908 to reflect DPDK 19.08 support 00/69600/1
Xavier Simonart [Wed, 29 Jan 2020 12:11:00 +0000 (13:11 +0100)]
Update PROX version to (preprod) 1908 to reflect DPDK 19.08 support

Change-Id: I04e0bdc6679a74a8ace26eb30d6f8d2857d6c1c7
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoPROX: print panic message on screen 35/69535/2
Xavier Simonart [Sun, 12 Jan 2020 15:52:10 +0000 (16:52 +0100)]
PROX: print panic message on screen

When PROX detects an error condition at startup, it calls PROX_PANIC
which prints an message before calling rte_panic to end the application.
If ncurses was already started, this results in the message being printed
in ncurses (and prox.log) then leaving ncurses; hence the message is usually
not visible to the user (until it open prox.log), giving the impression of an
unexpected crash.

With this fix, the error message is repeated after closing ncurses, hence the message
will be printed on stdout.
Note that it might also be printed twice on stdout if ncurses was not already started.

As part of this fix, prox.log is now properly closed.

Change-Id: If41875843f1a39bc715f4264b3992c3fa018394e
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoAdded command lat all stats 75/69475/3
Xavier Simonart [Mon, 30 Dec 2019 22:49:52 +0000 (23:49 +0100)]
Added command lat all stats

lat all stats <core_id> <task_id> combines "lat stats" and "lat packets" within one command.
This command returns:
- One line in case the core_task parser fails. In that case the line will start with: "error: invalid syntax"
- One set of lines for each core task:
- if core/task is invalid, or not running lat mode, the line will contain (start with) "error...". this will be the only line for that core/task.
- Otherwise the set of lines will be:
- One line as returned by "lat stats". This line will be
- One line starting with "error" in case of error, or
- One line containing lat_min_usec, lat_max_usec, lat_avg_usec, tot_lat_min_usec, tot_lat_max_usec, last_tsc, rte_get_tsc_hz(), lcore_id, task_id
- The return from lat packets i.e.
- One line starting with "error" in case of error, or
- 128 lines - one for each bucket - as returned by "lat packets" command

This command is more useful then lat packets, as it contains the tsc - needed to see whether the sample is new or not.

Change-Id: I04231aa7c5bd2d352ed6f94d40e88d3b411ce744
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoAdd Latency Distribution display 67/69467/3
Xavier Simonart [Sun, 29 Dec 2019 17:41:50 +0000 (18:41 +0100)]
Add Latency Distribution display

- Latency Distribution (i.e. histograms) has been added when latency is enabled.
- Histograms are now compiled by default.
- A bug has also been fixed, which was causing strange behavior in the histograms
(due to bucket size being overwritten).
- The default bucket size has been changed to "11" which means that the size of each bucket
is now (1 cycle << 11) = 2048 cycles = 1 microsecond at 2GHz. It was (1 << (10 - 1)).

As there are 128 latency buckets, it is not possible to show all of them on the display.
Hence the latency buckets are displayed based on on the assumption that the minimum latency is usually relatively
stable and that the maximum latency change more often.
- The first empty buckets are not shown (i.e. buckets empty for all tasks)
- If more than 15 buckets are non empty, then the buckets are combined, so that a maximum of
15 (bigger) buckets are shown
- If less than 15 buckets are non empty, the following (empty) buckets are shown
(this avoid seeing every x seconds some columns being added and removed).

Change-Id: I27fe6ac0e513a5558e42ff2e74255c55ba79516d
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoAdded support for DPDK 19.08 20/68320/6
Xavier Simonart [Tue, 6 Aug 2019 11:01:27 +0000 (13:01 +0200)]
Added support for DPDK 19.08

Change-Id: I090bf8f1cd5a5d2dfa4f336bc66c46cc03d6c5bb
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoPrepare for DPDK 19.08 support 19/68319/6
Xavier Simonart [Wed, 23 Oct 2019 10:38:51 +0000 (12:38 +0200)]
Prepare for DPDK 19.08 support

This commit prepares PROX for supporting changes from DPDK 19.08
Mainly, the "sed" listed below were run.
In addition,
- some forward definition have been removed,
- prox_compat.h has been updated
- prox_compat.h has been included where necessary.

Hence such a commit is rather easy to review and to reapply
on other branches if necessary.

sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.h
sed -i 's/struct ether_hdr/prox_rte_ether_hdr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.c
sed -i 's/struct ether_addr/prox_rte_ether_addr/g' *.h
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.c
sed -i 's/prox_rte_ether_addr_port/struct ether_addr_port/g' *.h
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.c
sed -i 's/struct vlan_hdr/prox_rte_vlan_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.h
sed -i 's/struct ipv4_hdr/prox_rte_ipv4_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.c
sed -i 's/struct ipv6_hdr/prox_rte_ipv6_hdr/g' *.h
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.c
sed -i 's/struct udp_hdr/prox_rte_udp_hdr/g' *.h
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.c
sed -i 's/struct tcp_hdr/prox_rte_tcp_hdr/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/struct prox_rte_ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/struct prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_addr_copy/ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.c
sed -i 's/ether_addr_copy/prox_rte_ether_addr_copy/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.h
sed -i 's/prox_rte_ether_hdr_arp/struct ether_hdr_arp/g' *.c
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.h
sed -i 's/struct vxlan_gpe_hdr/prox_rte_vxlan_gpe_hdr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.c
sed -i 's/eth_random_addr/prox_rte_eth_random_addr/g' *.h
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.c
sed -i 's/ETHER_CRC_LEN/PROX_RTE_ETHER_CRC_LEN/g' *.h
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.c
sed -i 's/ETHER_HDR_LEN/PROX_RTE_ETHER_HDR_LEN/g' *.h
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.c
sed -i 's/ETHER_MAX_LEN/PROX_RTE_ETHER_MAX_LEN/g' *.h
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.c
sed -i 's/ETHER_MIN_LEN/PROX_RTE_ETHER_MIN_LEN/g' *.h
sed -i 's/TCP_SYN_FLAG/PROX_RTE_TCP_SYN_FLAG/g' *.c
sed -i 's/TCP_RST_FLAG/PROX_RTE_TCP_RST_FLAG/g' *.c
sed -i 's/TCP_FIN_FLAG/PROX_RTE_TCP_FIN_FLAG/g' *.c
sed -i 's/TCP_ACK_FLAG/PROX_RTE_TCP_ACK_FLAG/g' *.c

Change-Id: I4dfe8be68e618c94dcaae28754579fbeb571bb00
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoCode review feedback & back-ground traffic support 86/69586/1
Luc Provoost [Mon, 27 Jan 2020 15:14:09 +0000 (10:14 -0500)]
Code review feedback & back-ground traffic support

Various code review comments taken into account. We also support now
background traffic, meaning the scripts will start a test between
machines and monitor packet loss, latency, etc., but at the same time,
the script will also start traffic on background machines. That traffic
will not be monitored. Each generator will generate the same ammoung of
traffic.

Change-Id: I5cd495be230a526f91de965f3d4dd0581681f5ca
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoFix run_iteration when not using the sut_sock 74/69574/1
Luc Provoost [Thu, 23 Jan 2020 11:12:03 +0000 (06:12 -0500)]
Fix run_iteration when not using the sut_sock

When no sut_sock monitoring the swap, the while loop would never come to
an end. Also added heartbeat timeout in the generator config files.

Change-Id: I3c36991c65b9b826faf3d051a1354ca7eb34c24e
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoSpecify latency bucket size & correct calculation 64/69564/1
Luc Provoost [Fri, 17 Jan 2020 18:28:37 +0000 (13:28 -0500)]
Specify latency bucket size & correct calculation

A new parameter bucket_size_exp in the *.test file specifies the bucket
size for latency measurement. The default is 11 which corresponds to a
bucket size of 1 usec for a 2GHz processor. This fix is also calculating
the bucket size based on the reported frequency. Before it was assuming
a 2GHz processor.

Change-Id: I70d15e90e151a7e474cd05c9ac91b71a11fd5c78
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoInitial support for percentile latency measurements 36/69536/1
Luc Provoost [Mon, 13 Jan 2020 08:27:23 +0000 (03:27 -0500)]
Initial support for percentile latency measurements

We are now reporting a percentile number for the round-trip latency. The
numbers are only correct for processors running at 2GHz. Will fix this
next so it runs for any freqency. We only report 1-127 usec. If the
latency goes higher, we are now reporting "VERY HIGH".

Change-Id: If9fda63cea8616febcc0f24dc52590976cf39f3d
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoCombine code for fixed rate and variable rate tests 19/69519/1
Luc Provoost [Wed, 8 Jan 2020 10:18:28 +0000 (05:18 -0500)]
Combine code for fixed rate and variable rate tests

Previously, there were 2 functions: run_flow_size_test and
run_fixed_rate. The functionality of run_fixed_rate is now added to
run_flow_size_test.

Change-Id: Ifda70b8088b9131cc6c034d8007825e6d0917682
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoBetter Latency accuray warning message 78/69478/1
Luc Provoost [Tue, 31 Dec 2019 13:30:07 +0000 (08:30 -0500)]
Better Latency accuray warning message

The lacency accuracy warning is now given only taking into account
packets that were not dropped. Also fixed an error with the value of r
in the run_iteration function

Change-Id: Ic05fd2e4b8c59a4b7bcc131e981c08e0001436a6
Signed-off-by: Luc Provoos <luc.provoost@intel.com>
4 years agoSupport for ETSI GS NFV-TST 009 73/69473/1
Luc Provoost [Mon, 30 Dec 2019 15:28:14 +0000 (10:28 -0500)]
Support for ETSI GS NFV-TST 009

New test added TST009_Throughput.test allowing to run the throughput
benchmark as defined in ETSI GS NFV-TST 009. This change adds the binary
search algorithm as defined in the specification document.

Change-Id: I00e81a811a9c42b06136694fc1387bc59e954a28
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoRemove UUIDs in centos.json 25/69225/3
Luc Provoost [Mon, 2 Dec 2019 11:56:38 +0000 (06:56 -0500)]
Remove UUIDs in centos.json

Removed the remaining UUIDs from the centos.json file, making it easier
to reuse this file. This does require a recent version of the packer
tool. Updated the README accordingly and also added the --env option in
the packer alias, so that the OS_CLOUD variable is set when running
packer in the container. Updated rapid.vms with the security group name
used in the centos.json file.

Change-Id: I4f6815a3250811e336c14857e0ec5e7793a77acf
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoFix mempool size for swap.cfg 26/69226/2
Luc Provoost [Mon, 2 Dec 2019 15:38:35 +0000 (10:38 -0500)]
Fix mempool size for swap.cfg

Fixing an error re-introduced in the swap.cfg file. The mempool size
needs to be bigger than the number of rx and tx descriptors (we need
some extra buffers in the mempool for other things than rx and tx
descriptors). The default number of tx and rx descriptors has been
changed in PROX to 2K. This initially went through the testing since
this is just giving a warning in the prox.log file for some PMDs. For
other PMDs, PROX will not start.
Also fixed an inconsistency in rapid.vms: name of the security group.

Change-Id: If95677bd6169a16da1b3b2a56d13936a854c385e
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agorapid november release combining changes 41/68941/4
Luc Provoost [Wed, 20 Nov 2019 10:56:52 +0000 (11:56 +0100)]
rapid november release combining changes

-Renamed monitorswap.test into corestats.test. This is a more generic
test case that can monitor the core statistics of all PROX instances
-New portstats.test which can monitor the port statistics of all PROX
instances
-Removed the tasks parameter in the [DEFAULT] section of the *.test
files. Runrapid.py is now scaning the PROX configuration files to
automatically detect the PROX tasks that are being used.
-There is now an option to add the PushGateway parameter in the
[Default] section of some *.test files. This will push the measurements
to the Gateway, so they can be used by tools like Grafana. The logging
of the data in a csv file has also been improved. Results can now be
found on the screen, in the RUN*.log files, in the *.csv files and are
being pushed to the PushGateway.
-In the *.test files, replaced the swapcores, irqcores and impaircores
by the cores parameter since they are not treated differently by the
code. For a generator, we are still using the gencores and latcores
parameters since we need to treat them differently in runrapid.py
-devbind.sh is removed from the repository since this file is now
created by runrapid.py
-renamed the rapidVMs.vms file into rapid.vms
-image is now built without ssh access for root. Only using centos user.
runrapid.py is now using centos user for ssh sessions. PROX tools are
strted using sudo
-using new DPDK, mb_lib and PROX versions as defined in
deploycentostools.sh
-installing missing yum-utils package in image
-added flowsize parameter to the impairtest
-added list of flowsizes to the fixed_rate testing (l3framerate.test)
-the irqtest can now loop through multiple Test Machines in stead of
only checking the irq of one. Note that we should have the same cores
parameter for all Test machines
-changes in prox_ctrl.py to support setting the speed of a generator on
a combination of mulitple cores and tasks. Also added the
multi_port_stats function to support the new portstats.test
-Updated version to 19.11.21
-Fixed some power of 2 in the flow table

Change-Id: Ia14543bf3195a2b1bd4184b455da6940f1777fc9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
4 years agoUpdate RAPID readme about packer details 23/68923/4
Illia Polliul [Thu, 24 Oct 2019 14:00:05 +0000 (16:00 +0200)]
Update RAPID readme about packer details

Change-Id: Ieff72073fff06818a5c5bc8fb9116461c95c2901
Signed-off-by: Illia Polliul <ipolliul@juniper.net>
4 years agoAdded support for DPDK 19.05 / IPSec 65/68665/2
Xavier Simonart [Wed, 23 Oct 2019 10:38:51 +0000 (12:38 +0200)]
Added support for DPDK 19.05 / IPSec

Note that since 6073b359 (April 2018) IPsec PROX support requires
at least DPDK 17.11. Hence README has been updated.

Change-Id: I34b7a968c16db5c3a3fc7bb6af111fdb49ad6b91
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix two strncpy issues introduced by fb0c44a8 63/68663/1
Xavier Simonart [Mon, 21 Oct 2019 14:19:45 +0000 (16:19 +0200)]
Fix two strncpy issues introduced by fb0c44a8

Change-Id: Ic452b22dc2522a1b49e3091cb25f2784bc505b41
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoUpdate PROX version to (preprod) 1905 to reflect DPDK 19.05 support 41/68641/1
Xavier Simonart [Sat, 12 Oct 2019 22:31:39 +0000 (00:31 +0200)]
Update PROX version to (preprod) 1905 to reflect DPDK 19.05 support

Change-Id: I7ae7d9f2f5f3058df032062e0b2f6e3207086930
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoMerge "Increase the default number of rx and tx descriptors to 2K"
Xavier Simonart [Thu, 17 Oct 2019 12:02:53 +0000 (12:02 +0000)]
Merge "Increase the default number of rx and tx descriptors to 2K"

4 years agoFix support for old DPDK (such as 16.04) 22/68622/2
Xavier Simonart [Sat, 12 Oct 2019 22:27:47 +0000 (00:27 +0200)]
Fix support for old DPDK (such as 16.04)

When support for DPDK 18.05 was added it prevented supporting some
much older DPDK such as 16.04. This has been fixed.

Change-Id: Idd7ddd7e485c54c41def0540b8c126c097a05941
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoIncrease the default number of rx and tx descriptors to 2K 21/68621/2
Xavier Simonart [Sat, 12 Oct 2019 21:36:41 +0000 (23:36 +0200)]
Increase the default number of rx and tx descriptors to 2K

A high number of RX descriptor can be helpful in avoiding
packet loss due to the core being interrupted.
This commit increases the default number of descriptors from 256 to 2K.

Those values are checked versus the minimum and maximum supported by the pmd.
Number of mbufs (mempool size) have been updated n config files to support this
default number of dsescriptors.

The number of descriptors can still be overwritten by the config file. However
those values must always remain within the limits reported by the pmd.

Change-Id: I5f7999eca886dad68f3c0733da0d796bf4c06a56
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoDisable TX checksum offload in some virtio cases 23/68623/1
Xavier Simonart [Sat, 12 Oct 2019 22:18:14 +0000 (00:18 +0200)]
Disable TX checksum offload in some virtio cases

Some OVS versions reports that they support UDP offload and no IPv4 offload,
but fails when UDP offload is enabled.
Hence, now, when virtio reports that it supports UDP checksum and no IPV4
checksum offload, we disable UDP checksum offload.

Change-Id: I4f22f6be4d97b0aedf267ebeaa498c0dacef3317
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoMerge "Fix generation through pcap file"
Xavier Simonart [Fri, 11 Oct 2019 13:18:33 +0000 (13:18 +0000)]
Merge "Fix generation through pcap file"

4 years agoFix generation through pcap file 49/68449/2
Xavier Simonart [Wed, 4 Sep 2019 17:20:52 +0000 (19:20 +0200)]
Fix generation through pcap file

- When using "pcap file" argument in PROX config file in the gen mode
(and no submode), packets were truncated to 8 bytes (and a warning printed)
This has been fixed.
- "Set value" command was checking whether offset was within first 1518 bytes
unrespective to the mtu (e.g. jumbo packets). This has been fixed.
- There was a limit of 64K packets loaded from a pcap file (which could be
overwritten through PROX config). This limit has been removed - by default
all packets from pcap are loaded
- When pcap was loaded, memory was allocated to  store the packet. However
just enough memory was allocated, so that there was no way to change (increase)
packet size through command line after that. Now memory is allocated to store
up to mtu size
- While "set value" command was acting on all packets, "pkt size" command
was only changing the first packet. This has now been changed and both commands
change all the packets.
- A few other minor cleanups.

Change-Id: I7264cee8d57e3e6a405dfd7e7a52a95b99399d99
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix port throughput related statistics for i40e virtual functions 77/68177/4
Xavier Simonart [Mon, 1 Jul 2019 15:11:54 +0000 (17:11 +0200)]
Fix port throughput related statistics for i40e virtual functions

When CRC stripping is enabled (default PROX behavior), the number of
rx bytes received by the NIC returned by DPDK usually does not take the
CRC 4 bytes into account.
However, for i40e virtual functions those 4 bytes are counted as part of
the received bytes. This resulted in both DPDK and PROX taking those 4 bytes
into account causing the RX % to be above 100%.

Change-Id: I59883b638ed67a6778f80c4dd6bfbfc4f9f2f528
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoUpdate PROX to CRC STRIP default bahavior change in DPDK 76/68176/5
Xavier Simonart [Fri, 28 Jun 2019 14:56:26 +0000 (16:56 +0200)]
Update PROX to CRC STRIP default bahavior change in DPDK

Change-Id: I7c3e2981692d823c86787b77d61190327d6448e4
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
4 years agoFix strncpy issue introduced by fb0c44a8 10/68610/1
Xavier Simonart [Wed, 9 Oct 2019 17:03:29 +0000 (19:03 +0200)]
Fix strncpy issue introduced by fb0c44a8

Change-Id: I833d753bd5c426d50c0c9fdee5668f3b9fff13b9
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>