From: lingwei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: lingwei <weix.ling@intel.com>
Subject: [dts] [PATCH V2] tests/vm2vm_virtio_user:sync CBDMA case code with test plan
Date: Wed, 16 Dec 2020 01:58:52 +0800 [thread overview]
Message-ID: <20201215175852.42904-1-weix.ling@intel.com> (raw)
V1:sync CBDMA case code with test plan
V2:fix code issue
Signed-off-by: lingwei <weix.ling@intel.com>
---
tests/TestSuite_vm2vm_virtio_user.py | 30 ++++++++++++++--------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py
index 910552c0..815afbdd 100644
--- a/tests/TestSuite_vm2vm_virtio_user.py
+++ b/tests/TestSuite_vm2vm_virtio_user.py
@@ -132,8 +132,8 @@ class TestVM2VMVirtioUser(TestCase):
launch the testpmd as virtio with vhost_net0
and start to send 251 small packets with diff burst
"""
- eal_params = ' --socket-mem {} --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,' \
- '{},queue_size={} '.format(self.socket_mem, path_mode, ringsize)
+ eal_params = ' --socket-mem {} --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues={},' \
+ '{},queue_size={} '.format(self.socket_mem, self.queue_num, path_mode, ringsize)
if self.check_2M_env:
eal_params += " --single-file-segments"
if 'vectorized_path' in self.running_case:
@@ -152,8 +152,8 @@ class TestVM2VMVirtioUser(TestCase):
launch the testpmd as virtio with vhost_net0
and start to send 251 small packets with diff burst
"""
- eal_params = ' --socket-mem {} --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,' \
- 'queues={},{},queue_size={} '.format(self.socket_mem, self.queue_num, path_mode, ringsize)
+ eal_params = ' --socket-mem {} --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues={},' \
+ '{},queue_size={} '.format(self.socket_mem, self.queue_num, path_mode, ringsize)
if self.check_2M_env:
eal_params += " --single-file-segments "
params = "--nb-cores=1 --txd={} --rxd={} {}".format(ringsize, ringsize, extern_params)
@@ -189,7 +189,7 @@ class TestVM2VMVirtioUser(TestCase):
self.verify(large_2k_pkts_num == actual_2k_pkt_num, f"2K packet quantity error,expected value:{large_2k_pkts_num}"
f", actual value : {actual_2k_pkt_num}")
- def get_dump_file_of_virtio_user_cbdma(self, path_mode, extern_param, ringsize, vdevs=None, no_pci=False):
+ def get_dump_file_of_virtio_user_cbdma(self, path_mode, extern_param, ringsize, vdevs=None, no_pci=True):
dump_port = 'device_id=net_virtio_user1'
self.launch_vhost_testpmd(vdev_num=2, vdevs=vdevs, no_pci=no_pci)
self.start_virtio_testpmd_with_vhost_net1(path_mode, extern_param, ringsize)
@@ -676,16 +676,16 @@ class TestVM2VMVirtioUser(TestCase):
large_2k_pkts_num = 10
self.queue_num=2
self.nopci=False
- path_mode = 'packed_vq=0,mrg_rxbuf=1,in_order=1,server=0'
+ path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=1'
ringsize = 4096
extern_params = '--rxq=2 --txq=2'
# get dump pcap file of virtio
# the virtio0 will send 283 pkts, but the virtio only will received 252 pkts
self.logger.info('check pcap file info about virtio')
- vdevs = f"--vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=0,dmas=[txq0@{self.cbdma_dev_infos[0]};txq1@{self.cbdma_dev_infos[1]}],dmathr=512' " \
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=0,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}],dmathr=512'"
+ vdevs = f"--vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[0]};txq1@{self.cbdma_dev_infos[1]}],dmathr=512' " \
+ 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)
+ 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,
large_2k_pkts_num)
@@ -694,7 +694,7 @@ class TestVM2VMVirtioUser(TestCase):
small_pkts_num = 512
large_8k_pkts_num = 54
large_2k_pkts_num = 458
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs)
+ 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)
@@ -713,16 +713,16 @@ class TestVM2VMVirtioUser(TestCase):
large_2k_pkts_num = 394
self.queue_num=2
self.nopci=False
- path_mode = 'packed_vq=0,mrg_rxbuf=1,in_order=0,server=0'
+ path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=0'
ringsize = 4096
extern_params = '--rxq=2 --txq=2'
# get dump pcap file of virtio
# the virtio0 will send 283 pkts, but the virtio only will received 252 pkts
self.logger.info('check pcap file info about virtio')
- vdevs = f"--vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=0,dmas=[txq0@{self.cbdma_dev_infos[0]};txq1@{self.cbdma_dev_infos[1]}],dmathr=512' " \
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=0,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}],dmathr=512'"
+ vdevs = f"--vdev 'eth_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[0]};txq1@{self.cbdma_dev_infos[1]}],dmathr=512' " \
+ 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)
+ 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)
# get dump pcap file of vhost
@@ -730,7 +730,7 @@ class TestVM2VMVirtioUser(TestCase):
small_pkts_num = 448
large_8k_pkts_num = 448
large_2k_pkts_num = 0
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs)
+ 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)
--
2.17.1
next reply other threads:[~2020-12-15 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 17:58 lingwei [this message]
2020-12-15 10:05 ` Ling, WeiX
2020-12-21 7:50 ` Tu, Lijuan
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=20201215175852.42904-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).