From: Ondrej Lichtner olichtne@redhat.com
The TRexFlowMeasurement object now needs to be initialized with a list of cores to use for the TRexServer process instead of hard coded values.
This requires a change to the OvSDPDKPvPRecipe which previously removed a parameter that was intended to be used for this but skipped.
The same parameter needs to be added to the VhostNetPvPRecipe which also uses the TRexFlowMeasurement.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- .../Perf/Measurements/TRexFlowMeasurement.py | 5 +++-- lnst/Recipes/ENRT/OvS_DPDK_PvP.py | 20 +++++++++++------- lnst/Recipes/ENRT/VhostNetPvPRecipe.py | 21 ++++++++++++------- 3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py b/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py index 32fbf8c..5f5c705 100644 --- a/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py +++ b/lnst/RecipeCommon/Perf/Measurements/TRexFlowMeasurement.py @@ -16,9 +16,10 @@ from lnst.Tests.TRex import TRexServer, TRexClient
class TRexFlowMeasurement(BaseFlowMeasurement): - def __init__(self, flows, trex_dir): + def __init__(self, flows, trex_dir, server_cpu_cores): self._flows = flows self._trex_dir = trex_dir + self._server_cpu_cores = server_cpu_cores self._conf = dict(flows=flows, trex_dir=trex_dir) self._running_measurements = [] self._finished_measurements = [] @@ -69,7 +70,7 @@ def _prepare_tests(self, flows): TRexServer( trex_dir=self._trex_dir, flows=flow_tuples, - cores=["2", "3", "4"])) + cores=self._server_cpu_cores)) client_job = generator.prepare_job( TRexClient( trex_dir=self._trex_dir, diff --git a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py index cd6161d..b76a5b7 100644 --- a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py +++ b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py @@ -54,6 +54,7 @@ class OvSDPDKPvPRecipe(BasePvPRecipe): guest_dpdk_cores = StrParam(mandatory=True) guest_testpmd_cores = StrParam(mandatory=True)
+ host1_dpdk_cores = StrParam(mandatory=True) host2_pmd_cores = StrParam(mandatory=True) host2_l_cores = StrParam(mandatory=True) socket_mem = IntParam(default=2048) @@ -145,13 +146,18 @@ def generate_perf_config(self, config): cpupin=None))
return PerfRecipeConf( - measurements=[ - self.params.cpu_perf_tool([config.generator.host, - config.dut.host, - config.guest.host]), - TRexFlowMeasurement(flows, self.params.trex_dir) - ], - iterations=self.params.perf_iterations) + measurements=[ + self.params.cpu_perf_tool( + [config.generator.host, config.dut.host, config.guest.host] + ), + TRexFlowMeasurement( + flows, + self.params.trex_dir, + self.params.host1_dpdk_cores.split(","), + ), + ], + iterations=self.params.perf_iterations, + )
def test_wide_deconfiguration(self, config): try: diff --git a/lnst/Recipes/ENRT/VhostNetPvPRecipe.py b/lnst/Recipes/ENRT/VhostNetPvPRecipe.py index 780e22f..f512fd2 100644 --- a/lnst/Recipes/ENRT/VhostNetPvPRecipe.py +++ b/lnst/Recipes/ENRT/VhostNetPvPRecipe.py @@ -31,6 +31,8 @@ class VhostNetPvPRecipe(BasePvPRecipe): host_req.eth0 = DeviceReq(label="net1", driver=RecipeParam("driver")) host_req.eth1 = DeviceReq(label="net1", driver=RecipeParam("driver"))
+ host1_dpdk_cores = StrParam(mandatory=True) + vhost_cpus = StrParam(mandatory=True) # The CPUs used by vhost-net kernel threads
# TODO: Study the possibility of adding more forwarding engines @@ -134,13 +136,18 @@ def generate_perf_config(self, config): )
return PerfRecipeConf( - measurements=[ - self.params.cpu_perf_tool([config.generator.host, - config.dut.host, - config.guest.host]), - TRexFlowMeasurement(flows, self.params.trex_dir) - ], - iterations=self.params.perf_iterations) + measurements=[ + self.params.cpu_perf_tool( + [config.generator.host, config.dut.host, config.guest.host] + ), + TRexFlowMeasurement( + flows, + self.params.trex_dir, + self.params.host1_dpdk_cores.split(","), + ), + ], + iterations=self.params.perf_iterations, + )
def test_wide_deconfiguration(self, config): try:
From: Ondrej Lichtner olichtne@redhat.com
Remove the extra 'BasePvPTestConf' reference to the parent class from the generator config object initialization.
Remove the empty line at the end of file.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Recipes/ENRT/OvS_DPDK_PvP.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py index b76a5b7..63a6af4 100644 --- a/lnst/Recipes/ENRT/OvS_DPDK_PvP.py +++ b/lnst/Recipes/ENRT/OvS_DPDK_PvP.py @@ -37,7 +37,7 @@ def __init__(self): self.testpmd = None
def __init__(self): - self.generator = self.BasePvPTestConf.BaseHostConf() + self.generator = self.BaseHostConf() self.dut = self.DUTConf() self.guest = self.GuestConf()
@@ -301,4 +301,3 @@ def _xml_add_vhostuser_dev(self, guest_xml, name, mac_addr): ET.SubElement(interface, 'source', type='unix', path=vhost_server_path, mode='server') return vhost_server_path -
Fri, Jan 10, 2020 at 04:44:32PM CET, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
The TRexFlowMeasurement object now needs to be initialized with a list of cores to use for the TRexServer process instead of hard coded values.
This requires a change to the OvSDPDKPvPRecipe which previously removed a parameter that was intended to be used for this but skipped.
The same parameter needs to be added to the VhostNetPvPRecipe which also uses the TRexFlowMeasurement.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com
Both patches look ok.
Acked-by: Jan Tluka jtluka@redhat.com
On Fri, Jan 10, 2020 at 04:44:32PM +0100, olichtne@redhat.com wrote:
From: Ondrej Lichtner olichtne@redhat.com
The TRexFlowMeasurement object now needs to be initialized with a list of cores to use for the TRexServer process instead of hard coded values.
This requires a change to the OvSDPDKPvPRecipe which previously removed a parameter that was intended to be used for this but skipped.
The same parameter needs to be added to the VhostNetPvPRecipe which also uses the TRexFlowMeasurement.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com
.../Perf/Measurements/TRexFlowMeasurement.py | 5 +++-- lnst/Recipes/ENRT/OvS_DPDK_PvP.py | 20 +++++++++++------- lnst/Recipes/ENRT/VhostNetPvPRecipe.py | 21 ++++++++++++------- 3 files changed, 30 insertions(+), 16 deletions(-)
pushed.
-Ondrej
lnst-developers@lists.fedorahosted.org