Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/115351/?format=api
https://patches.dpdk.org/api/patches/115351/?format=api", "web_url": "https://patches.dpdk.org/project/dts/patch/20220823055939.4186198-3-ke1.xu@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": "<20220823055939.4186198-3-ke1.xu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220823055939.4186198-3-ke1.xu@intel.com", "date": "2022-08-23T05:59:39", "name": "[V1,2/2] tests/tso: modify get_chksum_value_and_verify to improve the performance", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5ca0b0415d40ee6f473f9dc3e096b60bf02a9f84", "submitter": { "id": 2810, "url": "https://patches.dpdk.org/api/people/2810/?format=api", "name": "Ke Xu", "email": "ke1.xu@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dts/patch/20220823055939.4186198-3-ke1.xu@intel.com/mbox/", "series": [ { "id": 24388, "url": "https://patches.dpdk.org/api/series/24388/?format=api", "web_url": "https://patches.dpdk.org/project/dts/list/?series=24388", "date": "2022-08-23T05:59:37", "name": "tests/tso: modify get_chksum_value_and_verify to fix a checksum-verify error and improve the performance", "version": 1, "mbox": "https://patches.dpdk.org/series/24388/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/115351/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/115351/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 AB662A0093;\n\tTue, 23 Aug 2022 08:01:32 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A33C3410F2;\n\tTue, 23 Aug 2022 08:01:32 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id D8E42400D6\n for <dts@dpdk.org>; Tue, 23 Aug 2022 08:01:30 +0200 (CEST)", "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Aug 2022 23:01:29 -0700", "from unknown (HELO DPDK-XUKE-LAB.sh.intel.com) ([10.67.116.226])\n by orsmga003.jf.intel.com with ESMTP; 22 Aug 2022 23:01:28 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1661234491; x=1692770491;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=OPOXyTV8FMFACTJgS1aR6J1hCtEm8/ire+KhySTGYVI=;\n b=gFhUJXJhi4oHT8ifhEBdyNmdUFFUL26+J8uTYCzjeVF4KgQs1k36TdtV\n HMZKkPzKqmZBktXK3p/2BZe1OYQOYoGV9Xd49jqWNQ3cbdGXwGJQ5KPlN\n LL0nPZLPQUhqJ2HS4wmsDDx2edF6ueq51LfhTkiSdWAT/0Q+t43Do70yW\n 5Vkqv3vWzfID9EhYx0NQVF4dkH0OF93uY/bumVa4KKbPLGiMukMTJs3jp\n r5F2bIEzRkP1VimMB/JXKeU5jgv4iyR5Cz8N1hxvKmPlM7EqXDyhBVg0k\n PbbUnXK4hOdrnriAKVG/+8NuwoIGX53LCxFugHbavUrKaH7AMgFGSWki8 A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10447\"; a=\"273353171\"", "E=Sophos;i=\"5.93,256,1654585200\"; d=\"scan'208\";a=\"273353171\"", "E=Sophos;i=\"5.93,256,1654585200\"; d=\"scan'208\";a=\"560034984\"" ], "X-ExtLoop1": "1", "From": "Ke Xu <ke1.xu@intel.com>", "To": "dts@dpdk.org", "Cc": "qi.fu@intel.com,\n\tke1.xu@intel.com", "Subject": "[dts][PATCH V1 2/2] tests/tso: modify get_chksum_value_and_verify to\n improve the performance", "Date": "Tue, 23 Aug 2022 05:59:39 +0000", "Message-Id": "<20220823055939.4186198-3-ke1.xu@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220823055939.4186198-1-ke1.xu@intel.com>", "References": "<20220823055939.4186198-1-ke1.xu@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": "Function \"get_chksum_value_and_verify\" in test suite TSO case test_tso_tunneling\n is of low efficiency. Methods are wrongly used.\n\nDuplicated call to method \"packet.read_pcapfile\" in this function will lengthen\n the packet sequence stored in \"packet.pktgen.pkts\", consuming more time when\n save pcap file. Duplicated call to method \"packet.save_pcapfile\" is also time\n consuming.\n\nMethod \"pks.show\" and \"self.pks1[i].show\" is not used as expected. \"*.show\" is\n used to print the packet object, not intended to return a string. Current code\n is actually getting a method object and using \"str(*)\" method to turn a method\n object to a string, this may fail when \"*.show\" method is updated. The packet\n information printing here is equivilant to \"repr(pks)\".\n\nSigned-off-by: Ke Xu <ke1.xu@intel.com>\n---\n tests/TestSuite_tso.py | 25 +++++++++++++++----------\n 1 file changed, 15 insertions(+), 10 deletions(-)", "diff": "diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py\nindex ef63b7cf..a7d74ca3 100644\n--- a/tests/TestSuite_tso.py\n+++ b/tests/TestSuite_tso.py\n@@ -147,22 +147,27 @@ class TestTSO(TestCase):\n self.pks = packet.read_pcapfile(dump_pcap, self.tester)\n for i in range(len(self.pks)):\n pks = self.pks[i]\n- out = pks.show\n- chksum_list = re.findall(r\"chksum=(0x\\w+)\", str(out))\n+ out = repr(pks)\n+ chksum_list = re.findall(r\"chksum=(0x\\w+)\", out)\n pks[\"IP\"].chksum = None\n- if \"VXLAN\" in str(out):\n+ if \"VXLAN\" in out:\n pks[\"UDP\"].chksum = None\n pks[\"VXLAN\"][\"IP\"].chksum = None\n pks[\"VXLAN\"][\"TCP\"].chksum = None\n- elif \"GRE\" in str(out):\n+ elif \"GRE\" in out:\n pks[\"GRE\"][\"IP\"].chksum = None\n pks[\"GRE\"][\"TCP\"].chksum = None\n- packet.save_pcapfile(self.tester, filename=save_file)\n- self.pks1 = Packet().read_pcapfile(save_file, self.tester)\n- out1 = self.pks1[i].show\n- chksum_list1 = re.findall(r\"chksum=(0x\\w+)\", str(out1))\n- self.tester.send_expect(\"rm -rf %s\" % save_file, \"#\")\n- if self.nic in Nic_list and \"VXLAN\" in str(out):\n+ packet.save_pcapfile(self.tester, filename=save_file)\n+ self.pks = Packet().read_pcapfile(dump_pcap, self.tester)\n+ self.pks1 = Packet().read_pcapfile(save_file, self.tester)\n+ self.tester.send_expect(\"rm -rf %s\" % save_file, \"#\")\n+ for i in range(len(self.pks1)):\n+ pks = self.pks[i]\n+ out = repr(pks)\n+ chksum_list = re.findall(r\"chksum=(0x\\w+)\", out)\n+ out1 = repr(self.pks1[i])\n+ chksum_list1 = re.findall(r\"chksum=(0x\\w+)\", out1)\n+ if self.nic in Nic_list and \"VXLAN\" in out:\n self.verify(\n chksum_list[0] == chksum_list1[0]\n and chksum_list[2] == chksum_list1[2]\n", "prefixes": [ "V1", "2/2" ] }{ "id": 115351, "url": "