Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104776/?format=api
http://patchwork.dpdk.org/api/patches/104776/?format=api", "web_url": "http://patchwork.dpdk.org/project/dts/patch/20211130150330.142296-2-linglix.chen@intel.com/", "project": { "id": 3, "url": "http://patchwork.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20211130150330.142296-2-linglix.chen@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20211130150330.142296-2-linglix.chen@intel.com", "date": "2021-11-30T15:03:30", "name": "[V3,2/2] tests/loopback_virtio_user_server_mode: Add two new cases", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "329fac0c6244f8eedbdfa7032a164ffc8d0e2315", "submitter": { "id": 1843, "url": "http://patchwork.dpdk.org/api/people/1843/?format=api", "name": "Lingli Chen", "email": "linglix.chen@intel.com" }, "delegate": null, "mbox": "http://patchwork.dpdk.org/project/dts/patch/20211130150330.142296-2-linglix.chen@intel.com/mbox/", "series": [ { "id": 20814, "url": "http://patchwork.dpdk.org/api/series/20814/?format=api", "web_url": "http://patchwork.dpdk.org/project/dts/list/?series=20814", "date": "2021-11-30T15:03:30", "name": "[V3,1/2] test_plans/loopback_virtio_user_server_mode: Add two new cases", "version": 3, "mbox": "http://patchwork.dpdk.org/series/20814/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104776/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/104776/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2350DA0C5A;\n\tTue, 30 Nov 2021 08:03:19 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1A3E84068F;\n\tTue, 30 Nov 2021 08:03:19 +0100 (CET)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n by mails.dpdk.org (Postfix) with ESMTP id EB60A4068B\n for <dts@dpdk.org>; Tue, 30 Nov 2021 08:03:16 +0100 (CET)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Nov 2021 23:03:16 -0800", "from unknown (HELO dpdk.lan) ([10.240.183.77])\n by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Nov 2021 23:03:14 -0800" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10183\"; a=\"234882873\"", "E=Sophos;i=\"5.87,275,1631602800\"; d=\"scan'208\";a=\"234882873\"", "E=Sophos;i=\"5.87,275,1631602800\"; d=\"scan'208\";a=\"458728388\"" ], "From": "Lingli Chen <linglix.chen@intel.com>", "To": "dts@dpdk.org", "Cc": "Lingli Chen <linglix.chen@intel.com>", "Subject": "[dts][PATCH V3 2/2] tests/loopback_virtio_user_server_mode: Add two\n new cases", "Date": "Tue, 30 Nov 2021 15:03:30 +0000", "Message-Id": "<20211130150330.142296-2-linglix.chen@intel.com>", "X-Mailer": "git-send-email 2.33.1", "In-Reply-To": "<20211130150330.142296-1-linglix.chen@intel.com>", "References": "<20211130150330.142296-1-linglix.chen@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dts@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "test suite reviews and discussions <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org" }, "content": "Add 2 new cases: case 13, 14.\n\nSigned-off-by: Lingli Chen <linglix.chen@intel.com>\n---\n ...tSuite_loopback_virtio_user_server_mode.py | 196 +++++++++++++++++-\n 1 file changed, 193 insertions(+), 3 deletions(-)", "diff": "diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py b/tests/TestSuite_loopback_virtio_user_server_mode.py\nindex ed01de2f..7764c7ed 100644\n--- a/tests/TestSuite_loopback_virtio_user_server_mode.py\n+++ b/tests/TestSuite_loopback_virtio_user_server_mode.py\n@@ -41,6 +41,7 @@ import framework.utils as utils\n from framework.pmd_output import PmdOutput\n from framework.test_case import TestCase\n from framework.packet import Packet\n+import copy\n \n class TestLoopbackVirtioUserServerMode(TestCase):\n \n@@ -55,7 +56,11 @@ class TestLoopbackVirtioUserServerMode(TestCase):\n == 0])\n self.verify(self.cores_num >= 6,\n \"There has not enought cores to test this case\")\n- self.core_list = self.dut.get_core_list(self.core_config)\n+ self.dut_ports = self.dut.get_ports()\n+ self.unbind_ports = copy.deepcopy(self.dut_ports)\n+ self.dut.unbind_interfaces_linux(self.unbind_ports)\n+ self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])\n+ self.core_list = self.dut.get_core_list(self.core_config, socket=self.ports_socket)\n self.core_list_user = self.core_list[0:3]\n self.core_list_host = self.core_list[3:6]\n self.path=self.dut.apps_name['test-pmd']\n@@ -63,8 +68,6 @@ class TestLoopbackVirtioUserServerMode(TestCase):\n self.app_pdump = self.dut.apps_name['pdump']\n self.dump_pcap = \"/root/pdump-rx.pcap\"\n self.device_str = ''\n- self.dut_ports = self.dut.get_ports()\n- self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])\n self.cbdma_dev_infos = []\n \n def set_up(self):\n@@ -231,6 +234,64 @@ class TestLoopbackVirtioUserServerMode(TestCase):\n self.vhost_pmd.execute_cmd(\"set txpkts 2000,2000,2000,2000\", \"testpmd> \", 120)\n self.vhost_pmd.execute_cmd(\"start tx_first 32\", \"testpmd> \", 120)\n \n+ def launch_pdump_to_capture_pkt(self, dump_port):\n+ \"\"\"\n+ bootup pdump in dut\n+ \"\"\"\n+ self.pdump_session = self.dut.new_session(suite=\"pdump\")\n+ cmd = self.app_pdump + \" \" + \\\n+ \"-v --file-prefix=virtio -- \" + \\\n+ \"--pdump 'device_id=%s,queue=*,rx-dev=%s,mbuf-size=8000'\"\n+ self.pdump_session.send_expect(cmd % (dump_port, self.dump_pcap), 'Port')\n+\n+ def check_packet_payload_valid(self, pkt_len, queue_number):\n+ \"\"\"\n+ check the payload is valid\n+ \"\"\"\n+ self.pdump_session.send_expect('^c', '# ', 60)\n+ time.sleep(3)\n+ self.dut.session.copy_file_from(src=\"%s\" % self.dump_pcap, dst=\"%s\" % self.dump_pcap)\n+ pkt = Packet()\n+ pkts = pkt.read_pcapfile(self.dump_pcap)\n+ expect_data = str(pkts[0]['Raw'])\n+\n+ for i in range(len(pkts)):\n+ self.verify(len(pkts[i]) == pkt_len, \"virtio-user0 receive packet's length not equal %s Byte\" %pkt_len)\n+ check_data = str(pkts[i]['Raw'])\n+ self.verify(check_data == expect_data, \"the payload in receive packets has been changed from %s\" %i)\n+ self.dut.send_expect(\"rm -rf %s\" % self.dump_pcap, \"#\")\n+\n+ def relanuch_vhost_testpmd_send_8k_packets(self, extern_params, cbdma=False, iova='va'):\n+\n+ self.vhost_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.logger.info('now reconnet from vhost')\n+ if cbdma:\n+ self.lanuch_vhost_testpmd_with_cbdma(extern_params=extern_params, iova=iova)\n+ else:\n+ self.lanuch_vhost_testpmd_with_multi_queue(extern_params=extern_params, set_fwd_mac=False)\n+ self.launch_pdump_to_capture_pkt(self.vuser0_port)\n+ if cbdma:\n+ self.start_to_send_8k_packets_csum_cbdma(self.vhost)\n+ else:\n+ self.start_to_send_8k_packets_csum(self.vhost)\n+ self.check_packet_payload_valid(self.pkt_len, self.queue_number)\n+\n+ def relanuch_virtio_testpmd_with_multi_path(self, mode, case_info, extern_params, cbdma=False, iova=\"va\"):\n+\n+ self.virtio_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.logger.info(case_info)\n+ self.lanuch_virtio_user_testpmd_with_multi_queue(mode=mode, extern_params=extern_params, set_fwd_mac=False)\n+ self.virtio_user_pmd.execute_cmd(\"set fwd csum\")\n+ self.virtio_user_pmd.execute_cmd(\"start\")\n+ self.launch_pdump_to_capture_pkt(self.vuser0_port)\n+ if cbdma:\n+ self.start_to_send_8k_packets_csum_cbdma(self.vhost)\n+ else:\n+ self.start_to_send_8k_packets_csum(self.vhost)\n+ self.check_packet_payload_valid(self.pkt_len, self.queue_number)\n+\n+ self.relanuch_vhost_testpmd_send_8k_packets(extern_params, cbdma, iova=iova)\n+\n def relanuch_vhost_testpmd_with_multi_queue(self):\n self.vhost_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.check_link_status(self.virtio_user, \"down\")\n@@ -680,6 +741,134 @@ class TestLoopbackVirtioUserServerMode(TestCase):\n self.check_packets_of_each_queue()\n self.close_all_testpmd()\n \n+ def test_server_mode_reconnect_with_packed_and_split_mergeable_path_payload_check(self):\n+ \"\"\"\n+ Test Case 13: loopback packed ring and split ring mergeable path payload check test using server mode and multi-queues\n+ \"\"\"\n+ self.queue_number = 8\n+ self.nb_cores = 1\n+ extern_params = '--txd=1024 --rxd=1024'\n+ case_info = 'packed ring mergeable inorder path'\n+ mode = \"mrg_rxbuf=1,in_order=1,packed_vq=1\"\n+\n+ self.lanuch_vhost_testpmd_with_multi_queue(extern_params=extern_params, set_fwd_mac=False)\n+ self.logger.info(case_info)\n+ self.lanuch_virtio_user_testpmd_with_multi_queue(mode=mode, extern_params=extern_params, set_fwd_mac=False)\n+ self.virtio_user_pmd.execute_cmd(\"set fwd csum\")\n+ self.virtio_user_pmd.execute_cmd(\"start\")\n+ #3. Attach pdump secondary process to primary process by same file-prefix::\n+ self.vuser0_port = 'net_virtio_user0'\n+ self.launch_pdump_to_capture_pkt(self.vuser0_port)\n+ self.start_to_send_8k_packets_csum(self.vhost)\n+\n+ #5. Check all the packets length is 8000 Byte in the pcap file\n+ self.pkt_len = 8000\n+ self.check_packet_payload_valid(self.pkt_len, self.queue_number)\n+\n+ # reconnet from vhost\n+ self.relanuch_vhost_testpmd_send_8k_packets(extern_params)\n+\n+ # reconnet from virtio\n+ self.logger.info('now reconnet from virtio_user with other path')\n+ case_info = 'packed ring mergeable path'\n+ mode = \"mrg_rxbuf=1,in_order=0,packed_vq=1\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params)\n+\n+ case_info = 'split ring mergeable inorder path'\n+ mode = \"mrg_rxbuf=1,in_order=1\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params)\n+\n+ case_info = 'split ring mergeable path'\n+ mode = \"mrg_rxbuf=1,in_order=0\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params)\n+\n+ self.close_all_testpmd()\n+\n+ def test_server_mode_reconnect_with_packed_and_split_mergeable_path_cbdma_payload_check(self):\n+ \"\"\"\n+ Test Case 14: loopback packed ring and split ring mergeable path cbdma test payload check with server mode and multi-queues\n+ \"\"\"\n+ self.cbdma_nic_dev_num = 8\n+ self.get_cbdma_ports_info_and_bind_to_dpdk()\n+ self.queue_number = 8\n+ self.vdev = f\"--vdev 'eth_vhost0,iface=vhost-net,queues={self.queue_number},client=1,dmas=[txq0@{self.cbdma_dev_infos[0]};txq1@{self.cbdma_dev_infos[1]};txq2@{self.cbdma_dev_infos[2]};txq3@{self.cbdma_dev_infos[3]};txq4@{self.cbdma_dev_infos[4]};txq5@{self.cbdma_dev_infos[5]};txq6@{self.cbdma_dev_infos[6]};txq7@{self.cbdma_dev_infos[7]}]' \"\n+\n+ self.nb_cores = 1\n+ extern_params = '--txd=1024 --rxd=1024'\n+ case_info = 'packed ring mergeable inorder path'\n+ mode = \"mrg_rxbuf=1,in_order=1,packed_vq=1\"\n+\n+ self.lanuch_vhost_testpmd_with_cbdma(extern_params=extern_params)\n+ self.logger.info(case_info)\n+ self.lanuch_virtio_user_testpmd_with_multi_queue(mode=mode, extern_params=extern_params, set_fwd_mac=False)\n+ self.virtio_user_pmd.execute_cmd(\"set fwd csum\")\n+ self.virtio_user_pmd.execute_cmd(\"start\")\n+ # 3. Attach pdump secondary process to primary process by same file-prefix::\n+ self.vuser0_port = 'net_virtio_user0'\n+ self.launch_pdump_to_capture_pkt(self.vuser0_port)\n+ self.start_to_send_8k_packets_csum_cbdma(self.vhost)\n+\n+ # 5. Check all the packets length is 6192 Byte in the pcap file\n+ self.pkt_len = 6192\n+ self.check_packet_payload_valid(self.pkt_len, self.queue_number)\n+ #reconnet from vhost\n+ self.relanuch_vhost_testpmd_send_8k_packets(extern_params, cbdma=True)\n+\n+ # reconnet from virtio\n+ self.logger.info('now reconnet from virtio_user with other path')\n+ case_info = 'packed ring mergeable path'\n+ mode = \"mrg_rxbuf=1,in_order=0,packed_vq=1\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params, cbdma=True)\n+\n+ case_info = 'split ring mergeable inorder path'\n+ mode = \"mrg_rxbuf=1,in_order=1\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params, cbdma=True)\n+\n+ case_info = 'split ring mergeable path'\n+ mode = \"mrg_rxbuf=1,in_order=0\"\n+ self.relanuch_virtio_testpmd_with_multi_path(mode, case_info, extern_params, cbdma=True)\n+\n+ self.logger.info('now relaunch vhost iova=pa')\n+ self.relanuch_vhost_testpmd_send_8k_packets(extern_params, cbdma=True, iova='pa')\n+\n+ self.close_all_testpmd()\n+\n+ def lanuch_vhost_testpmd_with_cbdma(self, extern_params=\"\", iova='va'):\n+ \"\"\"\n+ start testpmd with cbdma\n+ \"\"\"\n+ eal_params = self.vdev + \" --iova={}\".format(iova)\n+ param = \"--rxq={} --txq={} --nb-cores={} {}\".format(self.queue_number, self.queue_number, self.nb_cores, extern_params)\n+ self.vhost_pmd.start_testpmd(self.core_list_host, param=param, no_pci=False, ports=[], eal_param=eal_params, prefix='vhost', fixed_prefix=True)\n+\n+ def get_cbdma_ports_info_and_bind_to_dpdk(self):\n+ \"\"\"\n+ get all cbdma ports\n+ \"\"\"\n+ out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev dma', '# ', 30)\n+ device_info = out.split('\\n')\n+ for device in device_info:\n+ pci_info = re.search('\\s*(0000:\\S*:\\d*.\\d*)', device)\n+ if pci_info is not None:\n+ dev_info = pci_info.group(1)\n+ # the numa id of ioat dev, only add the device which on same socket with nic dev\n+ bus = int(dev_info[5:7], base=16)\n+ if bus >= 128:\n+ cur_socket = 1\n+ else:\n+ cur_socket = 0\n+ if self.ports_socket == cur_socket:\n+ self.cbdma_dev_infos.append(pci_info.group(1))\n+ self.verify(len(self.cbdma_dev_infos) >= 8, 'There no enough cbdma device to run this suite')\n+ self.device_str = ' '.join(self.cbdma_dev_infos[0:self.cbdma_nic_dev_num])\n+ self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % (self.drivername, self.device_str), '# ', 60)\n+\n+ def bind_cbdma_device_to_kernel(self):\n+ if self.device_str is not None:\n+ self.dut.send_expect('modprobe ioatdma', '# ')\n+ self.dut.send_expect('./usertools/dpdk-devbind.py -u %s' % self.device_str, '# ', 30)\n+ self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=ioatdma %s' % self.device_str, '# ', 60)\n+\n def tear_down(self):\n \"\"\"\n Run after each test case.\n@@ -692,3 +881,4 @@ class TestLoopbackVirtioUserServerMode(TestCase):\n \"\"\"\n Run after each test suite.\n \"\"\"\n+ self.bind_cbdma_device_to_kernel()\n", "prefixes": [ "V3", "2/2" ] }{ "id": 104776, "url": "