From patchwork Thu May 19 06:26:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 111352 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 934E5A0503; Thu, 19 May 2022 08:28:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AB9E41156; Thu, 19 May 2022 08:28:13 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 14EC040150 for ; Thu, 19 May 2022 08:28:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652941691; x=1684477691; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PVfCVsjlwxUBa/XHBXurU8gA7vSHramcnm6I5f9BEqk=; b=J5vFP/wcJwobFfAOlfz6mbkqcoJnlOvhTjef0fU/YB46VLMdWpN/sWmZ ozMLQzWTy/qKmRW0mAeW4jK6AbmxPkzz18s+gGrdBeDJNQmZMHf8SQjKu xK+saPSg4QbsDQOxHAChG1xSRmiUt28QORLfuZwqRuR95hP3M4tF/7lQf k82qjrRn0LnVfIdnWZKs1NxWWBJ3n1wU/Xcig4R3FK7JbcNCZrAKi3+g1 O3XNkUGBibbOedQWdLwg+kL2ZbthXbhbj66Sp0he+uUOhsG20tiBJnoJl aC1s6ICQROFEkT5/6e6W9FlM9HRVHFc39nwc3UqdjE/j73U8t5drtWvRD Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="259617725" X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="259617725" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 23:28:10 -0700 X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="700998002" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 23:28:09 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/vhost_virtio_user_interrupt_test_plan: delete CBDMA related testcases Date: Thu, 19 May 2022 02:26:48 -0400 Message-Id: <20220519062648.2813016-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Delete CBDMA related testcases. Signed-off-by: Wei Ling --- .../vhost_virtio_user_interrupt_test_plan.rst | 96 ------------------- 1 file changed, 96 deletions(-) diff --git a/test_plans/vhost_virtio_user_interrupt_test_plan.rst b/test_plans/vhost_virtio_user_interrupt_test_plan.rst index be663b5f..24c35d04 100644 --- a/test_plans/vhost_virtio_user_interrupt_test_plan.rst +++ b/test_plans/vhost_virtio_user_interrupt_test_plan.rst @@ -178,99 +178,3 @@ flow: Vhost <--> Virtio testpmd> show port info 0 #it should show "down" - -Test Case7: LSC event between vhost-user and virtio-user with split ring and cbdma enabled -========================================================================================== - -flow: Vhost <--> Virtio - -1. Bind one cbdma port to vfio-pci driver, then start vhost-user side:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3000 -n 4 -a 00:04.0 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0,dmas=[txq0@00:04.0]' -- -i - testpmd>set fwd mac - testpmd>start - -2. Start virtio-user side:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc000 -n 4 --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net -- -i --tx-offloads=0x00 - testpmd>set fwd mac - testpmd>start - -3. Check the virtio-user side link status:: - - testpmd> show port info 0 - #it should show "up" - -4. Quit the vhost-user side with testpmd, then check the virtio-user side link status:: - - testpmd> show port info 0 - #it should show "down" - -Test Case8: Split ring virtio-user interrupt test with vhost-user as backend and cbdma enabled -============================================================================================== - -flow: TG --> NIC --> Vhost --> Virtio - -1. Bind one cbdma port and one NIC port to vfio-pci, launch testpmd with a virtual vhost device as backend:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x7c -n 4 --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@00:04.0]' -- -i --rxq=1 --txq=1 - testpmd>start - -2. Start l3fwd-power with a virtio-user device:: - - ./x86_64-native-linuxapp-gcc/examples/dpdk-l3fwd-power -c 0xc000 -n 4 --log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd \ - --vdev=virtio_user0,path=./vhost-net -- -p 1 -P --config="(0,0,14)" --parse-ptype - -3. Send packets with packet generator, check the virtio-user related core can be wakeup status. - -4. Stop sending packets with packet generator, check virtio-user related core change to sleep status. - -5. Restart sending packets with packet generator, check virtio-user related core change to wakeup status again. - -Test Case9: LSC event between vhost-user and virtio-user with packed ring and cbdma enabled -=========================================================================================== - -flow: Vhost <--> Virtio - -1. Bind one cbdma port to vfio-pci driver, then start vhost-user side:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3000 -n 4 -a 00:04.0 --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0,dmas=[txq0@00:04.0]' -- -i - testpmd>set fwd mac - testpmd>start - -2. Start virtio-user side:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc000 -n 4 --no-pci --file-prefix=virtio --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1 -- -i --tx-offloads=0x00 - testpmd>set fwd mac - testpmd>start - -3. Check the virtio-user side link status:: - - testpmd> show port info 0 - #it should show "up" - -4. Quit the vhost-user side with testpmd, then check the virtio-user side link status:: - - testpmd> show port info 0 - #it should show "down" - -Test Case10: Packed ring virtio-user interrupt test with vhost-user as backend and cbdma enabled -================================================================================================ - -flow: TG --> NIC --> Vhost --> Virtio - -1. Bind one cbdma port and one NIC port to vfio-pci, launch testpmd with a virtual vhost device as backend:: - - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x7c -n 4 --vdev 'net_vhost0,iface=vhost-net,queues=1,dmas=[txq0@00:04.0]' -- -i --rxq=1 --txq=1 - testpmd>start - -2. Start l3fwd-power with a virtio-user device:: - - ./x86_64-native-linuxapp-gcc/examples/dpdk-l3fwd-power -c 0xc000 -n 4 --log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd \ - --vdev=virtio_user0,path=./vhost-net,packed_vq=1 -- -p 1 -P --config="(0,0,14)" --parse-ptype - -3. Send packets with packet generator, check the virtio-user related core can be wakeup status. - -4. Stop sending packets with packet generator, check virtio-user related core change to sleep status. - -5. Restart sending packets with packet generator, check virtio-user related core change to wakeup status again. From patchwork Thu May 19 06:26:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 111353 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 00967A0503; Thu, 19 May 2022 08:28:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5B3442685; Thu, 19 May 2022 08:28:23 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 9777840150 for ; Thu, 19 May 2022 08:28:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652941701; x=1684477701; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XV0BLhdeYNtYjtdMeykLiZDpYGu8XBWoqEJMyYdfj+o=; b=gM4pQ9CLlzwTJhDXFabbkwqwHyKYB9fJ8koXymLe7e7SRciEReIY5lNw FNw97ERtu55riRtPDL7xf0PR9UZjtUuxNIF/pvsNcsYlpauLP8m4Y2JzI Me/JTi+f3qg1+3qqxwkbVJUUvrHammGX/D83y624+35EewKhNBtHA6WEb t0A51xfHBX9ztMoZU0bRNSwT8XOWeglBn76AJMaoUymWnSpHUPRNIWwvA 0fCQpyXkIH4ClZPtR4jRP8Wp0lCF2Ek3C6g7H6d8Str2I7z8p6l5klv92 VJgyXGcUrFgvib9fTe2fk9MHFOPSukUJ5rYpXWlgBDMl8MjjjALerVz/4 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="259617762" X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="259617762" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 23:28:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,236,1647327600"; d="scan'208";a="700998023" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2022 23:28:18 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/2] tests/vhost_virtio_user_interrupt: delete CBDMA related testcases and code Date: Thu, 19 May 2022 02:26:57 -0400 Message-Id: <20220519062657.2813076-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Delete CBDMA related testcases and code. Signed-off-by: Wei Ling Tested-by: Chenyu Huang Acked-by: Xingguang He --- .../TestSuite_vhost_virtio_user_interrupt.py | 170 +----------------- 1 file changed, 7 insertions(+), 163 deletions(-) diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py index 9529ffeb..01744dd4 100644 --- a/tests/TestSuite_vhost_virtio_user_interrupt.py +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py @@ -61,9 +61,6 @@ class TestVirtioUserInterrupt(TestCase): self.core_mask_virtio = self.core_mask_l3fwd self.pci_info = self.dut.ports_info[0]["pci"] self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) - self.cbdma_dev_infos = [] - self.dmas_info = None - self.device_str = None self.prepare_l3fwd_power() self.tx_port = self.tester.get_local_port(self.dut_ports[0]) self.tx_interface = self.tester.get_interface(self.tx_port) @@ -124,7 +121,7 @@ class TestVirtioUserInterrupt(TestCase): else: self.logger.info("Launch l3fwd-power sample finished") - def start_vhost_testpmd(self, pci="", dmas=None): + def start_vhost_testpmd(self, pci=""): """ start testpmd on vhost side """ @@ -132,33 +129,14 @@ class TestVirtioUserInterrupt(TestCase): vdev = ["net_vhost0,iface=vhost-net,queues=1,client=0"] para = " -- -i --rxq=1 --txq=1" allow_pci = [self.pci_info] - if dmas: - for item in self.used_cbdma: - allow_pci.append(item) if len(pci) == 0: - if dmas: - vdev = ["net_vhost0,iface=vhost-net,queues=1,dmas=[%s]" % dmas] - eal_params = self.dut.create_eal_parameters( - cores=self.core_list_vhost, ports=allow_pci, vdevs=vdev - ) - else: - eal_params = self.dut.create_eal_parameters( - cores=self.core_list_vhost, ports=allow_pci, vdevs=vdev - ) + eal_params = self.dut.create_eal_parameters( + cores=self.core_list_vhost, ports=allow_pci, vdevs=vdev + ) else: - if dmas: - vdev = ["net_vhost0,iface=vhost-net,queues=1,client=0,dmas=[%s]" % dmas] - para = " -- -i" - eal_params = self.dut.create_eal_parameters( - cores=self.core_list_vhost, - ports=allow_pci, - prefix="vhost", - vdevs=vdev, - ) - else: - eal_params = self.dut.create_eal_parameters( - cores=self.core_list_vhost, prefix="vhost", no_pci=True, vdevs=vdev - ) + eal_params = self.dut.create_eal_parameters( + cores=self.core_list_vhost, prefix="vhost", no_pci=True, vdevs=vdev + ) cmd_vhost_user = testcmd + eal_params + para self.vhost.send_expect(cmd_vhost_user, "testpmd>", 30) self.vhost.send_expect("set fwd mac", "testpmd>", 30) @@ -201,59 +179,6 @@ class TestVirtioUserInterrupt(TestCase): else: self.logger.error("Wrong link status not right, status is %s" % result) - def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num): - """ - 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) >= cbdma_num, - "There no enough cbdma device to run this suite", - ) - self.used_cbdma = self.cbdma_dev_infos[0:cbdma_num] - dmas_info = "" - for dmas in self.used_cbdma: - number = self.used_cbdma.index(dmas) - dmas = "txq{}@{};".format(number, dmas) - dmas_info += dmas - self.dmas_info = dmas_info[:-1] - self.device_str = " ".join(self.used_cbdma) - 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 test_split_ring_virtio_user_interrupt_with_vhost_net_as_backend(self): """ Check the virtio-user interrupt can work when use vhost-net as backend @@ -353,93 +278,12 @@ class TestVirtioUserInterrupt(TestCase): self.vhost.send_expect("quit", "#", 20) self.check_virtio_side_link_status("down") - def test_lsc_event_between_vhost_user_and_virtio_user_with_split_ring_and_cbdma_enabled( - self, - ): - """ - Test Case7: LSC event between vhost-user and virtio-user with split ring and cbdma enabled - """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - self.start_vhost_testpmd(pci=self.used_cbdma, dmas=self.dmas_info) - self.start_virtio_user() - self.check_virtio_side_link_status("up") - self.vhost.send_expect("quit", "#", 20) - self.check_virtio_side_link_status("down") - self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") - self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") - self.close_all_session() - - def test_split_ring_virtio_user_interrupt_test_with_vhost_user_as_backend_and_cbdma_enabled( - self, - ): - """ - Test Case8: Split ring virtio-user interrupt test with vhost-user as backend and cbdma enabled - """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - self.start_vhost_testpmd(pci="", dmas=self.dmas_info) - self.launch_l3fwd(path="./vhost-net") - # double check the status of interrupt core - for i in range(2): - self.tester.scapy_append( - 'pk=[Ether(dst="52:54:00:00:00:01")/IP()/("X"*64)]' - ) - self.tester.scapy_append( - 'sendp(pk, iface="%s", count=100)' % self.tx_interface - ) - self.tester.scapy_execute() - time.sleep(3) - self.check_interrupt_log(status="waked up") - self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") - self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") - self.close_all_session() - - def test_lsc_event_between_vhost_user_and_virtio_user_with_packed_ring_and_cbdma_enabled( - self, - ): - """ - Test Case9: LSC event between vhost-user and virtio-user with packed ring and cbdma enabled - """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - self.start_vhost_testpmd(pci=self.used_cbdma, dmas=self.dmas_info) - self.start_virtio_user(packed=True) - self.check_virtio_side_link_status("up") - self.vhost.send_expect("quit", "#", 20) - self.check_virtio_side_link_status("down") - self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") - self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") - self.close_all_session() - - def test_packed_ring_virtio_user_interrupt_test_with_vhost_user_as_backend_and_cbdma_enabled( - self, - ): - """ - Test Case10: Packed ring virtio-user interrupt test with vhost-user as backend and cbdma enabled - """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - self.start_vhost_testpmd(pci="", dmas=self.dmas_info) - self.launch_l3fwd(path="./vhost-net", packed=True) - # double check the status of interrupt core - for i in range(2): - self.tester.scapy_append( - 'pk=[Ether(dst="52:54:00:00:00:01")/IP()/("X"*64)]' - ) - self.tester.scapy_append( - 'sendp(pk, iface="%s", count=100)' % self.tx_interface - ) - self.tester.scapy_execute() - time.sleep(3) - self.check_interrupt_log(status="waked up") - self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") - self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") - self.close_all_session() - def tear_down(self): """ run after each test case. """ self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") - self.bind_cbdma_device_to_kernel() self.close_all_session() def tear_down_all(self):