From: Wei Ling <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Wei Ling <weix.ling@intel.com>
Subject: [dts][PATCH V1 2/5] tests/vm2vm_virtio_user: delete case 12-23 and useless code
Date: Sat, 2 Apr 2022 14:34:14 +0800 [thread overview]
Message-ID: <20220402063414.474820-1-weix.ling@intel.com> (raw)
As commit 53d3f4778c(vhost: integrate dmadev in asynchronous data-path),
delete cbdma related case 12-23 form tests/vm2vm_virtio_user_test_plan.
Signed-off-by: Wei Ling <weix.ling@intel.com>
---
tests/TestSuite_vm2vm_virtio_user.py | 867 +--------------------------
1 file changed, 13 insertions(+), 854 deletions(-)
diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py
index 1e4969cb..7379df03 100644
--- a/tests/TestSuite_vm2vm_virtio_user.py
+++ b/tests/TestSuite_vm2vm_virtio_user.py
@@ -57,9 +57,6 @@ class TestVM2VMVirtioUser(TestCase):
self.virtio_prefix_1 = "virtio1"
socket_num = len(set([int(core["socket"]) for core in self.dut.cores]))
self.socket_mem = ",".join(["1024"] * socket_num)
- self.get_core_list()
- self.rebuild_flag = False
- self.app_pdump = self.dut.apps_name["pdump"]
self.dut_ports = self.dut.get_ports()
self.cbdma_dev_infos = []
self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
@@ -71,8 +68,13 @@ class TestVM2VMVirtioUser(TestCase):
self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user)
self.virtio_user0_pmd = PmdOutput(self.dut, self.virtio_user0)
self.virtio_user1_pmd = PmdOutput(self.dut, self.virtio_user1)
- self.dut.restore_interfaces()
self.dump_port = "device_id=net_virtio_user1"
+ self.app_pdump = self.dut.apps_name["pdump"]
+ self.testpmd_name = self.dut.apps_name['test-pmd'].split("/")[-1]
+ self.cores_list = self.dut.get_core_list("all", socket=self.ports_socket)
+ self.core_list_vhost = self.cores_list[0:2]
+ self.core_list_virtio0 = self.cores_list[2:4]
+ self.core_list_virtio1 = self.cores_list[4:6]
def set_up(self):
"""
@@ -83,19 +85,7 @@ class TestVM2VMVirtioUser(TestCase):
self.dut.send_expect("rm -rf ./vhost-net*", "#")
self.dut.send_expect("rm -rf %s" % self.dump_virtio_pcap, "#")
self.dut.send_expect("rm -rf %s" % self.dump_vhost_pcap, "#")
-
- def get_core_list(self):
- """
- create core mask
- """
- self.core_config = "1S/6C/1T"
- self.cores_list = self.dut.get_core_list(self.core_config)
- self.verify(
- len(self.cores_list) >= 6, "There no enough cores to run this suite"
- )
- self.core_list_vhost = self.cores_list[0:2]
- self.core_list_virtio0 = self.cores_list[2:4]
- self.core_list_virtio1 = self.cores_list[4:6]
+ self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
def launch_vhost_testpmd(
self, vdev_num, fixed_prefix=False, fwd_mode="io", vdevs=None, no_pci=True
@@ -123,25 +113,6 @@ class TestVM2VMVirtioUser(TestCase):
)
self.vhost_user_pmd.execute_cmd("set fwd %s" % fwd_mode)
- def lanuch_vhost_testpmd_with_cbdma(self, vdevs=None, iova="va"):
- """
- start testpmd with cbdma
- """
- eal_params = vdevs + " --iova={}".format(iova)
- param = "--nb-cores=1 --rxq={} --txq={} --txd={} --rxd={} --no-flush-rx".format(
- self.queue_num, self.queue_num, self.txd_num, self.txd_num
- )
- self.vhost_user_pmd.start_testpmd(
- cores=self.core_list_vhost,
- param=param,
- no_pci=False,
- ports=[],
- eal_param=eal_params,
- prefix="vhost",
- fixed_prefix=True,
- )
- self.vhost_user_pmd.execute_cmd("vhost enable tx all")
-
@property
def check_2M_env(self):
out = self.dut.send_expect(
@@ -211,35 +182,6 @@ class TestVM2VMVirtioUser(TestCase):
self.virtio_user0_pmd.execute_cmd("set burst 32")
self.virtio_user0_pmd.execute_cmd("start tx_first 7")
- def start_virtio_testpmd_with_vhost_net0_cbdma(
- self, path_mode, extern_params, ringsize
- ):
- """
- launch the testpmd as virtio with vhost_net0
- """
- 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:
- eal_params += " --force-max-simd-bitwidth=512"
- params = "--nb-cores=1 --txd={} --rxd={} {}".format(
- ringsize, ringsize, extern_params
- )
- self.virtio_user0_pmd.start_testpmd(
- cores=self.core_list_virtio0,
- param=params,
- eal_param=eal_params,
- no_pci=True,
- ports=[],
- prefix=self.virtio_prefix_0,
- fixed_prefix=True,
- )
-
def check_packet_payload_valid_with_cbdma(
self,
filename,
@@ -302,18 +244,7 @@ class TestVM2VMVirtioUser(TestCase):
f", actual value : {actual_8k_pkt_num}",
)
- def get_dump_file_of_virtio_user_cbdma(self, path_mode, extern_param, ringsize):
-
- self.lanuch_vhost_testpmd_with_cbdma(vdevs=self.vdevs)
- self.start_virtio_testpmd_with_vhost_net1(path_mode, extern_param, ringsize)
- self.launch_pdump_to_capture_pkt(
- self.dump_port, self.virtio_prefix_1, self.dump_virtio_pcap
- )
- self.start_virtio_testpmd_with_vhost_net0_cbdma(
- path_mode, extern_param, ringsize
- )
-
- def send_32_2k_pkts_from_virtio0(self):
+ def send_32_2k_pkts(self):
"""
send 32 2k length packets from virtio_user0 testpmd
"""
@@ -563,7 +494,7 @@ class TestVM2VMVirtioUser(TestCase):
# then resend 32 large pkts, all will received
self.logger.info("check pcap file info about virtio")
self.get_dump_file_of_virtio_user(path_mode, extern_params, ringsize)
- self.send_32_2k_pkts_from_virtio0()
+ self.send_32_2k_pkts()
self.check_packet_payload_valid(
self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num
)
@@ -571,7 +502,7 @@ class TestVM2VMVirtioUser(TestCase):
# get dump pcap file of vhost
self.logger.info("check pcap file info about vhost")
self.get_dump_file_of_vhost_user(path_mode, extern_params, ringsize)
- self.send_32_2k_pkts_from_virtio0()
+ self.send_32_2k_pkts()
self.check_packet_payload_valid(
self.dump_vhost_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num
)
@@ -747,7 +678,7 @@ class TestVM2VMVirtioUser(TestCase):
# then virtio send 32 large pkts, the virtio will all received
self.logger.info("check pcap file info about virtio")
self.get_dump_file_of_virtio_user(path_mode, extern_params, ringsize)
- self.send_32_2k_pkts_from_virtio0()
+ self.send_32_2k_pkts()
self.check_packet_payload_valid(
self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num
)
@@ -755,7 +686,7 @@ class TestVM2VMVirtioUser(TestCase):
# get dump pcap file of vhost
self.logger.info("check pcap file info about vhost")
self.get_dump_file_of_vhost_user(path_mode, extern_params, ringsize)
- self.send_32_2k_pkts_from_virtio0()
+ self.send_32_2k_pkts()
self.check_packet_payload_valid(
self.dump_vhost_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num
)
@@ -881,781 +812,11 @@ class TestVM2VMVirtioUser(TestCase):
self.logger.info("diff the pcap file of vhost and virtio")
self.check_vhost_and_virtio_pkts_content()
- def get_cbdma_ports_info_and_bind_to_dpdk(self):
- """
- get all cbdma ports
- """
- out = self.dut.send_expect(
- "./usertools/dpdk-devbind.py --status-dev dma", "# ", 30
- )
- device_info = out.split("\n")
- for device in device_info:
- pci_info = re.search("\s*(0000:\S*:\d*.\d*)", device)
- if pci_info is not None:
- dev_info = pci_info.group(1)
- # the numa id of ioat dev, only add the device which
- # on same socket with nic dev
- bus = int(dev_info[5:7], base=16)
- if bus >= 128:
- cur_socket = 1
- else:
- cur_socket = 0
- if self.ports_socket == cur_socket:
- 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.send_expect(
- "./usertools/dpdk-devbind.py --force --bind=%s %s"
- % (self.drivername, self.device_str),
- "# ",
- 60,
- )
-
- def bind_cbdma_device_to_kernel(self):
- if self.device_str is not None:
- self.dut.send_expect("modprobe ioatdma", "# ")
- self.dut.send_expect(
- "./usertools/dpdk-devbind.py -u %s" % self.device_str, "# ", 30
- )
- self.dut.send_expect(
- "./usertools/dpdk-devbind.py --force --bind=ioatdma %s"
- % self.device_str,
- "# ",
- 60,
- )
-
- def relanuch_vhost_testpmd_iova_pa(self):
-
- self.vhost_user_pmd.execute_cmd("quit", "#", 60)
- self.virtio_user1_pmd.execute_cmd("stop")
- self.virtio_user1_pmd.execute_cmd("clear port stats all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats 0")
- self.verify("RX-packets: 0" in out, "expect: virtio-user1 RX-packets is 0 ")
- self.virtio_user1_pmd.execute_cmd("start")
- self.lanuch_vhost_testpmd_with_cbdma(vdevs=self.vdevs, iova="pa")
- self.launch_pdump_to_capture_pkt(
- self.dump_port, self.virtio_prefix_1, self.dump_virtio_pcap
- )
-
- def relanuch_vhost_iova_pa_and_virtio(self, path_mode, extern_param, ringsize):
-
- self.quit_all_testpmd()
- self.lanuch_vhost_testpmd_with_cbdma(vdevs=self.vdevs, iova="pa")
- self.start_virtio_testpmd_with_vhost_net1(path_mode, extern_param, ringsize)
- self.launch_pdump_to_capture_pkt(
- self.dump_port, self.virtio_prefix_1, self.dump_virtio_pcap
- )
- self.start_virtio_testpmd_with_vhost_net0_cbdma(
- path_mode, extern_param, ringsize
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_non_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 12: split virtqueue vm2vm non-mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- pkts_64_num = 64
- pkts_960_num = 502
- total_pkts_num = pkts_64_num + pkts_960_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=0,in_order=0"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2 --enable-hw-vlan-strip "
- # get dump pcap file of virtio
- # the virtio0 will send imix small pkts
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_251_960byte_and_32_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 566" in out and "RX-bytes: 486016" in out,
- "expect: virtio-user1 RX-packets is 566 and RX-bytes is 486016",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap, total_pkts_num, pkts_64_num, pkts_960_num
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_251_960byte_and_32_64byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 566" in out and "RX-bytes: 486016" in out,
- "expect: virtio-user1 RX-packets is 566 and RX-bytes is 486016",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap, total_pkts_num, pkts_64_num, pkts_960_num
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 13: split virtqueue vm2vm mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 54
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=1,in_order=0"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_27_4640byte_and_224_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_27_4640byte_and_224_64byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_inorder_non_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 14: split virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 0
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=0,in_order=1"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_27_4640byte_and_224_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_27_4640byte_and_224_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_vectorized_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 15: split virtqueue vm2vm vectorized path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 0
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=0,in_order=0,vectorized=1"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_224_64byte_and_27_4640byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_inorder_mergeable_path_test_non_indirect_desc_with_cbdma(
- self,
- ):
- """
- Test Case 16: split virtqueue vm2vm inorder mergeable path test non-indirect descriptor with cbdma enable
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_8k_pkts_num = 2
- large_64_pkts_num = 502
- total_pkts_num = large_8k_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 256
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=1,in_order=1"
- ringsize = 256
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_251_64_and_32_8k_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 504" in out and "RX-bytes: 48128" in out,
- "expect: virtio-user1 RX-packets is 504 and RX-bytes is 48128",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_8k_num=large_8k_pkts_num,
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa and virtio")
- self.relanuch_vhost_iova_pa_and_virtio(path_mode, extern_params, ringsize)
- self.send_251_64_and_32_8k_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 504" in out and "RX-bytes: 48128" in out,
- "expect: virtio-user1 RX-packets is 504 and RX-bytes is 48128",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_8k_num=large_8k_pkts_num,
- )
-
- def test_vm2vm_virtio_user_split_virtqueue_mergeable_path_test_indirect_desc_with_cbdma(
- self,
- ):
- """
- Test Case 17: split virtqueue vm2vm mergeable path test indirect descriptor with cbdma enable
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_8k_pkts_num = 10
- large_64_pkts_num = 502
- total_pkts_num = large_8k_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 256
- path_mode = "server=1,packed_vq=0,mrg_rxbuf=1,in_order=0"
- ringsize = 256
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_251_64_and_32_8k_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 512" in out and "RX-bytes: 112128" in out,
- "expect: virtio-user1 RX-packets is 512 and RX-bytes is 112128",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_8k_num=large_8k_pkts_num,
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa and virtio")
- self.relanuch_vhost_iova_pa_and_virtio(path_mode, extern_params, ringsize)
- self.send_251_64_and_32_8k_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 512" in out and "RX-bytes: 112128" in out,
- "expect: virtio-user1 RX-packets is 512 and RX-bytes is 112128",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_8k_num=large_8k_pkts_num,
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_non_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 18: packed virtqueue vm2vm non mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- pkts_64_num = 448
- pkts_4640_num = 0
- total_pkts_num = pkts_64_num + pkts_4640_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=0,in_order=0"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap, total_pkts_num, pkts_64_num, pkts_4640_num
- )
-
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_224_64byte_and_27_4640byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap, total_pkts_num, pkts_64_num, pkts_4640_num
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 19: packed virtqueue vm2vm mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 54
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=1,in_order=0"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_27_4640byte_and_224_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_27_4640byte_and_224_64byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_inorder_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 20: packed virtqueue vm2vm inorder mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 54
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=1,in_order=1"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_27_4640byte_and_224_64byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_27_4640byte_and_224_64byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 502" in out and "RX-bytes: 279232" in out,
- "expect: virtio-user1 RX-packets is 502 and RX-bytes is 279232",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_inorder_non_mergeable_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 21: packed virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 0
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=0,in_order=1"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_224_64byte_and_27_4640byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_vectorized_path_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 22: packed virtqueue vm2vm vectorized path multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 0
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1"
- ringsize = 4096
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_224_64byte_and_27_4640byte_pkts()
-
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
- def test_vm2vm_virtio_user_packed_virtqueue_vectorized_path_ringsize_not_power_of_2_multi_queues_check_chain_pkts_with_cbdma(
- self,
- ):
- """
- Test Case 23: packed virtqueue vm2vm vectorized path ringsize_not_power_of_2 multi-queues payload check with cbdma enabled
- """
- self.cbdma_nic_dev_num = 4
- self.get_cbdma_ports_info_and_bind_to_dpdk()
- large_4640_pkts_num = 0
- large_64_pkts_num = 448
- total_pkts_num = large_4640_pkts_num + large_64_pkts_num
- self.queue_num = 2
- self.txd_num = 4096
- path_mode = "server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,vectorized=1"
- ringsize = 4097
- extern_params = "--rxq=2 --txq=2"
-
- self.logger.info("check pcap file info about virtio")
- self.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]}]' "
- f"--vdev 'eth_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0@{self.cbdma_dev_infos[2]};txq1@{self.cbdma_dev_infos[3]}]'"
- )
-
- self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize)
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- # execute stop and port stop all to avoid testpmd tail_pkts issue.
- self.vhost_user_pmd.execute_cmd("stop")
- self.vhost_user_pmd.execute_cmd("port stop all")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
- if not self.check_2M_env:
- self.logger.info("relanuch vhost testpmd iova pa")
- self.relanuch_vhost_testpmd_iova_pa()
- self.send_224_64byte_and_27_4640byte_pkts()
- self.vhost_user_pmd.execute_cmd("start")
- self.vhost_user_pmd.execute_cmd("stop")
- out = self.virtio_user1_pmd.execute_cmd("show port stats all")
- self.verify(
- "RX-packets: 448" in out and "RX-bytes: 28672" in out,
- "expect: virtio-user1 RX-packets is 448 and RX-bytes is 28672",
- )
- self.check_packet_payload_valid_with_cbdma(
- self.dump_virtio_pcap,
- total_pkts_num,
- pkts_64_num=large_64_pkts_num,
- pkts_4640_num=large_4640_pkts_num,
- )
-
def test_vm2vm_virtio_user_packed_virtqueue_vectorized_path_test_indirect_desc(
self,
):
"""
- Test Case 24: packed virtqueue vm2vm vectorized-tx path multi-queues test indirect descriptor
+ Test Case 12: packed virtqueue vm2vm vectorized-tx path multi-queues test indirect descriptor
"""
large_8k_pkts_num = 5
large_64_pkts_num = 251
@@ -1698,7 +859,6 @@ class TestVM2VMVirtioUser(TestCase):
Run after each test case.
"""
self.quit_all_testpmd()
- self.bind_cbdma_device_to_kernel()
self.dut.kill_all()
time.sleep(2)
@@ -1706,5 +866,4 @@ class TestVM2VMVirtioUser(TestCase):
"""
Run after each test suite.
"""
- self.bind_nic_driver(self.dut_ports, self.drivername)
self.close_all_session()
--
2.25.1
reply other threads:[~2022-04-02 6:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220402063414.474820-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).