Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/88405/?format=api
https://patches.dpdk.org/api/patches/88405/?format=api", "web_url": "https://patches.dpdk.org/project/dts/patch/20210303053014.220817-1-weix.ling@intel.com/", "project": { "id": 3, "url": "https://patches.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": "<20210303053014.220817-1-weix.ling@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20210303053014.220817-1-weix.ling@intel.com", "date": "2021-03-03T05:30:14", "name": "[V3] tests/vm2vm_virtio_user:fix send packet count wrong issue sync with testplan and optimization script code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9d55cc5fa882f666f82f2beea2dd1a10c2ac5a13", "submitter": { "id": 1828, "url": "https://patches.dpdk.org/api/people/1828/?format=api", "name": "Ling, WeiX", "email": "weix.ling@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dts/patch/20210303053014.220817-1-weix.ling@intel.com/mbox/", "series": [ { "id": 15457, "url": "https://patches.dpdk.org/api/series/15457/?format=api", "web_url": "https://patches.dpdk.org/project/dts/list/?series=15457", "date": "2021-03-03T05:30:14", "name": "[V3] tests/vm2vm_virtio_user:fix send packet count wrong issue sync with testplan and optimization script code", "version": 3, "mbox": "https://patches.dpdk.org/series/15457/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/88405/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/88405/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 546E5A00C2;\n\tWed, 3 Mar 2021 06:31:04 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1FD3F40683;\n\tWed, 3 Mar 2021 06:31:04 +0100 (CET)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 23B374067B\n for <dts@dpdk.org>; Wed, 3 Mar 2021 06:31:01 +0100 (CET)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Mar 2021 21:31:00 -0800", "from unknown (HELO localhost.localdomain) ([10.240.183.222])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Mar 2021 21:30:58 -0800" ], "IronPort-SDR": [ "\n pl/mkvRfwH5AvbmzBKHuC9gwNi9kR81LjSUjaAkcAFRP3k7O3KJPahiYcoggYxjKi4ZiLDSgGq\n 8CdBHuV1R4aw==", "\n fjH6BFyolz64WZ8gtdF7jmNnWrO8wEJkIjWrunfaS1TZnTaaWudQc6svgDxqHR5xBDuw7VVP57\n YsdOzsK43iSw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9911\"; a=\"251153719\"", "E=Sophos;i=\"5.81,219,1610438400\"; d=\"scan'208\";a=\"251153719\"", "E=Sophos;i=\"5.81,219,1610438400\"; d=\"scan'208\";a=\"399508550\"" ], "From": "Ling Wei <weix.ling@intel.com>", "To": "dts@dpdk.org", "Cc": "Ling Wei <weix.ling@intel.com>", "Date": "Wed, 3 Mar 2021 13:30:14 +0800", "Message-Id": "<20210303053014.220817-1-weix.ling@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dts] [PATCH V3] tests/vm2vm_virtio_user:fix send packet count\n wrong issue sync with testplan and optimization script code", "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", "Sender": "\"dts\" <dts-bounces@dpdk.org>" }, "content": "1.Fix test case 12 and 13 check packet count wrong issue sync with\n testplan.\n2.Modify send_* patch function name for increase readability.\n3.Add check step about execution drivername is igb_uio or not when \n run CBDMA test case.\n\nSigned-off-by: Ling Wei <weix.ling@intel.com>\n---\n tests/TestSuite_vm2vm_virtio_user.py | 86 ++++++++++++++++++----------\n 1 file changed, 55 insertions(+), 31 deletions(-)", "diff": "diff --git a/tests/TestSuite_vm2vm_virtio_user.py b/tests/TestSuite_vm2vm_virtio_user.py\nindex 815afbdd..7f63380d 100644\n--- a/tests/TestSuite_vm2vm_virtio_user.py\n+++ b/tests/TestSuite_vm2vm_virtio_user.py\n@@ -160,12 +160,11 @@ class TestVM2VMVirtioUser(TestCase):\n self.virtio_user0_pmd.start_testpmd(cores=self.core_list_virtio0, param=params, eal_param=eal_params, \\\n no_pci=True, ports=[],prefix=self.virtio_prefix_0, fixed_prefix=True)\n \n- def check_packet_payload_valid_with_cbdma(self, filename, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num):\n+ def check_packet_payload_valid_with_cbdma(self, filename, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num):\n \"\"\"\n check the payload is valid\n \"\"\"\n # stop pdump\n- total_pkts_num = small_pkts_num\n actual_8k_pkt_num = 0\n actual_2k_pkt_num = 0\n time.sleep(20)\n@@ -197,7 +196,10 @@ class TestVM2VMVirtioUser(TestCase):\n # the virtio0 will send 251 small pkts\n self.start_virtio_testpmd_with_vhost_net0_cbdma(path_mode, extern_param, ringsize)\n \n- def resend_32_large_pkt_from_virtio0(self):\n+ def send_32_2k_pkts_from_virtio0(self):\n+ \"\"\"\n+ send 32 2k length packets from virtio_user0 testpmd\n+ \"\"\"\n self.virtio_user0_pmd.execute_cmd('stop')\n self.virtio_user0_pmd.execute_cmd('set burst 32')\n self.virtio_user0_pmd.execute_cmd('set txpkts 2000')\n@@ -343,13 +345,13 @@ class TestVM2VMVirtioUser(TestCase):\n # then resend 32 large pkts, all will received\n self.logger.info('check pcap file info about virtio')\n self.get_dump_file_of_virtio_user(path_mode, extern_params, ringsize)\n- self.resend_32_large_pkt_from_virtio0()\n+ self.send_32_2k_pkts_from_virtio0()\n self.check_packet_payload_valid(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n # get dump pcap file of vhost\n self.logger.info('check pcap file info about vhost')\n self.get_dump_file_of_vhost_user(path_mode, extern_params, ringsize)\n- self.resend_32_large_pkt_from_virtio0()\n+ self.send_32_2k_pkts_from_virtio0()\n self.check_packet_payload_valid(self.dump_vhost_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n self.logger.info('diff the pcap file of vhost and virtio')\n@@ -503,13 +505,13 @@ class TestVM2VMVirtioUser(TestCase):\n # then virtio send 32 large pkts, the virtio will all received\n self.logger.info('check pcap file info about virtio')\n self.get_dump_file_of_virtio_user(path_mode, extern_params, ringsize)\n- self.resend_32_large_pkt_from_virtio0()\n+ self.send_32_2k_pkts_from_virtio0()\n self.check_packet_payload_valid(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n # get dump pcap file of vhost\n self.logger.info('check pcap file info about vhost')\n self.get_dump_file_of_vhost_user(path_mode, extern_params, ringsize)\n- self.resend_32_large_pkt_from_virtio0()\n+ self.send_32_2k_pkts_from_virtio0()\n self.check_packet_payload_valid(self.dump_vhost_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n self.logger.info('diff the pcap file of vhost and virtio')\n@@ -671,9 +673,9 @@ class TestVM2VMVirtioUser(TestCase):\n self.cbdma_nic_dev_num = 4\n self.bind_nic_driver(self.dut_ports)\n self.get_cbdma_ports_info_and_bind_to_dpdk()\n- small_pkts_num = 512\n large_8k_pkts_num = 502\n- large_2k_pkts_num = 10\n+ large_2k_pkts_num = 64\n+ total_pkts_num = large_8k_pkts_num + large_2k_pkts_num\n self.queue_num=2\n self.nopci=False\n path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=1'\n@@ -686,17 +688,22 @@ class TestVM2VMVirtioUser(TestCase):\n 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'\"\n \n self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)\n- self.send_8k_pkt()\n- self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num,\n- large_2k_pkts_num)\n+ self.send_251_8k_and_32_2k_pkts()\n+ # execute stop and port stop all to avoid testpmd tail_pkts issue.\n+ self.vhost_user_pmd.execute_cmd('stop')\n+ self.vhost_user_pmd.execute_cmd('port stop all')\n+ self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n # get dump pcap file of vhost\n self.logger.info('check pcap file info about vhost')\n- small_pkts_num = 512\n large_8k_pkts_num = 54\n- large_2k_pkts_num = 458\n+ large_2k_pkts_num = 512\n+ total_pkts_num = large_8k_pkts_num + large_2k_pkts_num\n self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)\n- self.send_multiple_pkt()\n- self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n+ self.send_27_8k_and_256_2k_pkts()\n+ # execute stop and port stop all to avoid testpmd tail_pkts issue.\n+ self.vhost_user_pmd.execute_cmd('stop')\n+ self.vhost_user_pmd.execute_cmd('port stop all')\n+ self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n self.logger.info('diff the pcap file of vhost and virtio')\n \n@@ -708,9 +715,9 @@ class TestVM2VMVirtioUser(TestCase):\n self.cbdma_nic_dev_num = 4\n self.bind_nic_driver(self.dut_ports)\n self.get_cbdma_ports_info_and_bind_to_dpdk()\n- small_pkts_num = 448\n large_8k_pkts_num = 54\n- large_2k_pkts_num = 394\n+ large_2k_pkts_num = 448\n+ total_pkts_num = large_8k_pkts_num + large_2k_pkts_num\n self.queue_num=2\n self.nopci=False\n path_mode = 'server=1,packed_vq=0,mrg_rxbuf=1,in_order=0'\n@@ -723,20 +730,26 @@ class TestVM2VMVirtioUser(TestCase):\n 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'\"\n \n self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)\n- self.send_multiple_pkt_with_8k54_2k394()\n- self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n+ self.send_27_8k_and_224_2k_pkts()\n+ # execute stop and port stop all to avoid testpmd tail_pkts issue.\n+ self.vhost_user_pmd.execute_cmd('stop')\n+ self.vhost_user_pmd.execute_cmd('port stop all')\n+ self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n # get dump pcap file of vhost\n self.logger.info('check pcap file info about vhost')\n- small_pkts_num = 448\n- large_8k_pkts_num = 448\n+ large_8k_pkts_num = 502\n large_2k_pkts_num = 0\n+ total_pkts_num = large_8k_pkts_num + large_2k_pkts_num\n self.get_dump_file_of_virtio_user_cbdma(path_mode, extern_params, ringsize, vdevs, no_pci=False)\n- self.send_multiple_pkt_with_8k448()\n- self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, small_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n+ self.send_251_8k_pkts()\n+ # execute stop and port stop all to avoid testpmd tail_pkts issue.\n+ self.vhost_user_pmd.execute_cmd('stop')\n+ self.vhost_user_pmd.execute_cmd('port stop all')\n+ self.check_packet_payload_valid_with_cbdma(self.dump_virtio_pcap, total_pkts_num, large_8k_pkts_num, large_2k_pkts_num)\n \n self.logger.info('diff the pcap file of vhost and virtio')\n \n- def send_multiple_pkt_with_8k54_2k394(self):\n+ def send_27_8k_and_224_2k_pkts(self):\n self.virtio_user0_pmd.execute_cmd('set burst 1')\n self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')\n self.virtio_user0_pmd.execute_cmd('start tx_first 27')\n@@ -746,7 +759,10 @@ class TestVM2VMVirtioUser(TestCase):\n self.virtio_user0_pmd.execute_cmd('start tx_first 7')\n self.vhost_user_pmd.execute_cmd('start')\n \n- def send_multiple_pkt_with_8k448(self):\n+ def send_251_8k_pkts(self):\n+ \"\"\"\n+ send 251 8k length packets from virtio_user0 testpmd\n+ \"\"\"\n self.virtio_user0_pmd.execute_cmd('set burst 1')\n self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')\n self.virtio_user0_pmd.execute_cmd('start tx_first 27')\n@@ -756,7 +772,10 @@ class TestVM2VMVirtioUser(TestCase):\n self.virtio_user0_pmd.execute_cmd('start tx_first 7')\n self.vhost_user_pmd.execute_cmd('start')\n \n- def send_8k_pkt(self):\n+ def send_251_8k_and_32_2k_pkts(self):\n+ \"\"\"\n+ send 251 8k and 32 2k length packets from virtio_user0 testpmd\n+ \"\"\"\n self.virtio_user0_pmd.execute_cmd('set burst 1')\n self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')\n self.virtio_user0_pmd.execute_cmd('start tx_first 27')\n@@ -768,7 +787,10 @@ class TestVM2VMVirtioUser(TestCase):\n self.virtio_user0_pmd.execute_cmd('start tx_first 1')\n self.vhost_user_pmd.execute_cmd('start')\n \n- def send_multiple_pkt(self):\n+ def send_27_8k_and_256_2k_pkts(self):\n+ \"\"\"\n+ send 27 8k and 256 2k length packets from virtio_user0 testpmd\n+ \"\"\"\n self.virtio_user0_pmd.execute_cmd('set burst 1')\n self.virtio_user0_pmd.execute_cmd('set txpkts 2000,2000,2000,2000')\n self.virtio_user0_pmd.execute_cmd('start tx_first 27')\n@@ -785,9 +807,11 @@ class TestVM2VMVirtioUser(TestCase):\n \"\"\"\n get all cbdma ports\n \"\"\"\n+ # check driver name in execution.cfg\n+ self.verify(self.drivername == 'igb_uio',\n+ \"CBDMA test case only use igb_uio driver, need config drivername=igb_uio in execution.cfg\")\n str_info = 'Misc (rawdev) devices using kernel driver'\n- out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc',\n- '# ', 30)\n+ out = self.dut.send_expect('./usertools/dpdk-devbind.py --status-dev misc', '# ', 30)\n device_info = out.split('\\n')\n for device in device_info:\n pci_info = re.search('\\s*(0000:\\d*:\\d*.\\d*)', device)\n@@ -804,4 +828,4 @@ class TestVM2VMVirtioUser(TestCase):\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=igb_uio %s' % self.device_str, '# ', 60)\n+ self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=%s %s' % (self.drivername, self.device_str), '# ', 60)\n", "prefixes": [ "V3" ] }{ "id": 88405, "url": "