test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue
@ 2021-02-22  7:31 Ling Wei
  2021-02-22  7:36 ` Ling, WeiX
  0 siblings, 1 reply; 3+ messages in thread
From: Ling Wei @ 2021-02-22  7:31 UTC (permalink / raw)
  To: dts; +Cc: Ling Wei

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


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

* Re: [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue
  2021-02-22  7:31 [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue Ling Wei
@ 2021-02-22  7:36 ` Ling, WeiX
  2021-02-23  6:41   ` Wang, Yinan
  0 siblings, 1 reply; 3+ messages in thread
From: Ling, WeiX @ 2021-02-22  7:36 UTC (permalink / raw)
  To: dts

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

Tested-by: Wei Ling <weix.ling@intel.com>

Regards,
Ling Wei

> -----Original Message-----
> From: Ling, WeiX <weix.ling@intel.com>
> Sent: Monday, February 22, 2021 03:31 PM
> To: dts@dpdk.org
> Cc: Ling, WeiX <weix.ling@intel.com>
> Subject: [dts][PATCH V1] tests/vm2vm_virtio_user:fix send packet count
> wrong issue


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

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

* Re: [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue
  2021-02-22  7:36 ` Ling, WeiX
@ 2021-02-23  6:41   ` Wang, Yinan
  0 siblings, 0 replies; 3+ messages in thread
From: Wang, Yinan @ 2021-02-23  6:41 UTC (permalink / raw)
  To: Ling, WeiX, dts

Acked-by: Wang, Yinan <yinan.wang@intel.com>

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Ling, WeiX
> Sent: 2021?2?22? 15:36
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count
> wrong issue
> 
> Tested-by: Wei Ling <weix.ling@intel.com>
> 
> Regards,
> Ling Wei
> 
> > -----Original Message-----
> > From: Ling, WeiX <weix.ling@intel.com>
> > Sent: Monday, February 22, 2021 03:31 PM
> > To: dts@dpdk.org
> > Cc: Ling, WeiX <weix.ling@intel.com>
> > Subject: [dts][PATCH V1] tests/vm2vm_virtio_user:fix send packet count
> > wrong issue


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

end of thread, other threads:[~2021-02-23  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  7:31 [dts] [PATCH V1] tests/vm2vm_virtio_user:fix send packet count wrong issue Ling Wei
2021-02-22  7:36 ` Ling, WeiX
2021-02-23  6:41   ` Wang, Yinan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git