test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ling Wei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Ling Wei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue
Date: Mon, 22 Feb 2021 15:31:13 +0800	[thread overview]
Message-ID: <20210222073113.5927-1-weix.ling@intel.com> (raw)

1.Fix send packet count wrong issue.
2.After send packet from testpmd, execute 'stop' and 'port stop all' 
command to make sure all packets can be received.
3.Insmod igb_uio before bind to make sure bind normally.

Signed-off-by: Ling Wei <weix.ling@intel.com>
---
 tests/TestSuite_vm2vm_virtio_user.py | 42 +++++++++++++++++-----------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py
index 815afbdd..accec6f9 100644
--- a/tests/TestSuite_vm2vm_virtio_user.py
+++ b/tests/TestSuite_vm2vm_virtio_user.py
@@ -671,9 +671,9 @@ class TestVM2VMVirtioUser(TestCase):
         self.cbdma_nic_dev_num = 4
         self.bind_nic_driver(self.dut_ports)
         self.get_cbdma_ports_info_and_bind_to_dpdk()
-        small_pkts_num = 512
+        total_pkts_num = 566
         large_8k_pkts_num = 502
-        large_2k_pkts_num = 10
+        large_2k_pkts_num = 64
         self.queue_num=2
         self.nopci=False
         path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=1'
@@ -687,16 +687,20 @@ class TestVM2VMVirtioUser(TestCase):
 
         self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)
         self.send_8k_pkt()
-        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num,
+        self.vhost_user_pmd.execute_cmd('stop')
+        self.vhost_user_pmd.execute_cmd('port stop all')
+        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num,
                                                    large_2k_pkts_num)
         # get dump pcap file of vhost
         self.logger.info('check pcap file info about vhost')
-        small_pkts_num = 512
+        total_pkts_num = 566
         large_8k_pkts_num = 54
-        large_2k_pkts_num = 458
+        large_2k_pkts_num = 512
         self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)
         self.send_multiple_pkt()
-        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
+        self.vhost_user_pmd.execute_cmd('stop')
+        self.vhost_user_pmd.execute_cmd('port stop all')
+        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
 
         self.logger.info('diff the pcap file of vhost and virtio')
 
@@ -708,9 +712,9 @@ class TestVM2VMVirtioUser(TestCase):
         self.cbdma_nic_dev_num = 4
         self.bind_nic_driver(self.dut_ports)
         self.get_cbdma_ports_info_and_bind_to_dpdk()
-        small_pkts_num = 448
+        total_pkts_num = 502
         large_8k_pkts_num = 54
-        large_2k_pkts_num = 394
+        large_2k_pkts_num = 448
         self.queue_num=2
         self.nopci=False
         path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=0'
@@ -723,20 +727,25 @@ class TestVM2VMVirtioUser(TestCase):
                 f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}],dmathr=512'"
 
         self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)
-        self.send_multiple_pkt_with_8k54_2k394()
-        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
+        # self.send_multiple_pkt_with_8k54_2k394()
+        self.send_multiple_pkt_with_8k54_2k448()
+        self.vhost_user_pmd.execute_cmd('stop')
+        self.vhost_user_pmd.execute_cmd('port stop all')
+        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
         # get dump pcap file of vhost
         self.logger.info('check pcap file info about vhost')
-        small_pkts_num = 448
-        large_8k_pkts_num = 448
+        total_pkts_num = 502
+        large_8k_pkts_num = 502
         large_2k_pkts_num = 0
         self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)
-        self.send_multiple_pkt_with_8k448()
-        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
+        self.send_multiple_pkt_with_8k502()
+        self.vhost_user_pmd.execute_cmd('stop')
+        self.vhost_user_pmd.execute_cmd('port stop all')
+        self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)
 
         self.logger.info('diff the pcap file of vhost and virtio')
 
-    def send_multiple_pkt_with_8k54_2k394(self):
+    def send_multiple_pkt_with_8k54_2k448(self):
         self.virtio_user0_pmd.execute_cmd('set burst 1')
         self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')
         self.virtio_user0_pmd.execute_cmd('start tx_first 27')
@@ -746,7 +755,7 @@ class TestVM2VMVirtioUser(TestCase):
         self.virtio_user0_pmd.execute_cmd('start tx_first 7')
         self.vhost_user_pmd.execute_cmd('start')
 
-    def send_multiple_pkt_with_8k448(self):
+    def send_multiple_pkt_with_8k502(self):
         self.virtio_user0_pmd.execute_cmd('set burst 1')
         self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')
         self.virtio_user0_pmd.execute_cmd('start tx_first 27')
@@ -804,4 +813,5 @@ class TestVM2VMVirtioUser(TestCase):
                     self.cbdma_dev_infos.append(pci_info.group(1))
         self.verify(len(self.cbdma_dev_infos) >= 8, 'There no enough cbdma device to run this suite')
         self.device_str = ' '.join(self.cbdma_dev_infos[0:self.cbdma_nic_dev_num])
+        self.dut.setup_modules(self.target, "igb_uio", "None")
         self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=igb_uio %s' % self.device_str, '# ', 60)
-- 
2.25.1


             reply	other threads:[~2021-02-22  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22  7:31 Ling Wei [this message]
2021-02-22  7:36 ` Ling, WeiX
2021-02-23  6:41   ` Wang, Yinan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210222073113.5927-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).