* Re: [dts] [PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides
2020-07-17 8:49 [dts] [PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides xizhan4x
@ 2020-07-17 8:49 ` Zhang, XiX
2020-07-24 2:27 ` Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: Zhang, XiX @ 2020-07-17 8:49 UTC (permalink / raw)
To: dts
[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]
Tested-by: Zhang, XiX <xix.zhang@intel.com>
-----Original Message-----
From: Zhang, XiX
Sent: Friday, July 17, 2020 4:49 PM
To: dts@dpdk.org
Cc: Zhang, XiX <xix.zhang@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@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
[-- Attachment #2: TestUserspaceEthtool.log --]
[-- Type: application/octet-stream, Size: 8292 bytes --]
18/07/2020 01:23:12 dts:
TEST SUITE : TestUserspaceEthtool
18/07/2020 01:23:12 dts: NIC : carlsville
18/07/2020 01:23:13 dut.10.240.183.210:
18/07/2020 01:23:13 tester:
18/07/2020 01:23:13 dut.10.240.183.210: rm -rf ./app/test/test_resource_c.res.o
18/07/2020 01:23:13 dut.10.240.183.210:
18/07/2020 01:23:13 dut.10.240.183.210: rm -rf ./app/test/test_resource_tar.res.o
18/07/2020 01:23:13 dut.10.240.183.210:
18/07/2020 01:23:13 dut.10.240.183.210: rm -rf ./app/test/test_pci_sysfs.res.o
18/07/2020 01:23:13 dut.10.240.183.210:
18/07/2020 01:23:13 dut.10.240.183.210: make -j 70 -C examples/ethtool
18/07/2020 01:23:15 dut.10.240.183.210: make: Entering directory '/root/dpdk/examples/ethtool'
== lib
CC rte_ethtool.o
AR librte_ethtool.a
INSTALL-LIB librte_ethtool.a
== ethtool-app
CC main.o
CC ethapp.o
LD ethtool
INSTALL-APP ethtool
INSTALL-MAP ethtool.map
make: Leaving directory '/root/dpdk/examples/ethtool'
18/07/2020 01:23:15 dut.10.240.183.210: cat /sys/bus/pci/devices/0000:af:00.0/numa_node
18/07/2020 01:23:15 dut.10.240.183.210: 1
18/07/2020 01:23:15 dut.10.240.183.210: lscpu |grep "NUMA node1 CPU(s):"
18/07/2020 01:23:15 dut.10.240.183.210: NUMA node1 CPU(s): 18-35,54-71
18/07/2020 01:23:15 TestUserspaceEthtool: Test Case test_ring_parameter Begin
18/07/2020 01:23:15 dut.10.240.183.210:
18/07/2020 01:23:15 tester:
18/07/2020 01:23:15 dut.10.240.183.210: ./examples/ethtool/ethtool-app/x86_64-native-linuxapp-gcc/ethtool -l 34,33,32,31 -n 4
18/07/2020 01:23:16 dut.10.240.183.210: EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_i40e (8086:15ff) device: 0000:af:00.0 (socket 1)
EAL: Probe PCI driver: net_i40e (8086:15ff) device: 0000:af:00.1 (socket 1)
EAL: No legacy callbacks, legacy socket not created
Number of NICs: 2
Init port 0..
Init port 1..
18/07/2020 01:23:16 dut.10.240.183.210: portstats 0
18/07/2020 01:23:16 dut.10.240.183.210: portstats 0
Port 0 stats
In: 0 (0 bytes)
Out: 0 (0 bytes)
Err: 0
18/07/2020 01:23:16 dut.10.240.183.210: ringparam 0
18/07/2020 01:23:16 dut.10.240.183.210: ringparam 0
Port 0 ring parameters
Rx Pending: 1024 (4096 max)
Tx Pending: 1024 (4096 max)
18/07/2020 01:23:16 dut.10.240.183.210: ringparam 0 4096 4096
18/07/2020 01:23:17 dut.10.240.183.210: ringparam 0 4096 4096
18/07/2020 01:23:17 dut.10.240.183.210: ringparam 0
18/07/2020 01:23:17 dut.10.240.183.210: ringparam 0
Port 0 ring parameters
Rx Pending: 4096 (4096 max)
Tx Pending: 4096 (4096 max)
18/07/2020 01:23:17 dut.10.240.183.210: link
18/07/2020 01:23:19 dut.10.240.183.210: link
Port 0: Down
Port 1: Down
18/07/2020 01:23:20 dut.10.240.183.210: link
18/07/2020 01:23:21 dut.10.240.183.210: link
Port 0: Down
Port 1: Up
18/07/2020 01:23:22 dut.10.240.183.210: link
18/07/2020 01:23:23 dut.10.240.183.210: link
Port 0: Up
Port 1: Up
18/07/2020 01:23:23 tester: scp -v /home/autoregression/zx_7_14/output/tmp/pcap/scapy_ens7.pcap1595006603.1673586 root@10.240.183.203:/tmp/tester/
18/07/2020 01:23:25 tester: scp -v /home/autoregression/zx_7_14/output/tmp/pcap/scapy_ens7.cmd1595006603.1673586 root@10.240.183.203:/tmp/tester/
18/07/2020 01:23:27 tester: python3 /tmp/tester/scapy_ens7.cmd1595006603.1673586
18/07/2020 01:23:28 tester: packet ready for sending...
Ether(dst='ff:ff:ff:ff:ff:ff', src='00:00:00:00:00:00', type=2048)/IP(version=4, ihl=5, tos=0, len=46, id=1, flags=0, frag=0, ttl=64, proto=17, chksum=31932, src='127.0.0.1', dst='127.0.0.1')/UDP(sport=53, dport=53, len=26, chksum=58930)/DNS(length=None, id=22616, qr=0, opcode=11, aa=0, tc=0, rd=0, ra=0, z=1, ad=0, cd=1, rcode=8, qdcount=22616, ancount=22616, nscount=22616, arcount=22616, qd=b'', an=b'', ns=b'', ar=b'')/Raw(load=b'XXXXXX')
18/07/2020 01:23:28 dut.10.240.183.210: portstats 0
18/07/2020 01:23:28 dut.10.240.183.210: portstats 0
Port 0 stats
In: 4 (240 bytes)
Out: 4 (240 bytes)
Err: 0
18/07/2020 01:23:28 dut.10.240.183.210: quit
18/07/2020 01:23:28 dut.10.240.183.210: quit
18/07/2020 01:23:28 dut.10.240.183.210: ./examples/ethtool/ethtool-app/x86_64-native-linuxapp-gcc/ethtool -l 34,33,32,31 -n 4
18/07/2020 01:23:29 dut.10.240.183.210: EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_i40e (8086:15ff) device: 0000:af:00.0 (socket 1)
EAL: Probe PCI driver: net_i40e (8086:15ff) device: 0000:af:00.1 (socket 1)
EAL: No legacy callbacks, legacy socket not created
Number of NICs: 2
Init port 0..
Init port 1..
18/07/2020 01:23:29 dut.10.240.183.210: portstats 1
18/07/2020 01:23:29 dut.10.240.183.210: portstats 1
Port 1 stats
In: 0 (0 bytes)
Out: 0 (0 bytes)
Err: 0
18/07/2020 01:23:29 dut.10.240.183.210: ringparam 1
18/07/2020 01:23:29 dut.10.240.183.210: ringparam 1
Port 1 ring parameters
Rx Pending: 1024 (4096 max)
Tx Pending: 1024 (4096 max)
18/07/2020 01:23:29 dut.10.240.183.210: ringparam 1 4096 4096
18/07/2020 01:23:29 dut.10.240.183.210: ringparam 1 4096 4096
18/07/2020 01:23:29 dut.10.240.183.210: ringparam 1
18/07/2020 01:23:30 dut.10.240.183.210: ringparam 1
Port 1 ring parameters
Rx Pending: 4096 (4096 max)
Tx Pending: 4096 (4096 max)
18/07/2020 01:23:30 dut.10.240.183.210: link
18/07/2020 01:23:32 dut.10.240.183.210: link
Port 0: Down
Port 1: Down
18/07/2020 01:23:33 dut.10.240.183.210: link
18/07/2020 01:23:35 dut.10.240.183.210: link
Port 0: Down
Port 1: Down
18/07/2020 01:23:36 dut.10.240.183.210: link
18/07/2020 01:23:36 dut.10.240.183.210: link
Port 0: Up
Port 1: Up
18/07/2020 01:23:36 tester: scp -v /home/autoregression/zx_7_14/output/tmp/pcap/scapy_ens9.pcap1595006616.2821455 root@10.240.183.203:/tmp/tester/
18/07/2020 01:23:38 tester: scp -v /home/autoregression/zx_7_14/output/tmp/pcap/scapy_ens9.cmd1595006616.2821455 root@10.240.183.203:/tmp/tester/
18/07/2020 01:23:40 tester: python3 /tmp/tester/scapy_ens9.cmd1595006616.2821455
18/07/2020 01:23:41 tester: packet ready for sending...
Ether(dst='ff:ff:ff:ff:ff:ff', src='00:00:00:00:00:00', type=2048)/IP(version=4, ihl=5, tos=0, len=46, id=1, flags=0, frag=0, ttl=64, proto=17, chksum=31932, src='127.0.0.1', dst='127.0.0.1')/UDP(sport=53, dport=53, len=26, chksum=58930)/DNS(length=None, id=22616, qr=0, opcode=11, aa=0, tc=0, rd=0, ra=0, z=1, ad=0, cd=1, rcode=8, qdcount=22616, ancount=22616, nscount=22616, arcount=22616, qd=b'', an=b'', ns=b'', ar=b'')/Raw(load=b'XXXXXX')
18/07/2020 01:23:41 dut.10.240.183.210: portstats 1
18/07/2020 01:23:41 dut.10.240.183.210: portstats 1
Port 1 stats
In: 4 (240 bytes)
Out: 4 (240 bytes)
Err: 0
18/07/2020 01:23:41 dut.10.240.183.210: quit
18/07/2020 01:23:41 dut.10.240.183.210: quit
18/07/2020 01:23:41 TestUserspaceEthtool: Test Case test_ring_parameter Result PASSED:
18/07/2020 01:23:41 dut.10.240.183.210: kill_all: called by dut and has no prefix list.
18/07/2020 01:23:42 dts:
TEST SUITE ENDED: TestUserspaceEthtool
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides
2020-07-17 8:49 [dts] [PATCH V1] tests/TestSuite_userspace_ethtool:Start ethTool using the cores from the socket on which the nic resides xizhan4x
2020-07-17 8:49 ` Zhang, XiX
@ 2020-07-24 2:27 ` Tu, Lijuan
1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-07-24 2:27 UTC (permalink / raw)
To: Zhang, XiX, dts; +Cc: Zhang, XiX
Applied, thanks
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of xizhan4x
> Sent: 2020年7月17日 16:49
> To: dts@dpdk.org
> Cc: Zhang, XiX <xix.zhang@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@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
^ permalink raw reply [flat|nested] 3+ messages in thread