[PATCH] Tests.Iperf: add missing initialization of oneoff iperf
parameter
by Jan Tluka
If parameter 'oneoff' is not specified, the default value False is used and
consequently None is passed as value of oneoff variable because the
initialization of the variable is skipped.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Tests/Iperf.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/lnst/Tests/Iperf.py b/lnst/Tests/Iperf.py
index db8f38d1..bedeb518 100644
--- a/lnst/Tests/Iperf.py
+++ b/lnst/Tests/Iperf.py
@@ -60,6 +60,7 @@ class IperfServer(IperfBase):
def _compose_cmd(self):
bind = ""
port = ""
+ oneoff = ""
if "bind" in self.params:
bind = "-B {}".format(self.params.bind)
--
2.26.2
2 years, 10 months
[PATCH 0/11] ENRT Measurements and Perf refactoring
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
Hi all,
this is the final version of the patchset, the only change is that it
was rebased on top of the current upstream master which included
resolving a simple merge conflict in the commit
"RecipeCommon.Perf: add typehints and use black to reformat code"
Everything else is the same, I have tested the patchset on all the
recipes that we have in the ENRT package and so I will be proceeding
with pushing this to master.
-Ondrej
Ondrej Lichtner (11):
RecipeCommon.Perf.Measurements: add flows property to FlowMeasurements
RecipeCommon.Perf.Measurements.StatCPUMeasurement: sort hosts
create lnst.Recipes.ENRT.MeasurementGenerators
Recipes.ENRT.BaseEnrtRecipe: remove perf measurement generation
add lnst.Recipes.ENRT.BaremetalEnrtRecipe
add lnst.Recipes.ENRT.VirtualEnrtRecipe
refactor lnst.Recipes.ENRT.BaseEnrtRecipe
lnst.RecipeCommon.Perf: Evaluators refactor to add parent recipe
configuration
RecipeCommon.Perf.RecipeConf: add parent recipe reference
RecipeCommon.Perf: add typehints and use black to reformat code
Perf.Measurements: remove measurement_conf from *Measurement
initialization
lnst/RecipeCommon/BaseResultEvaluator.py | 12 +-
.../Evaluators/BaselineCPUAverageEvaluator.py | 45 ++++-
.../Perf/Evaluators/BaselineEvaluator.py | 77 ++++++--
.../BaselineFlowAverageEvaluator.py | 37 +++-
.../Perf/Evaluators/NonzeroFlowEvaluator.py | 18 +-
.../Perf/Measurements/BaseFlowMeasurement.py | 4 +
.../Perf/Measurements/BaseMeasurement.py | 13 +-
.../Perf/Measurements/IperfFlowMeasurement.py | 13 +-
.../Perf/Measurements/StatCPUMeasurement.py | 11 +-
.../Perf/Measurements/TRexFlowMeasurement.py | 14 +-
lnst/RecipeCommon/Perf/Recipe.py | 129 +++++++++----
lnst/Recipes/ENRT/BaremetalEnrtRecipe.py | 26 +++
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 178 +++---------------
lnst/Recipes/ENRT/BondRecipe.py | 4 +-
lnst/Recipes/ENRT/DoubleBondRecipe.py | 4 +-
lnst/Recipes/ENRT/DoubleTeamRecipe.py | 4 +-
lnst/Recipes/ENRT/IpsecEspAeadRecipe.py | 4 +-
lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py | 4 +-
.../BaseMeasurementGenerator.py | 3 +
...lowEndpointsStatCPUMeasurementGenerator.py | 26 +++
.../HypervisorsStatCPUMeasurementGenerator.py | 19 ++
.../IperfMeasurementGenerator.py | 146 ++++++++++++++
.../ENRT/MeasurementGenerators/__init__.py | 0
lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py | 4 +-
.../SctpFirewallPerfTestMixin.py | 4 +-
.../UdpFragmentationPerfTestMixin.py | 2 +-
.../ENRT/ShortLivedConnectionsRecipe.py | 4 +-
lnst/Recipes/ENRT/SimpleMacsecRecipe.py | 4 +-
lnst/Recipes/ENRT/SimpleNetworkRecipe.py | 7 +-
lnst/Recipes/ENRT/TeamRecipe.py | 4 +-
lnst/Recipes/ENRT/TeamVsBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py | 4 +-
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlanInGuestRecipe.py | 4 +-
.../VirtualBridgeVlanInHostMirroredRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlanInHostRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VirtualEnrtRecipe.py | 28 +++
...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 4 +-
.../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 4 +-
...irtualOvsBridgeVlanInHostMirroredRecipe.py | 4 +-
.../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 4 +-
.../VirtualOvsBridgeVlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansRecipe.py | 4 +-
lnst/Recipes/ENRT/VxlanMulticastRecipe.py | 4 +-
lnst/Recipes/ENRT/VxlanRemoteRecipe.py | 4 +-
48 files changed, 610 insertions(+), 306 deletions(-)
create mode 100644 lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/BaseMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/FlowEndpointsStatCPUMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/HypervisorsStatCPUMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/__init__.py
create mode 100644 lnst/Recipes/ENRT/VirtualEnrtRecipe.py
--
2.30.0
2 years, 11 months
[PATCH v2 0/9] Measurement results alignment
by Jan Tluka
Following patchset implements a measurement results alignment required
for more complex measurement scenarios where a delay between starting
the first and last measurements can result in counting in data that are
not relevant.
The approach is quite simple. Every class that inherit from
BaseMeasurementResults can override align_data method that should return
a copy of the class with measurement data aligned within a time.
The patchset extends only the FlowMeasurementResults and
StatCPUMeasurementResults classes so that most of the ENRT recipes can
benefit from this change.
Jan Tluka (9):
Tests.CPUStatMonitor: add timestamp into measured interval
RecipeCommon.Perf.Results.PerfInterval: add timestamp property
RecipeCommon.Perf.Measurements.StatCPUMeasurementResults: add
start_timestamp and end_timestamp property
RecipeCommon.Perf.Measurements.FlowMeasurementResults: add
start_timestamp and end_timestamp properties
RecipeCommon.Perf.Measurements.BaseMeasurement: add align_data method
RecipeCommon.Perf.Measurements.BaseFlowMeasurement: override
align_data method
RecipeCommon.Perf.Measurements.StatCPUMeasurement: override align_data
method
RecipeCommon.Perf.Recipe: keep both aggregated and individual results
lnst.RecipeCommon.Perf.Recipe: report and evaluate aligned results
.../Perf/Measurements/BaseFlowMeasurement.py | 41 +++++++++++++++
.../Perf/Measurements/BaseMeasurement.py | 3 ++
.../Perf/Measurements/IperfFlowMeasurement.py | 10 ++--
.../Perf/Measurements/StatCPUMeasurement.py | 32 ++++++++++--
lnst/RecipeCommon/Perf/Recipe.py | 51 ++++++++++++++++---
lnst/RecipeCommon/Perf/Results.py | 7 ++-
lnst/Tests/CPUStatMonitor.py | 1 +
7 files changed, 131 insertions(+), 14 deletions(-)
--
2.26.2
2 years, 11 months
[PATCH 0/9] Measurement results alignment
by Jan Tluka
Following patchset implements a measurement results alignment required
for more complex measurement scenarios where a delay between starting
the first and last measurements can result in counting in data that are
not relevant.
The approach is quite simple. Every class that inherit from
BaseMeasurementResults can override align_data method that should return
a copy of the class with measurement data aligned within a time.
The patchset extends only the FlowMeasurementResults and
StatCPUMeasurementResults classes so that most of the ENRT recipes can
benefit from this change.
Jan Tluka (9):
Tests.CPUStatMonitor: add timestamp into measured interval
RecipeCommon.Perf.Results.PerfInterval: add timestamp property
RecipeCommon.Perf.Measurements.StatCPUMeasurementResults: add
start_timestamp and end_timestamp property
RecipeCommon.Perf.Measurements.FlowMeasurementResults: add
start_timestamp and end_timestamp properties
RecipeCommon.Perf.Measurements.BaseMeasurement: add align_data method
RecipeCommon.Perf.Measurements.BaseFlowMeasurement: override
align_data method
RecipeCommon.Perf.Measurements.StatCPUMeasurement: override align_data
method
RecipeCommon.Perf.Recipe: keep both aggregated and individual results
lnst.RecipeCommon.Perf.Recipe: report and evaluate aligned results
.../Perf/Measurements/BaseFlowMeasurement.py | 46 ++++++++++++++++
.../Perf/Measurements/BaseMeasurement.py | 3 ++
.../Perf/Measurements/IperfFlowMeasurement.py | 10 ++--
.../Perf/Measurements/StatCPUMeasurement.py | 34 ++++++++++--
lnst/RecipeCommon/Perf/Recipe.py | 52 ++++++++++++++++---
lnst/RecipeCommon/Perf/Results.py | 7 ++-
lnst/Tests/CPUStatMonitor.py | 1 +
7 files changed, 139 insertions(+), 14 deletions(-)
--
2.26.2
2 years, 11 months
[PATCH 0/11] ENRT Measurements and Perf refactoring
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
Hi all,
as promised, this is the updated second version of my patchset from last
year. This should now be a good enough version to apply.
The main chages are:
* split evaluator refactoring into separate patch from commit adding
type hinting and black reformatting
* more complete type hinting for the lnst.RecipeCommon.Perf package
* remove measurement_conf from *Measurement init - new commit based on
coments from Jan to the previous patchset
Info from previous cover letter (copy pasted):
This is the first version of a patchset to refactor the Recipes.ENRT
package to make it more flexible wrt. generating measurements, this is a
pain point that we've hit with different type of recipes that we already
have:
* baremetal recipes, generating relatively simple iperf flows
* virtual recipes, being very similar however requiring different cpu
measurements generated along these flow measurements
* ipsec type recipes that generate more complex iperf flows
* ovs+dpdk type recipes that due to using trex have their own quirks
This version of the patchset was focused on adding support for the
second bullet in the list - the virtual recipes, and making sure that
baremetal recipes still work.
Ipsec recipes should still work the same way, the ovs+dpdk recipes;
however, likely require additional work.
There's also a note in the final commit that more work on adding type
hints to the Perf.* package.
And finally... documentation has not been updated and will be added in
the second version of the patchset.
Please take a look and provide any valuable feedback that I should work
on in the second version of the set.
-Ondrej
Ondrej Lichtner (11):
RecipeCommon.Perf.Measurements: add flows property to FlowMeasurements
RecipeCommon.Perf.Measurements.StatCPUMeasurement: sort hosts
create lnst.Recipes.ENRT.MeasurementGenerators
Recipes.ENRT.BaseEnrtRecipe: remove perf measurement generation
add lnst.Recipes.ENRT.BaremetalEnrtRecipe
add lnst.Recipes.ENRT.VirtualEnrtRecipe
refactor lnst.Recipes.ENRT.BaseEnrtRecipe
lnst.RecipeCommon.Perf: Evaluators refactor to add parent recipe
configuration
RecipeCommon.Perf.RecipeConf: add parent recipe reference
RecipeCommon.Perf: add typehints and use black to reformat code
Perf.Measurements: remove measurement_conf from *Measurement
initialization
lnst/RecipeCommon/BaseResultEvaluator.py | 16 +-
.../Evaluators/BaselineCPUAverageEvaluator.py | 45 ++++-
.../Perf/Evaluators/BaselineEvaluator.py | 77 ++++++--
.../BaselineFlowAverageEvaluator.py | 37 +++-
.../Perf/Evaluators/NonzeroFlowEvaluator.py | 18 +-
.../Perf/Measurements/BaseFlowMeasurement.py | 4 +
.../Perf/Measurements/BaseMeasurement.py | 7 +-
.../Perf/Measurements/IperfFlowMeasurement.py | 13 +-
.../Perf/Measurements/StatCPUMeasurement.py | 11 +-
.../Perf/Measurements/TRexFlowMeasurement.py | 14 +-
lnst/RecipeCommon/Perf/Recipe.py | 82 +++++---
lnst/Recipes/ENRT/BaremetalEnrtRecipe.py | 26 +++
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 178 +++---------------
lnst/Recipes/ENRT/BondRecipe.py | 4 +-
lnst/Recipes/ENRT/DoubleBondRecipe.py | 4 +-
lnst/Recipes/ENRT/DoubleTeamRecipe.py | 4 +-
lnst/Recipes/ENRT/IpsecEspAeadRecipe.py | 4 +-
lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py | 4 +-
.../BaseMeasurementGenerator.py | 3 +
...lowEndpointsStatCPUMeasurementGenerator.py | 26 +++
.../HypervisorsStatCPUMeasurementGenerator.py | 19 ++
.../IperfMeasurementGenerator.py | 146 ++++++++++++++
.../ENRT/MeasurementGenerators/__init__.py | 0
lnst/Recipes/ENRT/NoVirtOvsVxlanRecipe.py | 4 +-
.../ENRT/ShortLivedConnectionsRecipe.py | 4 +-
lnst/Recipes/ENRT/SimpleMacsecRecipe.py | 4 +-
lnst/Recipes/ENRT/SimpleNetworkRecipe.py | 7 +-
lnst/Recipes/ENRT/TeamRecipe.py | 4 +-
lnst/Recipes/ENRT/TeamVsBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VirtOvsVxlanRecipe.py | 4 +-
.../VirtualBridgeVlanInGuestMirroredRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlanInGuestRecipe.py | 4 +-
.../VirtualBridgeVlanInHostMirroredRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlanInHostRecipe.py | 4 +-
.../ENRT/VirtualBridgeVlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VirtualEnrtRecipe.py | 28 +++
...rtualOvsBridgeVlanInGuestMirroredRecipe.py | 4 +-
.../ENRT/VirtualOvsBridgeVlanInGuestRecipe.py | 4 +-
...irtualOvsBridgeVlanInHostMirroredRecipe.py | 4 +-
.../ENRT/VirtualOvsBridgeVlanInHostRecipe.py | 4 +-
.../VirtualOvsBridgeVlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansOverBondRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansOverTeamRecipe.py | 4 +-
lnst/Recipes/ENRT/VlansRecipe.py | 4 +-
lnst/Recipes/ENRT/VxlanMulticastRecipe.py | 4 +-
lnst/Recipes/ENRT/VxlanRemoteRecipe.py | 4 +-
46 files changed, 579 insertions(+), 282 deletions(-)
create mode 100644 lnst/Recipes/ENRT/BaremetalEnrtRecipe.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/BaseMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/FlowEndpointsStatCPUMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/HypervisorsStatCPUMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/IperfMeasurementGenerator.py
create mode 100644 lnst/Recipes/ENRT/MeasurementGenerators/__init__.py
create mode 100644 lnst/Recipes/ENRT/VirtualEnrtRecipe.py
--
2.29.2
2 years, 11 months
[PATCH 1/2] lnst.Recipes.ENRT.OvS_DPDK_PvP: add missing parameter
by jurbanov@redhat.com
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
After introduction of the OvSDPDKBondRecipe the test module testPMD requires forward_mode parameter.
Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>
---
lnst/Recipes/ENRT/OvS_DPDK_PvP.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py
index 4e2aa00..c661320 100644
--- a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py
+++ b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py
@@ -118,6 +118,7 @@ class OvSDPDKPvPRecipe(BasePvPRecipe):
TestPMD(
coremask=self.params.guest_testpmd_cores,
pmd_coremask=self.params.guest_dpdk_cores,
+ forward_mode="mac",
nics=[nic.bus_info for nic in config.guest.nics],
peer_macs=[nic.hwaddr for nic in config.generator.nics]),
bg=True)
--
2.29.2
2 years, 11 months
[PATCH 1/2] lnst.Recipes.ENRT.OvSDPDKBondRecipe: fix parameter name
by jurbanov@redhat.com
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>
---
lnst/Recipes/ENRT/OvSDPDKBondRecipe.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Recipes/ENRT/OvSDPDKBondRecipe.py b/lnst/Recipes/ENRT/OvSDPDKBondRecipe.py
index 2c3eb88..e2de29f 100644
--- a/lnst/Recipes/ENRT/OvSDPDKBondRecipe.py
+++ b/lnst/Recipes/ENRT/OvSDPDKBondRecipe.py
@@ -188,7 +188,7 @@ class OvSDPDKBondRecipe(BaseEnrtRecipe):
TestPMD(
coremask=self.params.testpmd_cores,
pmd_coremask=self.params.testpmd_dpdk_cores,
- mode="macswap",
+ forward_mode="macswap",
nics=["vhost0", "vhost1"]),
bg=True)
--
2.29.2
2 years, 11 months
[PATCH v2 0/6] add OvSDPDKBondRecipe
by jurbanov@redhat.com
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
Hi and Happy New Year,
This patchset adds OvSDPDKBondRecipe and fixes some
issues with test tools required for the recipe.
Patchset has been reviewed in internal downstream,
before it was decided to split it to upstream and downstream.
V2 includes additional docstrings in OvSDPDKBondRecipe and some
minor visual fixes.
Jozef Urbanovsky (6):
lnst.Recipes.ENRT.OvSDPDKBondRecipe: add new recipe
lnst.Tests.TestPMD: add mode branching
lnst.Tests.TRex: add __repr__ methods, expose module parameter
lnst.RecipeCommon.Perf.Measurements.TRexFlowMeasurement: fixes
requirements: add dataclasses package
lnst.Recipes.ENRT.OvSDPDKBondRecipe: override *test_tweak methods
.../Perf/Measurements/TRexFlowMeasurement.py | 5 +-
lnst/Recipes/ENRT/OvSDPDKBondRecipe.py | 390 ++++++++++++++++++
lnst/Recipes/ENRT/__init__.py | 1 +
lnst/Tests/TRex.py | 27 ++
lnst/Tests/TestPMD.py | 36 +-
requirements.txt | 1 +
6 files changed, 448 insertions(+), 12 deletions(-)
create mode 100644 lnst/Recipes/ENRT/OvSDPDKBondRecipe.py
--
2.29.2
2 years, 11 months
[PATCH v2] lnst.Tests.TestPMD: add forward_mode branching
by jurbanov@redhat.com
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
Adding parameter for the forward-mode selection of the
testPMD application running during the recipe.
Branching is currently supporting only "mac" and "macswap"
forward modes.
Signed-off-by: Jozef Urbanovsky <jurbanov(a)redhat.com>
---
lnst/Tests/TestPMD.py | 36 ++++++++++++++++++++++++++----------
1 file changed, 26 insertions(+), 10 deletions(-)
diff --git a/lnst/Tests/TestPMD.py b/lnst/Tests/TestPMD.py
index a92a42a..44c234f 100644
--- a/lnst/Tests/TestPMD.py
+++ b/lnst/Tests/TestPMD.py
@@ -4,27 +4,43 @@ import signal
from lnst.Common.Parameters import Param, StrParam, IntParam, FloatParam
from lnst.Common.Parameters import IpParam, DeviceOrIpParam
from lnst.Tests.BaseTestModule import BaseTestModule, TestModuleError
+from lnst.Common.LnstError import LnstError
+
class TestPMD(BaseTestModule):
coremask = StrParam(mandatory=True)
pmd_coremask = StrParam(mandatory=True)
- #TODO make ListParam
+ # TODO make ListParam
+ foward_mode = StrParam(mandatory=True)
nics = Param(mandatory=True)
- peer_macs = Param(mandatory=True)
+ peer_macs = Param(mandatory=False)
def format_command(self):
- testpmd_args = ["testpmd",
- "-c", self.params.coremask,
- "-n", "4", "--socket-mem", "1024,0"]
- for nic in self.params.nics:
- testpmd_args.extend(["-w", nic])
+ if self.params.forward_mode == "macswap":
+ testpmd_args = ["dpdk-testpmd", "--no-pci"]
+ else:
+ testpmd_args = ["testpmd"]
+
+ testpmd_args.extend(["-c", self.params.coremask,
+ "-n", "4", "--socket-mem", "1024,0"])
+
+ for i, nic in enumerate(self.params.nics):
+ if self.params.foward_mode == "mac":
+ testpmd_args.extend(["-w", nic])
+ elif self.params.foward_mode == "macswap":
+ testpmd_args.extend([f"--vdev=net_virtio_user{i+1},path=/var/run/openvswitch/{nic}"])
+ else:
+ LnstError("Unsupported forward-mode parameter selected for the TestPMD.")
- testpmd_args.extend(["--", "-i", "--forward-mode", "mac",
+ testpmd_args.extend(["--", "-i", "--forward-mode", self.params.foward_mode,
"--coremask", self.params.pmd_coremask])
- for i, mac in enumerate(self.params.peer_macs):
- testpmd_args.extend(["--eth-peer", "{},{}".format(i, mac)])
+ if self.params.foward_mode == "mac":
+ for i, mac in enumerate(self.params.peer_macs):
+ testpmd_args.extend(["--eth-peer", "{},{}".format(i, mac)])
+ elif self.params.foward_mode == "macswap":
+ testpmd_args.extend(["--port-topology=loop"])
return " ".join(testpmd_args)
--
2.29.2
2 years, 11 months