[dts] [PATCH V1]nic_single_core_perf: fixed an error when using 4 ports

hanyingya yingyax.han at intel.com
Sun Jan 19 06:57:17 CET 2020


Signed-off-by: hanyingya <yingyax.han at intel.com>
---
 tests/TestSuite_nic_single_core_perf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 7533b53..5781bc4 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -177,8 +177,8 @@ class TestNicSingleCorePerf(TestCase):
             for pcap in pcaps[0]:
                 tgen_input.append((txIntf, rxIntf, pcap))
         else:
-            for rxPort in range(self.nb_ports):
-                if rxPort % self.nb_ports == 0 or self.nb_ports % rxPort == 2:
+            for rxPort in range(port_num):
+                if rxPort % port_num == 0 or rxPort ** 2 == port_num:
                     txIntf = self.tester.get_local_port(self.dut_ports[rxPort + 1])
                     port_id = self.dut_ports[rxPort + 1]
                 else:
-- 
2.17.1



More information about the dts mailing list