[V2] tests/pmd_bonded: optimize scripts

Message ID 20230728143304.85230-1-songx.jiale@intel.com (mailing list archive)
State New
Headers
Series [V2] tests/pmd_bonded: optimize scripts |

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Jiale, SongX July 28, 2023, 2:33 p.m. UTC
  in the "TLB (5)" binding mode, the current primary slave port will
synchronize the MAC address of the binding port. therefore, modify the
script to get the current primary slave port latest mac address.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 tests/TestSuite_pmd_bonded.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py
index f957d4e7..d0157cdb 100644
--- a/tests/TestSuite_pmd_bonded.py
+++ b/tests/TestSuite_pmd_bonded.py
@@ -111,11 +111,11 @@  class TestPmdBonded(TestCase):
             dut_dest_port = dest_port
 
         if not ether_ip.get("ether"):
-            ether["dest_mac"] = self.dut.get_mac_address(dut_dest_port)
+            ether["dest_mac"] = self.get_port_mac(dut_dest_port)
             ether["src_mac"] = "52:00:00:00:00:00"
         else:
             if not ether_ip["ether"].get("dest_mac"):
-                ether["dest_mac"] = self.dut.get_mac_address(dut_dest_port)
+                ether["dest_mac"] = self.get_port_mac(dut_dest_port)
             else:
                 ether["dest_mac"] = ether_ip["ether"]["dest_mac"]
             if not ether_ip["ether"].get("src_mac"):