[V2,6/9] framework/pmd_output: optimize methods to adapt to MEV testing

Message ID 20230825152825.2831565-7-songx.jiale@intel.com (mailing list archive)
State Superseded
Headers
Series add functions to test MEV |

Commit Message

Jiale Song Aug. 25, 2023, 3:28 p.m. UTC
  optimize methods to adapt to MEV testing.

Signed-off-by: Jiale Song <songx.jiale@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..d51c3a9b 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)