get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/96367/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 96367,
    "url": "http://patchwork.dpdk.org/api/patches/96367/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dts/patch/1627539383-26588-3-git-send-email-yux.jiang@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": "<1627539383-26588-3-git-send-email-yux.jiang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/1627539383-26588-3-git-send-email-yux.jiang@intel.com",
    "date": "2021-07-29T06:16:23",
    "name": "[V1,2/2] tests/rxtx_offload: add test case test_txoffload_port_multi_segs",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bb729fe44193bf2828b86e83f4bffa9f4019e25f",
    "submitter": {
        "id": 1709,
        "url": "http://patchwork.dpdk.org/api/people/1709/?format=api",
        "name": "Yu Jiang",
        "email": "yux.jiang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dts/patch/1627539383-26588-3-git-send-email-yux.jiang@intel.com/mbox/",
    "series": [
        {
            "id": 18047,
            "url": "http://patchwork.dpdk.org/api/series/18047/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dts/list/?series=18047",
            "date": "2021-07-29T06:16:22",
            "name": "add test plan and tests: tx offload multi_segs setting",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18047/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96367/comments/",
    "check": "pending",
    "checks": "http://patchwork.dpdk.org/api/patches/96367/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 A8F45A0C45;\n\tThu, 29 Jul 2021 08:16:59 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3C8AF410E3;\n\tThu, 29 Jul 2021 08:16:59 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id A396940687\n for <dts@dpdk.org>; Thu, 29 Jul 2021 08:16:57 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Jul 2021 23:16:55 -0700",
            "from odcacrnlx2.sh.intel.com ([10.240.183.163])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA;\n 28 Jul 2021 23:16:53 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10059\"; a=\"200028949\"",
            "E=Sophos;i=\"5.84,278,1620716400\"; d=\"scan'208\";a=\"200028949\"",
            "E=Sophos;i=\"5.84,278,1620716400\"; d=\"scan'208\";a=\"476213794\""
        ],
        "From": "Yu Jiang <yux.jiang@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Yu Jiang <yux.jiang@intel.com>",
        "Date": "Thu, 29 Jul 2021 14:16:23 +0800",
        "Message-Id": "<1627539383-26588-3-git-send-email-yux.jiang@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1627539383-26588-1-git-send-email-yux.jiang@intel.com>",
        "References": "<1627539383-26588-1-git-send-email-yux.jiang@intel.com>",
        "Subject": "[dts] [PATCH V1 2/2] tests/rxtx_offload: add test case\n test_txoffload_port_multi_segs",
        "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": "add test case test_txoffload_port_multi_segs\n\nSigned-off-by: Yu Jiang <yux.jiang@intel.com>\n---\n tests/TestSuite_rxtx_offload.py | 66 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 66 insertions(+)",
    "diff": "diff --git a/tests/TestSuite_rxtx_offload.py b/tests/TestSuite_rxtx_offload.py\nindex 0e70526..48fb739 100644\n--- a/tests/TestSuite_rxtx_offload.py\n+++ b/tests/TestSuite_rxtx_offload.py\n@@ -209,6 +209,26 @@ class TestRxTx_Offload(TestCase):\n                 acl_offload = offloads[offload[i]]\n                 self.verify(acl_offload in queue_line[i], \"Fail to configure offload by queue.\")\n             i = i + 1\n+\n+    def verify_packets_increasing(self, rxtx=\"tx\", count=2):\n+        # Verify RXTX-packets increasing on each ports, check count < 20\n+        out1 = self.dut.send_expect(\"show port stats all\", \"testpmd> \")\n+        i = 0\n+        while i < count:\n+            if rxtx == \"tx\":\n+                pks_l1 = re.findall(r'TX-packets: (\\w+)', out1)\n+                time.sleep(15)\n+                out1 = self.dut.send_expect(\"show port stats all\", \"testpmd> \")\n+                pks_l2 = re.findall(r'TX-packets: (\\w+)', out1)\n+                self.logger.info(\"Times=\"+ str(i) + \", count=\" + str(count) + \", pks2_cur=\" + str(pks_l2) + \", pks1_before=\" + str(pks_l1))\n+                for index in range(len(pks_l2)):\n+                    self.verify(int(pks_l2[index]) > int(pks_l1[index]), \"TX-packets hang\")\n+                if int(pks_l1[index]) < 300000000 or int(pks_l2[index]) < 300000000:\n+                    count += 1\n+            i += 1\n+            if count > 20:\n+                self.verify(False, \"Check count timeout\")\n+                break\n  \n     def get_queue_number(self, packet):\n         \"\"\"\n@@ -716,6 +736,52 @@ class TestRxTx_Offload(TestCase):\n         offload = [\"mbuf_fast_free\"]\n         self.check_port_config(\"tx\", offload)\n \n+    def test_txoffload_port_multi_segs(self):\n+        \"\"\"\n+        Tx offload multi_segs setting.\n+        \"\"\"\n+        offload = [\"multi_segs\"]\n+        # Start testpmd with \"--tx-offloads=0x00008000\" to enable multi_segs tx_offload\n+        self.pmdout.start_testpmd(\"%s\" % self.cores, \"--tx-offloads=0x00008000\")\n+        for portid in range(len(self.dut_ports)):\n+            self.check_port_config(rxtx=\"tx\", offload=offload, port_id=portid)\n+\n+        # Set fwd to txonly, Set the length of each segment of the TX-ONLY packets, Set the split policy for TX packets, then start to send pkgs\n+        self.dut.send_expect(\"set fwd txonly\", \"testpmd> \")\n+        self.dut.send_expect(\"set txpkts 64,64\", \"testpmd> \")\n+        self.dut.send_expect(\"set txsplit rand\", \"testpmd> \")\n+        self.dut.send_expect(\"start\", \"testpmd> \")\n+\n+        # Check TX-packets will not hang and continue to increase\n+        self.verify_packets_increasing(rxtx=\"tx\")\n+        self.dut.send_expect(\"stop\", \"testpmd> \")\n+        self.dut.send_expect(\"quit\", \"# \")\n+\n+        # Start testpmd again without \"--tx-offloads\", check multi-segs is disabled by default\n+        self.pmdout.start_testpmd(\"%s\" % self.cores, \" \")\n+        for portid in range(len(self.dut_ports)):\n+            outstring = self.dut.send_expect(\"show port %d tx_offload configuration\" % portid, \"testpmd> \")\n+            self.verify(\"MULTI_SEGS\" not in outstring, \"multi-segs is not disabled by default\")\n+\n+        self.dut.send_expect(\"port stop all\", \"testpmd> \")\n+        for portid in range(len(self.dut_ports)):\n+            cmd = \"port config {} tx_offload multi_segs on\".format(portid)\n+            self.dut.send_expect(cmd, \"testpmd> \")\n+        self.dut.send_expect(\"port start all\", \"testpmd> \")\n+        for portid in range(len(self.dut_ports)):\n+              self.check_port_config(rxtx=\"tx\", offload=offload, port_id=portid)\n+\n+        # Set fwd to txonly, Set the length of each segment of the TX-ONLY packets, Set the split policy for TX packets, then start to send pkgs\n+        self.dut.send_expect(\"set fwd txonly\", \"testpmd> \")\n+        self.dut.send_expect(\"set txpkts 64,64\", \"testpmd> \")\n+        self.dut.send_expect(\"set txsplit rand\", \"testpmd> \")\n+        self.dut.send_expect(\"start\", \"testpmd> \")\n+\n+        # Check TX-packets will not hang and continue to increase\n+        self.verify_packets_increasing(rxtx=\"tx\")\n+        self.dut.send_expect(\"stop\", \"testpmd> \")\n+        self.dut.send_expect(\"quit\", \"# \")\n+\n     def tear_down(self):\n         \"\"\"\n         Run after each test case.\n",
    "prefixes": [
        "V1",
        "2/2"
    ]
}