test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite
@ 2019-12-17  0:11 lihong
  2019-12-17  7:51 ` Zhu, WenhuiX
  2019-12-20  8:05 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: lihong @ 2019-12-17  0:11 UTC (permalink / raw)
  To: dts; +Cc: lihong

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 tests/TestSuite_multiple_pthread.py | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py
index b59f047..6c6a070 100644
--- a/tests/TestSuite_multiple_pthread.py
+++ b/tests/TestSuite_multiple_pthread.py
@@ -36,6 +36,7 @@ import random
 import string
 import utils
 from test_case import TestCase
+from packet import Packet
 
 
 class TestMultiplePthread(TestCase):
@@ -60,27 +61,19 @@ class TestMultiplePthread(TestCase):
         """
         Run before each test case.
         """
-        pass
-
-    def destroy_packets_session(self):
-        """
-        close send packets session.
-        """
-        for i in valports:
-            self.tester.create_session(name="%s" % i).send_expect("^C", "#")
-            self.tester.destroy_session(self.tester.create_session(name="%s" % i))
+        self.send_sessions = []
 
     def send_packet(self):
         """
-        create sessions and Send packets continuous.
+        Send packets continuous.
         """
         for index in valports:
             localPort = self.tester.get_local_port(index)
             iface = self.tester.get_interface(localPort)
-            self.send_packets_session = self.tester.create_session(name="%s" % index)
-            packet = r'sendp([Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")], iface="%s", loop=1)' % (index, iface)
-            self.send_packets_session.send_expect("scapy", ">>>")
-            self.send_packets_session.send_command(packet)
+            pcap_str = 'Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")' % (index)
+            self.pkt = Packet(pcap_str)
+            intf = self.pkt.send_pkt_bg(crb=self.tester, tx_port=iface)
+            self.send_sessions.append(intf)
 
     def get_cores_statistic(self, cmdline):
         """
@@ -91,6 +84,7 @@ class TestMultiplePthread(TestCase):
         m = cmdline.replace('"', '', 2)
         out_list = out.split(m)
         mutiple_pthread_session.send_expect("^C", "#")
+        self.dut.close_session(mutiple_pthread_session)
         return out_list
 
     def verify_before_send_packets(self, out_list):
@@ -159,7 +153,6 @@ class TestMultiplePthread(TestCase):
         # quit application
         self.dut.send_expect("stop", "testpmd> ")
         self.dut.send_expect("quit", "# ", 30)
-        self.destroy_packets_session()
 
     def test_basic_operation(self):
         """
@@ -231,6 +224,8 @@ class TestMultiplePthread(TestCase):
         """
         Run after each test case.
         """
+        if len(self.send_sessions) != 0:
+            self.pkt.stop_send_pkt_bg(self.tester, self.send_sessions)
         self.dut.kill_all()
 
     def tear_down_all(self):
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite
  2019-12-17  0:11 [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite lihong
@ 2019-12-17  7:51 ` Zhu, WenhuiX
  2019-12-20  8:05 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhu, WenhuiX @ 2019-12-17  7:51 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

[-- Attachment #1: Type: text/plain, Size: 3239 bytes --]

Tested-by: Zhu, WenhuiX <wenhuix.zhu@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
Sent: Tuesday, December 17, 2019 8:11 AM
To: dts@dpdk.org
Cc: Ma, LihongX <lihongx.ma@intel.com>
Subject: [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite

Signed-off-by: lihong <lihongx.ma@intel.com>
---
 tests/TestSuite_multiple_pthread.py | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py
index b59f047..6c6a070 100644
--- a/tests/TestSuite_multiple_pthread.py
+++ b/tests/TestSuite_multiple_pthread.py
@@ -36,6 +36,7 @@ import random
 import string
 import utils
 from test_case import TestCase
+from packet import Packet
 
 
 class TestMultiplePthread(TestCase):
@@ -60,27 +61,19 @@ class TestMultiplePthread(TestCase):
         """
         Run before each test case.
         """
-        pass
-
-    def destroy_packets_session(self):
-        """
-        close send packets session.
-        """
-        for i in valports:
-            self.tester.create_session(name="%s" % i).send_expect("^C", "#")
-            self.tester.destroy_session(self.tester.create_session(name="%s" % i))
+        self.send_sessions = []
 
     def send_packet(self):
         """
-        create sessions and Send packets continuous.
+        Send packets continuous.
         """
         for index in valports:
             localPort = self.tester.get_local_port(index)
             iface = self.tester.get_interface(localPort)
-            self.send_packets_session = self.tester.create_session(name="%s" % index)
-            packet = r'sendp([Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")], iface="%s", loop=1)' % (index, iface)
-            self.send_packets_session.send_expect("scapy", ">>>")
-            self.send_packets_session.send_command(packet)
+            pcap_str = 'Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")' % (index)
+            self.pkt = Packet(pcap_str)
+            intf = self.pkt.send_pkt_bg(crb=self.tester, tx_port=iface)
+            self.send_sessions.append(intf)
 
     def get_cores_statistic(self, cmdline):
         """
@@ -91,6 +84,7 @@ class TestMultiplePthread(TestCase):
         m = cmdline.replace('"', '', 2)
         out_list = out.split(m)
         mutiple_pthread_session.send_expect("^C", "#")
+        self.dut.close_session(mutiple_pthread_session)
         return out_list
 
     def verify_before_send_packets(self, out_list):
@@ -159,7 +153,6 @@ class TestMultiplePthread(TestCase):
         # quit application
         self.dut.send_expect("stop", "testpmd> ")
         self.dut.send_expect("quit", "# ", 30)
-        self.destroy_packets_session()
 
     def test_basic_operation(self):
         """
@@ -231,6 +224,8 @@ class TestMultiplePthread(TestCase):
         """
         Run after each test case.
         """
+        if len(self.send_sessions) != 0:
+            self.pkt.stop_send_pkt_bg(self.tester, self.send_sessions)
         self.dut.kill_all()
 
     def tear_down_all(self):
-- 
2.7.4


[-- Attachment #2: TestMultiplePthread.log --]
[-- Type: application/octet-stream, Size: 22008 bytes --]

16/12/2019 13:03:40                            dts: 
TEST SUITE : TestMultiplePthread
16/12/2019 13:03:40                            dts: NIC :        fortpark_TLV
16/12/2019 13:03:41             dut.10.240.176.142: 
16/12/2019 13:03:41                         tester: 
16/12/2019 13:03:41            TestMultiplePthread: Test Case test_basic_operation Begin
16/12/2019 13:03:41             dut.10.240.176.142: 
16/12/2019 13:03:41                         tester: 
16/12/2019 13:03:41             dut.10.240.176.142: ./x86_64-native-linuxapp-gcc/app/testpmd --lcores="28@29,(33,34)@35" -n 4 -- -i
16/12/2019 13:03:50             dut.10.240.176.142: EAL: Detected 112 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: Probing VFIO support...
EAL: PCI device 0000:00:04.0 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.1 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.2 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.3 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.4 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.5 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.6 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.7 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:18:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:18:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:3d:00.0 on NUMA socket 0
EAL:   probe driver: 8086:37d2 net_i40e
EAL: PCI device 0000:3d:00.1 on NUMA socket 0
EAL:   probe driver: 8086:37d2 net_i40e
EAL: PCI device 0000:80:04.0 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.1 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.2 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.3 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.4 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.5 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.6 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.7 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:b1:00.0 on NUMA socket 1
EAL:   probe driver: 8086:37d0 net_i40e
EAL: PCI device 0000:b1:00.1 on NUMA socket 1
EAL:   probe driver: 8086:37d0 net_i40e
Interactive-mode selected
16/12/2019 13:03:55             dut.10.240.176.142: set corelist 33,34
16/12/2019 13:03:55             dut.10.240.176.142: set corelist 33,34
previous number of forwarding cores 1 - changed to number of configured cores 2
16/12/2019 13:03:55             dut.10.240.176.142: start
16/12/2019 13:03:55             dut.10.240.176.142: start
io packet forwarding - ports=2 - cores=2 - streams=2 - NUMA support enabled, MP allocation mode: native
Logical Core 33 (socket 1) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 1) -> TX P=1/Q=0 (socket 1) peer=02:00:00:00:00:01
Logical Core 34 (socket 1) forwards packets on 1 streams:
  RX P=1/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00

  io packet forwarding packets/burst=32
  nb forwarding cores=2 - nb forwarding ports=2
  port 0: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x10000
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x10000 - TX RS bit threshold=32
  port 1: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x10000
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x10000 - TX RS bit threshold=32
16/12/2019 13:03:55             dut.10.240.176.142: show config fwd
16/12/2019 13:03:55             dut.10.240.176.142: show config fwd
io packet forwarding - ports=2 - cores=2 - streams=2 - NUMA support enabled, MP allocation mode: native
Logical Core 33 (socket 1) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 1) -> TX P=1/Q=0 (socket 1) peer=02:00:00:00:00:01
Logical Core 34 (socket 1) forwards packets on 1 streams:
  RX P=1/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00

16/12/2019 13:03:55                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f0.pcap1576472635.88 root@10.240.176.167:/tmp/tester/
16/12/2019 13:03:57                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f0.cmd1576472635.88 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:03                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f1.pcap1576472643.24 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:04                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f1.cmd1576472643.24 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:15            TestMultiplePthread: 
+--------+--------+--------+------+
|  PID   |  TID   |  %CPU  | PSRF |
+========+========+========+======+
| 108223 | 108223 | 63.900 | 29   |
+--------+--------+--------+------+
| 108223 | 108224 | 6      | 0    |
+--------+--------+--------+------+
| 108223 | 108225 | 0      | 85   |
+--------+--------+--------+------+
| 108223 | 108226 | 0      | 35   |
+--------+--------+--------+------+
| 108223 | 108227 | 0      | 35   |
+--------+--------+--------+------+
| 108223 | 108223 | 26.300 | 29   |
+--------+--------+--------+------+
| 108223 | 108224 | 2.500  | 1    |
+--------+--------+--------+------+
| 108223 | 108225 | 0      | 85   |
+--------+--------+--------+------+
| 108223 | 108226 | 28.700 | 35   |
+--------+--------+--------+------+
| 108223 | 108227 | 28.600 | 35   |
+--------+--------+--------+------+
16/12/2019 13:04:15             dut.10.240.176.142: stop
16/12/2019 13:04:15             dut.10.240.176.142: stop
Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 23332          RX-dropped: 0             RX-total: 23332
  TX-packets: 5483           TX-dropped: 0             TX-total: 5483
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 5483           RX-dropped: 0             RX-total: 5483
  TX-packets: 23332          TX-dropped: 0             TX-total: 23332
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 28815          RX-dropped: 0             RX-total: 28815
  TX-packets: 28815          TX-dropped: 0             TX-total: 28815
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.
16/12/2019 13:04:15             dut.10.240.176.142: quit
16/12/2019 13:04:20             dut.10.240.176.142: quit

Stopping port 0...
Stopping ports...
Done

Stopping port 1...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
Done

Shutting down port 1...
Closing ports...
Done

Bye...
16/12/2019 13:04:20            TestMultiplePthread: Test Case test_basic_operation Result PASSED:
16/12/2019 13:04:20                         tester: ps -ef |grep /tmp/tester/scapy_ens224f0.cmd1576472635.88|grep -v grep
16/12/2019 13:04:20                         tester: root       478   408 59 13:04 pts/243  00:00:10 python /tmp/tester/scapy_ens224f0.cmd1576472635.88
16/12/2019 13:04:20                         tester: ps -ef |grep /tmp/tester/scapy_ens224f1.cmd1576472643.24|grep -v grep
16/12/2019 13:04:20                         tester: root       632   560 37 13:04 pts/245  00:00:04 python /tmp/tester/scapy_ens224f1.cmd1576472643.24
16/12/2019 13:04:20                         tester: kill -9 478 632
16/12/2019 13:04:20                         tester: 
16/12/2019 13:04:21             dut.10.240.176.142: kill_all: called by dut and has no prefix list.
16/12/2019 13:04:22            TestMultiplePthread: Test Case test_negative Begin
16/12/2019 13:04:22             dut.10.240.176.142: 
16/12/2019 13:04:22                         tester: 
16/12/2019 13:04:22             dut.10.240.176.142: ./x86_64-native-linuxapp-gcc/app/testpmd --lcores='(0,4-7)@(4,5-8-9)' -n 4 -- -i
16/12/2019 13:04:22             dut.10.240.176.142: EAL: Detected 112 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: invalid parameter for --lcores

Usage: ./x86_64-native-linuxapp-gcc/app/testpmd [options]

EAL common options:
  -c COREMASK         Hexadecimal bitmask of cores to run on
  -l CORELIST         List of cores to run on
                      The argument format is <c1>[-c2][,c3[-c4],...]
                      where c1, c2, etc are core indexes between 0 and 128
  --lcores COREMAP    Map lcore set to physical cpu set
                      The argument format is
                            '<lcores[@cpus]>[<,lcores[@cpus]>...]'
                      lcores and cpus list are grouped by '(' and ')'
                      Within the group, '-' is used for range separator,
                      ',' is used for single number separator.
                      '( )' can be omitted for single element group,
                      '@' can be omitted if cpus and lcores have the same value
  -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores
  --master-lcore ID   Core ID that is used as master
  --mbuf-pool-ops-name Pool ops name for mbuf to use
  -n CHANNELS         Number of memory channels
  -m MB               Memory to allocate (see also --socket-mem)
  -r RANKS            Force number of memory ranks (don't detect)
  -b, --pci-blacklist Add a PCI device in black list.
                      Prevent EAL from using this PCI device. The argument
                      format is <domain:bus:devid.func>.
  -w, --pci-whitelist Add a PCI device in white list.
                      Only use the specified PCI devices. The argument format
                      is <[domain:]bus:devid.func>. This option can be present
                      several times (once per device).
                      [NOTE: PCI whitelist cannot be used with -b option]
  --vdev              Add a virtual device.
                      The argument format is <driver><id>[,key=val,...]
                      (ex: --vdev=net_pcap0,iface=eth2).
  --iova-mode   Set IOVA mode. 'pa' for IOVA_PA
                      'va' for IOVA_VA
  -d LIB.so|DIR       Add a driver or driver directory
                      (can be used multiple times)
  --vmware-tsc-map    Use VMware TSC map instead of native RDTSC
  --proc-type         Type of this process (primary|secondary|auto)
  --syslog            Set syslog facility
  --log-level=<int>   Set global log level
  --log-level=<type-match>:<int>
                      Set specific log level
  -v                  Display version information on startup
  -h, --help          This help
  --in-memory   Operate entirely in memory. This will
                      disable secondary process support
  --base-virtaddr     Base virtual address

EAL options for DEBUG use only:
  --huge-unlink       Unlink hugepage files after init
  --no-huge           Use malloc instead of hugetlbfs
  --no-pci            Disable PCI
  --no-hpet           Disable HPET
  --no-shconf         No shared config (mmap'd files)

EAL Linux options:
  --socket-mem        Memory to allocate on sockets (comma separated values)
  --socket-limit      Limit memory allocation on sockets (comma separated values)
  --huge-dir          Directory where hugetlbfs is mounted
  --file-prefix       Prefix for hugepage filenames
  --create-uio-dev    Create /dev/uioX (usually done by hotplug)
  --vfio-intr         Interrupt mode for VFIO (legacy|msi|msix)
  --legacy-mem        Legacy memory mode (no dynamic allocation, contiguous segments)
  --single-file-segments Put all hugepage memory in single files
  --match-allocations Free hugepages exactly as allocated

EAL: FATAL: Invalid 'command line' arguments.
EAL: Invalid 'command line' arguments.
EAL: Error - exiting with code: 1
  Cause: Cannot init EAL: Invalid argument
16/12/2019 13:04:22            TestMultiplePthread: Test Case test_negative Result PASSED:
16/12/2019 13:04:22             dut.10.240.176.142: kill_all: called by dut and has no prefix list.
16/12/2019 13:04:23            TestMultiplePthread: Test Case test_positive Begin
16/12/2019 13:04:23             dut.10.240.176.142:  
16/12/2019 13:04:23                         tester: 
16/12/2019 13:04:23             dut.10.240.176.142: ./x86_64-native-linuxapp-gcc/app/testpmd --lcores="28@29,(30,31)@(32,33,34,35)" -n 4 -- -i
16/12/2019 13:04:32             dut.10.240.176.142: EAL: Detected 112 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: Probing VFIO support...
EAL: PCI device 0000:00:04.0 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.1 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.2 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.3 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.4 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.5 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.6 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:00:04.7 on NUMA socket 0
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:18:00.0 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:18:00.1 on NUMA socket 0
EAL:   probe driver: 8086:10fb net_ixgbe
EAL: PCI device 0000:3d:00.0 on NUMA socket 0
EAL:   probe driver: 8086:37d2 net_i40e
EAL: PCI device 0000:3d:00.1 on NUMA socket 0
EAL:   probe driver: 8086:37d2 net_i40e
EAL: PCI device 0000:80:04.0 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.1 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.2 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.3 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.4 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.5 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.6 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:80:04.7 on NUMA socket 1
EAL:   probe driver: 8086:2021 rawdev_ioat
EAL: PCI device 0000:b1:00.0 on NUMA socket 1
EAL:   probe driver: 8086:37d0 net_i40e
EAL: PCI device 0000:b1:00.1 on NUMA socket 1
EAL:   probe driver: 8086:37d0 net_i40e
Interactive-mode selected
16/12/2019 13:04:37             dut.10.240.176.142: set corelist 30,31
16/12/2019 13:04:37             dut.10.240.176.142: set corelist 30,31
previous number of forwarding cores 1 - changed to number of configured cores 2
16/12/2019 13:04:37             dut.10.240.176.142: start
16/12/2019 13:04:37             dut.10.240.176.142: start
io packet forwarding - ports=2 - cores=2 - streams=2 - NUMA support enabled, MP allocation mode: native
Logical Core 30 (socket 1) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 1) -> TX P=1/Q=0 (socket 1) peer=02:00:00:00:00:01
Logical Core 31 (socket 1) forwards packets on 1 streams:
  RX P=1/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00

  io packet forwarding packets/burst=32
  nb forwarding cores=2 - nb forwarding ports=2
  port 0: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x10000
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x10000 - TX RS bit threshold=32
  port 1: RX queue number: 1 Tx queue number: 1
    Rx offloads=0x0 Tx offloads=0x10000
    RX queue: 0
      RX desc=256 - RX free threshold=32
      RX threshold registers: pthresh=8 hthresh=8  wthresh=0
      RX Offloads=0x0
    TX queue: 0
      TX desc=256 - TX free threshold=32
      TX threshold registers: pthresh=32 hthresh=0  wthresh=0
      TX offloads=0x10000 - TX RS bit threshold=32
16/12/2019 13:04:37             dut.10.240.176.142: show config fwd
16/12/2019 13:04:37             dut.10.240.176.142: show config fwd
io packet forwarding - ports=2 - cores=2 - streams=2 - NUMA support enabled, MP allocation mode: native
Logical Core 30 (socket 1) forwards packets on 1 streams:
  RX P=0/Q=0 (socket 1) -> TX P=1/Q=0 (socket 1) peer=02:00:00:00:00:01
Logical Core 31 (socket 1) forwards packets on 1 streams:
  RX P=1/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00

16/12/2019 13:04:37                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f0.pcap1576472677.98 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:39                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f0.cmd1576472677.98 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:45                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f1.pcap1576472685.34 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:46                         tester: scp -v /home/autoregression/dts/output/tmp/pcap/scapy_ens224f1.cmd1576472685.34 root@10.240.176.167:/tmp/tester/
16/12/2019 13:04:57            TestMultiplePthread: 
+--------+--------+--------+------+
|  PID   |  TID   |  %CPU  | PSRF |
+========+========+========+======+
| 108461 | 108461 | 64     | 29   |
+--------+--------+--------+------+
| 108461 | 108462 | 9.800  | 85   |
+--------+--------+--------+------+
| 108461 | 108463 | 0      | 60   |
+--------+--------+--------+------+
| 108461 | 108464 | 0      | 32   |
+--------+--------+--------+------+
| 108461 | 108465 | 0      | 32   |
+--------+--------+--------+------+
| 108461 | 108461 | 26.400 | 29   |
+--------+--------+--------+------+
| 108461 | 108462 | 4.100  | 85   |
+--------+--------+--------+------+
| 108461 | 108463 | 0      | 60   |
+--------+--------+--------+------+
| 108461 | 108464 | 57.500 | 32   |
+--------+--------+--------+------+
| 108461 | 108465 | 57.500 | 33   |
+--------+--------+--------+------+
16/12/2019 13:04:57             dut.10.240.176.142: stop
16/12/2019 13:04:58             dut.10.240.176.142: stop
Telling cores to stop...
Waiting for lcores to finish...

  ---------------------- Forward statistics for port 0  ----------------------
  RX-packets: 22915          RX-dropped: 0             RX-total: 22915
  TX-packets: 5549           TX-dropped: 0             TX-total: 5549
  ----------------------------------------------------------------------------

  ---------------------- Forward statistics for port 1  ----------------------
  RX-packets: 5549           RX-dropped: 0             RX-total: 5549
  TX-packets: 22915          TX-dropped: 0             TX-total: 22915
  ----------------------------------------------------------------------------

  +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
  RX-packets: 28464          RX-dropped: 0             RX-total: 28464
  TX-packets: 28464          TX-dropped: 0             TX-total: 28464
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Done.
16/12/2019 13:04:58             dut.10.240.176.142: quit
16/12/2019 13:05:02             dut.10.240.176.142: quit

Stopping port 0...
Stopping ports...
Done

Stopping port 1...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
Done

Shutting down port 1...
Closing ports...
Done

Bye...
16/12/2019 13:05:02            TestMultiplePthread: Test Case test_positive Result PASSED:
16/12/2019 13:05:02                         tester: ps -ef |grep /tmp/tester/scapy_ens224f0.cmd1576472677.98|grep -v grep
16/12/2019 13:05:02                         tester: root       768   702 59 13:04 pts/243  00:00:10 python /tmp/tester/scapy_ens224f0.cmd1576472677.98
16/12/2019 13:05:02                         tester: ps -ef |grep /tmp/tester/scapy_ens224f1.cmd1576472685.34|grep -v grep
16/12/2019 13:05:02                         tester: root       912   832 40 13:04 pts/247  00:00:04 python /tmp/tester/scapy_ens224f1.cmd1576472685.34
16/12/2019 13:05:02                         tester: kill -9 768 912
16/12/2019 13:05:02                         tester: 
16/12/2019 13:05:03             dut.10.240.176.142: kill_all: called by dut and has no prefix list.
16/12/2019 13:05:04                            dts: 
TEST SUITE ENDED: TestMultiplePthread

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite
  2019-12-17  0:11 [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite lihong
  2019-12-17  7:51 ` Zhu, WenhuiX
@ 2019-12-20  8:05 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2019-12-20  8:05 UTC (permalink / raw)
  To: Ma, LihongX, dts; +Cc: Ma, LihongX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong
> Sent: Tuesday, December 17, 2019 8:11 AM
> To: dts@dpdk.org
> Cc: Ma, LihongX <lihongx.ma@intel.com>
> Subject: [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send
> pkts after this suite
> 
> Signed-off-by: lihong <lihongx.ma@intel.com>
> ---
>  tests/TestSuite_multiple_pthread.py | 25 ++++++++++---------------
>  1 file changed, 10 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/TestSuite_multiple_pthread.py
> b/tests/TestSuite_multiple_pthread.py
> index b59f047..6c6a070 100644
> --- a/tests/TestSuite_multiple_pthread.py
> +++ b/tests/TestSuite_multiple_pthread.py
> @@ -36,6 +36,7 @@ import random
>  import string
>  import utils
>  from test_case import TestCase
> +from packet import Packet
> 
> 
>  class TestMultiplePthread(TestCase):
> @@ -60,27 +61,19 @@ class TestMultiplePthread(TestCase):
>          """
>          Run before each test case.
>          """
> -        pass
> -
> -    def destroy_packets_session(self):
> -        """
> -        close send packets session.
> -        """
> -        for i in valports:
> -            self.tester.create_session(name="%s" % i).send_expect("^C", "#")
> -            self.tester.destroy_session(self.tester.create_session(name="%s" % i))
> +        self.send_sessions = []
> 
>      def send_packet(self):
>          """
> -        create sessions and Send packets continuous.
> +        Send packets continuous.
>          """
>          for index in valports:
>              localPort = self.tester.get_local_port(index)
>              iface = self.tester.get_interface(localPort)
> -            self.send_packets_session = self.tester.create_session(name="%s" %
> index)
> -            packet = r'sendp([Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")],
> iface="%s", loop=1)' % (index, iface)
> -            self.send_packets_session.send_expect("scapy", ">>>")
> -            self.send_packets_session.send_command(packet)
> +            pcap_str = 'Ether()/IP(src="1.2.3.4", dst="192.168.0.%d")' % (index)
> +            self.pkt = Packet(pcap_str)
> +            intf = self.pkt.send_pkt_bg(crb=self.tester, tx_port=iface)
> +            self.send_sessions.append(intf)
> 
>      def get_cores_statistic(self, cmdline):
>          """
> @@ -91,6 +84,7 @@ class TestMultiplePthread(TestCase):
>          m = cmdline.replace('"', '', 2)
>          out_list = out.split(m)
>          mutiple_pthread_session.send_expect("^C", "#")
> +        self.dut.close_session(mutiple_pthread_session)
>          return out_list
> 
>      def verify_before_send_packets(self, out_list):
> @@ -159,7 +153,6 @@ class TestMultiplePthread(TestCase):
>          # quit application
>          self.dut.send_expect("stop", "testpmd> ")
>          self.dut.send_expect("quit", "# ", 30)
> -        self.destroy_packets_session()
> 
>      def test_basic_operation(self):
>          """
> @@ -231,6 +224,8 @@ class TestMultiplePthread(TestCase):
>          """
>          Run after each test case.
>          """
> +        if len(self.send_sessions) != 0:
> +            self.pkt.stop_send_pkt_bg(self.tester, self.send_sessions)
>          self.dut.kill_all()
> 
>      def tear_down_all(self):
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-20  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17  0:11 [dts] [PATCH V1] tests/multiple_pthread: fix issue of always send pkts after this suite lihong
2019-12-17  7:51 ` Zhu, WenhuiX
2019-12-20  8:05 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).