[V1,07/10] framework/pmd_output: optimize function start_testpmd

Message ID 20230716090753.1590148-8-jin.ling@intel.com (mailing list archive)
State New
Headers
Series add functions to test MEV |

Commit Message

Jin Ling July 16, 2023, 9:07 a.m. UTC
  add code to create cmdline for running testpmd

Signed-off-by: Jin Ling <jin.ling@intel.com>
---
 framework/pmd_output.py | 3 +++
 1 file changed, 3 insertions(+)
  

Patch

diff --git a/framework/pmd_output.py b/framework/pmd_output.py
index c8e8b50f..865476ea 100644
--- a/framework/pmd_output.py
+++ b/framework/pmd_output.py
@@ -135,6 +135,7 @@  class PmdOutput:
             config["ports"] = [
                 self.dut.ports_info[i]["pci"] for i in range(len(self.dut.ports_info))
             ]
+            config["ports"]=list(set(config["ports"]))
         all_eal_param = self.dut.create_eal_parameters(
             fixed_prefix=fixed_prefix, socket=socket, **config
         )
@@ -145,6 +146,8 @@  class PmdOutput:
         if self.session != self.dut:
             self.session.send_expect("cd %s" % self.dut.base_dir, "# ")
         out = self.session.send_expect(command, expected, timeout)
+        if self.dut.test_mev == "true":
+            self.dut.mev_config_rx_port(out=out)
         self.command = command
         # wait 10s to ensure links getting up before test start.
         sleep(10)