get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 125311,
    "url": "http://patches.dpdk.org/api/patches/125311/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20230320180503.3307034-3-songx.jiale@intel.com/",
    "project": {
        "id": 3,
        "url": "http://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": "<20230320180503.3307034-3-songx.jiale@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230320180503.3307034-3-songx.jiale@intel.com",
    "date": "2023-03-20T18:05:03",
    "name": "[V2,2/2] tests/ipv4_reassembly: modify script to adapt changes in dpdk",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "48ae39600c261f3b4c3bea03ccadc5787d257a77",
    "submitter": {
        "id": 2352,
        "url": "http://patches.dpdk.org/api/people/2352/?format=api",
        "name": "Jiale, SongX",
        "email": "songx.jiale@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dts/patch/20230320180503.3307034-3-songx.jiale@intel.com/mbox/",
    "series": [
        {
            "id": 27460,
            "url": "http://patches.dpdk.org/api/series/27460/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=27460",
            "date": "2023-03-20T18:05:01",
            "name": "modify script to adapt changes in dpdk",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/27460/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/125311/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/125311/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 E3185427E0;\n\tMon, 20 Mar 2023 11:08:26 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DD8A9410EF;\n\tMon, 20 Mar 2023 11:08:26 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 509BA406BC\n for <dts@dpdk.org>; Mon, 20 Mar 2023 11:08:25 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Mar 2023 03:08:24 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.252.20])\n by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Mar 2023 03:08:23 -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=1679306905; x=1710842905;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=bUeeXQAtdi+z+KRULdEPL6FCHoFRKhG/X9MEsypu7p8=;\n b=In+MyUk9ba+PWwvw5sghaZDEJhR2Irm4zWwVnxn8kf48oqZxy3hAI9/p\n hwlCN9V9RP3hcM66myd3d1FHIK1FOI+y73ylAj23/DtwAWTLJkyrRMDdk\n KnkNGHSk8dukBGI2Zs4fLxs2Chnw6lTvoxW8LjD1W7JCN+AXMiTNa9cvP\n iI5HjPRsmD5hq+sfCigAIBTpG6eaQkllq22JxOo+pzLtPw08S102b9r9o\n 4tKfIxUnm7Y2lvAZ06wDfDeGjwl7P7Y0UH+R7d32TJd8GNa2187Mckxfm\n CFPL5apGfmxMN8cgylbY2XMGvT3xXDPb3ShZDH1m0MwzNBAfk9+Xw4O0S A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10654\"; a=\"366339390\"",
            "E=Sophos;i=\"5.98,274,1673942400\"; d=\"scan'208\";a=\"366339390\"",
            "E=McAfee;i=\"6600,9927,10654\"; a=\"926914607\"",
            "E=Sophos;i=\"5.98,274,1673942400\"; d=\"scan'208\";a=\"926914607\""
        ],
        "X-ExtLoop1": "1",
        "From": "Song Jiale <songx.jiale@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Song Jiale <songx.jiale@intel.com>",
        "Subject": "[dts] [PATCH V2 2/2] tests/ipv4_reassembly: modify script to adapt\n changes in dpdk",
        "Date": "Mon, 20 Mar 2023 18:05:03 +0000",
        "Message-Id": "<20230320180503.3307034-3-songx.jiale@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230320180503.3307034-1-songx.jiale@intel.com>",
        "References": "<20230320180503.3307034-1-songx.jiale@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": "DPDK increase default value for config parameter RTE_LIBRTE_IP_FRAG_MAX_FRAG from 4 to 8.\nModify the script to adapt to this change.\n\nAccording to dpdk commit f8e0f8ce90303b(\"ip_frag: increase default maximum of fragments\").\n\nSigned-off-by: Song Jiale <songx.jiale@intel.com>\n---\n tests/TestSuite_ipv4_reassembly.py | 40 ++++++++++++++++++++++--------\n 1 file changed, 30 insertions(+), 10 deletions(-)\n\nV2:\n-modify incorrect parameters.",
    "diff": "diff --git a/tests/TestSuite_ipv4_reassembly.py b/tests/TestSuite_ipv4_reassembly.py\nindex 58b3fe3e..1e9f7f4e 100644\n--- a/tests/TestSuite_ipv4_reassembly.py\n+++ b/tests/TestSuite_ipv4_reassembly.py\n@@ -10,6 +10,7 @@ Test the IP reassembly feature\n \"\"\"\n \n import os\n+import re\n import time\n \n from scapy.layers.inet import IP, TCP, Ether, fragment\n@@ -92,7 +93,7 @@ class TestIpReassembly(TestCase):\n     # Test cases.\n     #\n \n-    def set_max_num_of_fragments(self, num_of_fragments=4):\n+    def set_max_num_of_fragments(self, num_of_fragments):\n         \"\"\"\n         Changes the maximum number of frames by modifying the example app code.\n         \"\"\"\n@@ -104,6 +105,22 @@ class TestIpReassembly(TestCase):\n         self.dut.send_expect(\"rm -rf %s\" % self.target, \"# \", 5)\n         self.dut.build_install_dpdk(self.target)\n \n+    def get_dpdk_default_config(self, config_params, config_file=\"\"):\n+        if config_file == \"\":\n+            config_file = \"config/rte_config.h\"\n+        out = self.dut.send_expect(\n+            \"cat %s | grep %s\" % (config_file, config_params), \"[~|~\\]]# \"\n+        )\n+        if len(out) == 0:\n+            self.verify(False, \"Not Found Parameter %s !!!\" % config_params)\n+        regex = r\"#define\\s+%s\\s+(\\d+)\" % config_params\n+        m = re.match(regex, out)\n+        if m:\n+            default_value = m.group(1)\n+            return int(default_value)\n+        else:\n+            self.verify(False, \"Not Get Parameter %s Value!!!\" % config_params)\n+\n     def set_tester_iface_mtu(self, iface, mtu=1500):\n         \"\"\"\n         Set the interface MTU value.\n@@ -393,6 +410,9 @@ class TestIpReassembly(TestCase):\n         dut_ports = self.dut.get_ports(self.nic)\n         dut_port = dut_ports[0]\n         self.destination_mac = self.dut.get_mac_address(dut_port)\n+        self.default_max_fragments = self.get_dpdk_default_config(\n+            \"RTE_LIBRTE_IP_FRAG_MAX_FRAG\"\n+        )\n \n     def test_send_1K_frames_split_in_4_and_1K_maxflows(self):\n         \"\"\"\n@@ -442,14 +462,10 @@ class TestIpReassembly(TestCase):\n             self.verify_all()\n             self.dut.send_expect(\"^C\", \"# \")\n             time.sleep(5)\n-            self.set_max_num_of_fragments(4)\n-            time.sleep(5)\n \n         except Exception as e:\n             self.dut.send_expect(\"^C\", \"# \")\n             time.sleep(2)\n-            self.set_max_num_of_fragments()\n-            self.compile_example_app()\n             raise e\n \n     def test_packets_are_forwarded_after_ttl_timeout(self):\n@@ -500,12 +516,14 @@ class TestIpReassembly(TestCase):\n \n     def test_send_more_fragments_than_supported(self):\n         \"\"\"\n-        Sends 1 frame split in 5 fragments. Since the max number of\n-        fragments is set to 4 by default, the packet can't be forwarded back.\n+        Sends 1 frame split in into maximum fragments + 1 fragment, the packet can't be forwarded back.\n         \"\"\"\n \n         self.test_config = IpReassemblyTestConfig(\n-            self, number_of_frames=1, frags_per_frame=5, payload_size=180\n+            self,\n+            number_of_frames=1,\n+            frags_per_frame=self.default_max_fragments + 1,\n+            payload_size=(self.default_max_fragments + 1) * 40 - 20,\n         )\n         self.execute_example_app()\n \n@@ -527,7 +545,6 @@ class TestIpReassembly(TestCase):\n         self.test_config = IpReassemblyTestConfig(\n             self, number_of_frames=1, flowttl=\"3s\"\n         )\n-        self.compile_example_app()\n         self.execute_example_app()\n         self.tcpdump_start_sniffing()\n \n@@ -563,7 +580,6 @@ class TestIpReassembly(TestCase):\n         )\n         try:\n             self.set_tester_iface_mtu(self.test_config.tester_iface, mtu)\n-            self.compile_example_app()\n             self.execute_example_app()\n             self.send_n_siff_packets()\n             self.verify_all()\n@@ -602,6 +618,10 @@ class TestIpReassembly(TestCase):\n         \"\"\"\n \n         self.dut.send_expect(\"^C\", \"# \")\n+        self.max_fragments = self.get_dpdk_default_config(\"RTE_LIBRTE_IP_FRAG_MAX_FRAG\")\n+        if self.max_fragments != self.default_max_fragments:\n+            self.set_max_num_of_fragments(self.default_max_fragments)\n+            self.compile_example_app()\n \n     def tear_down_all(self):\n         \"\"\"\n",
    "prefixes": [
        "V2",
        "2/2"
    ]
}