[dts] [PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides

Zhang, XiX xix.zhang at intel.com
Fri Jul 17 10:49:02 CEST 2020


Tested-by: Zhang, XiX <xix.zhang at intel.com>

-----Original Message-----
From: Zhang, XiX 
Sent: Friday, July 17, 2020 4:49 PM
To: dts at dpdk.org
Cc: Zhang, XiX <xix.zhang at intel.com>
Subject: [dts][PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides

Start ethTool using the cores from the socket on which the nic resides

Signed-off-by: xizhan4x <xix.zhang at intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 9bb7d55..2b8fa17 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -63,7 +63,13 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
         self.verify("No such file" not in out, "compilation error 2")
 
         path = "./examples/ethtool/ethtool-app/%s/ethtool" % self.target
-        self.cmd = "%s -c f -n %d" % (path, self.dut.get_memory_channels())
+        used_dut_port_pci = self.dut.ports_info[self.ports[0]]['port'].pci
+        out = self.dut.send_expect("cat /sys/bus/pci/devices/%s/numa_node " % used_dut_port_pci, "# ")
+        cpu_cores = self.dut.send_expect('lscpu |grep "NUMA node%s CPU(s):"' % out, "# ")
+        core = re.findall(r"\d+-(\d+)", cpu_cores)[0]
+        core = int(core)
+        cores = "%d,%d,%d,%d" % (core - 1, core - 2, core - 3, core - 4)
+        self.cmd = "%s -l %s -n %d" % (path, cores, self.dut.get_memory_channels())
 
         # pause frame basic configuration
         self.pause_time = 65535
-- 
1.8.3.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestUserspaceEthtool.log
Type: application/octet-stream
Size: 8292 bytes
Desc: TestUserspaceEthtool.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20200717/af0922dd/attachment.obj>


More information about the dts mailing list