get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126151,
    "url": "http://patches.dpdk.org/api/patches/126151/?format=api",
    "web_url": "http://patches.dpdk.org/project/dts/patch/20230417105254.136624-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": "<20230417105254.136624-3-songx.jiale@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20230417105254.136624-3-songx.jiale@intel.com",
    "date": "2023-04-17T10:52:54",
    "name": "[PACTH,V2,2/2] tests/stats_checks: add a case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "aa06ac2cad1f2f8e4ac6360789705e9f8652d17f",
    "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/20230417105254.136624-3-songx.jiale@intel.com/mbox/",
    "series": [
        {
            "id": 27730,
            "url": "http://patches.dpdk.org/api/series/27730/?format=api",
            "web_url": "http://patches.dpdk.org/project/dts/list/?series=27730",
            "date": "2023-04-17T10:52:52",
            "name": "add a case to test pf negative xstats check",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/27730/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126151/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/126151/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 B0CAB42966;\n\tMon, 17 Apr 2023 04:35:23 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AD4D1410EA;\n\tMon, 17 Apr 2023 04:35:23 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id 506604021D\n for <dts@dpdk.org>; Mon, 17 Apr 2023 04:35:22 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Apr 2023 19:35:21 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.252.96])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Apr 2023 19:35:20 -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=1681698922; x=1713234922;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=nzE5leo8Zgl7b2qgJvNP+vu14UwCs0lnarPGOqLDxSk=;\n b=hHG3dulM8NnshxqGhHrgtE2wgCviiTq8hOE1NUyZRhfKvqwLcm8A5kpf\n TJxse0RltLgjoUGgwZy2T+MmYvIr6DSaEY/iBfxEXjDncUVEUbPGkSdns\n nb6saeCSiwiRK9ARMSistaVWGYKuZ1jM+dMicIx89YuYaqV/vFpozj4NX\n DC+RPA48TML++6GUkjLXMc7g685BWoFaUXPa/I53DBjryTvbPZMRlEgx0\n diCWZwTFZngKUj9A3E21BEx6jdJ9OBLat2fi1epxxCMeqCXi3oXsCIFZV\n XCMtCy+8btWvvveNUiMng+W/T6JzxZQoCcX9hUYB51GJDaVtrvlRQCuZ0 A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10682\"; a=\"342279458\"",
            "E=Sophos;i=\"5.99,203,1677571200\"; d=\"scan'208\";a=\"342279458\"",
            "E=McAfee;i=\"6600,9927,10682\"; a=\"667955753\"",
            "E=Sophos;i=\"5.99,203,1677571200\"; d=\"scan'208\";a=\"667955753\""
        ],
        "X-ExtLoop1": "1",
        "From": "Jiale Song <songx.jiale@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Jiale Song <songx.jiale@intel.com>",
        "Subject": "[dts] [PACTH V2 2/2] tests/stats_checks: add a case",
        "Date": "Mon, 17 Apr 2023 10:52:54 +0000",
        "Message-Id": "<20230417105254.136624-3-songx.jiale@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230417105254.136624-1-songx.jiale@intel.com>",
        "References": "<20230417105254.136624-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": "add a case to test pf negative xstats check.\n\nSigned-off-by: Jiale Song <songx.jiale@intel.com>\n---\n tests/TestSuite_stats_checks.py | 47 +++++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)",
    "diff": "diff --git a/tests/TestSuite_stats_checks.py b/tests/TestSuite_stats_checks.py\nindex 6ab5dd19..a9c6e040 100644\n--- a/tests/TestSuite_stats_checks.py\n+++ b/tests/TestSuite_stats_checks.py\n@@ -28,6 +28,8 @@ prefix_list = [\n     \"tx_good_packets\",\n     \"rx_good_bytes\",\n     \"tx_good_bytes\",\n+    \"rx_errors\",\n+    \"rx_unicast_packets\",\n     \"tx_size_64_packets\",\n     \"tx_size_65_to_127_packets\",\n     \"tx_size_128_to_255_packets\",\n@@ -42,6 +44,7 @@ prefix_list = [\n     \"rx_size_512_to_1023_packets\",\n     \"rx_size_1024_to_1522_packets\",\n     \"rx_size_1523_to_max_packets\",\n+    \"rx_oversize_errors\",\n     \"rx_size_1024_to_max_packets\",  # ixgbe\n     \"tx_size_1024_to_max_packets\",  # ixgbe\n ]\n@@ -384,6 +387,7 @@ class TestStatsChecks(TestCase):\n         \"\"\"\n         self.netobj_0.enable_jumbo(framesize=1518)\n         self.netobj_1.enable_jumbo(framesize=1518)\n+        self.pmdout.quit()\n         self.dut.kill_all()\n         if self._suite_result.test_case == \"test_xstats_check_vf\":\n             self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0])\n@@ -442,3 +446,46 @@ class TestStatsChecks(TestCase):\n                 dcf_flag=self.dcf_mode, param=\"--txq=4 --rxq=4 --max-pkt-len=9000\"\n             )\n         self.xstats_check(0, 0, if_vf=True)\n+\n+    def test_negative_xstats_check_pf(self):\n+        \"\"\"\n+        Test Case: PF negative xstats check\n+        \"\"\"\n+        self.pmdout.start_testpmd(\"default\")\n+        self.pmdout.execute_cmd(\"set fwd mac\")\n+        self.pmdout.execute_cmd(\"start\")\n+        self.netobj_0.enable_jumbo(framesize=5018)\n+        self.pmdout.wait_link_status_up(\"all\")\n+        self.pmdout.execute_cmd(\"clear port xstats all\")\n+        self.pmdout.execute_cmd(\"show port xstats all\")\n+        # send jumbo frames\n+        self.send_scapy_packet(\n+            self.rx_port,\n+            f'Ether(dst=dutmac, src=\"52:00:00:00:00:00\")/IP()/Raw(load=\"X\"*4980)',\n+        )\n+        # get all port xstats\n+        all_xstats = self.get_xstats([self.rx_port, self.tx_port])\n+        rx_xstats = all_xstats[self.rx_port]\n+        # check rx port can not receive packet and rx_errors increased\n+        for key, value in rx_xstats.items():\n+            if key in [\"rx_errors\", \"rx_oversize_errors\"]:\n+                self.verify(\n+                    value == 1,\n+                    \"the expected value of %s is 1, but the actual value is %s!!!\"\n+                    % (key, value),\n+                )\n+            else:\n+                self.verify(\n+                    value == 0,\n+                    \"the expected value of %s is 0, but the actual value is %s!!!\"\n+                    % (key, value),\n+                )\n+        # check all statistics are 0 for tx port.\n+        tx_xstats = all_xstats[self.tx_port]\n+        for key, value in tx_xstats.items():\n+            self.verify(\n+                value == 0,\n+                \"the expected value of %s is 0, but the actual value is %s!!!\"\n+                % (key, value),\n+            )\n+        self.pmdout.execute_cmd(\"stop\")\n",
    "prefixes": [
        "PACTH",
        "V2",
        "2/2"
    ]
}