get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86172,
    "url": "https://patches.dpdk.org/api/patches/86172/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20210108141953.8575-4-qinx.sun@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": "<20210108141953.8575-4-qinx.sun@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20210108141953.8575-4-qinx.sun@intel.com",
    "date": "2021-01-08T14:19:53",
    "name": "[V1,3/3] tests/cvl_fdir change method to get maximum threshold of rules",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "df5380b0cf639f2a534b57d3e19aa594794c005b",
    "submitter": {
        "id": 1956,
        "url": "https://patches.dpdk.org/api/people/1956/?format=api",
        "name": "Sun, QinX",
        "email": "qinx.sun@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20210108141953.8575-4-qinx.sun@intel.com/mbox/",
    "series": [
        {
            "id": 14592,
            "url": "https://patches.dpdk.org/api/series/14592/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=14592",
            "date": "2021-01-08T14:19:50",
            "name": "change method to get maximum number of rules",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/14592/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86172/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/86172/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 (xvm-189-124.dc0.ghst.net [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AE69FA0524;\n\tFri,  8 Jan 2021 06:45:59 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A8D81140E1D;\n\tFri,  8 Jan 2021 06:45:59 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id D8BAD140E1D\n for <dts@dpdk.org>; Fri,  8 Jan 2021 06:45:58 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jan 2021 21:45:58 -0800",
            "from unknown (HELO dpdk-wenjielx-tetser203.icx.intel.com)\n ([10.240.183.105])\n by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jan 2021 21:45:57 -0800"
        ],
        "IronPort-SDR": [
            "\n O18BYBhHbKojZXdrZrDMLmYFdpcx5gXosfDV9oZ4e9HGf3AMx9Zep9doBvl35ps7WfWhc4pXBE\n P/CPQn15t05Q==",
            "\n 1tQZiGNgGpeyTx1XDzD4R0juPQgobkp3wgIS5pMElLkRnx1bL+oqhMfzX4aeTabqou6hG7yrUH\n GxWGriJsfWwQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9857\"; a=\"174037270\"",
            "E=Sophos;i=\"5.79,330,1602572400\"; d=\"scan'208\";a=\"174037270\"",
            "E=Sophos;i=\"5.79,330,1602572400\"; d=\"scan'208\";a=\"422842668\""
        ],
        "From": "sunqin <qinx.sun@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "sunqin <qinx.sun@intel.com>",
        "Date": "Fri,  8 Jan 2021 14:19:53 +0000",
        "Message-Id": "<20210108141953.8575-4-qinx.sun@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20210108141953.8575-1-qinx.sun@intel.com>",
        "References": "<20210108141953.8575-1-qinx.sun@intel.com>",
        "Subject": "[dts] [PATCH V1 3/3] tests/cvl_fdir change method to get maximum\n threshold of rules",
        "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": "Use 'get_max_rule_number' method to get maximum number of rules.\n\nSigned-off-by: sunqin <qinx.sun@intel.com>\n---\n tests/TestSuite_cvl_fdir.py | 32 +++++++++++++-------------------\n 1 file changed, 13 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_cvl_fdir.py b/tests/TestSuite_cvl_fdir.py\nindex 31bdfc7d..ca16c137 100644\n--- a/tests/TestSuite_cvl_fdir.py\n+++ b/tests/TestSuite_cvl_fdir.py\n@@ -2264,6 +2264,10 @@ class TestCVLFdir(TestCase):\n \n         self.pkt = Packet()\n         self.pmd_output = PmdOutput(self.dut)\n+        pf_pci = self.dut.ports_info[0]['pci']\n+        out = self.pmd_output.start_testpmd('default', eal_param='-a %s --log-level=ice,7'%pf_pci)\n+        self.dut.send_expect(\"quit\", \"# \")\n+        self.max_rule_num = self.pmd_output.get_max_rule_number(self, out)\n         self.launch_testpmd_with_mark()\n \n     def set_up(self):\n@@ -3070,24 +3074,14 @@ class TestCVLFdir(TestCase):\n         # and there are 14k rules shared by pfs and vfs\n         # so 1 pf and 2 vfs can create 15360 rules at most on 2 ports card\n         # 1 pf and 2 vfs can create 14848 rules at most on 4 ports card\n-        if self.nic in ['columbiaville_100g']:\n-            rule_li = list(map(str, range(15360)))\n-            pkts = ['Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.0.0\")/Raw(\"x\" * 80)',\n-                    'Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.59.255\")/Raw(\"x\" * 80)']\n-            for i in range(60):\n-                for j in range(256):\n-                    rules.append(rule_pattern % (i, j))\n-                    pkts2.append(pkt_pattern % (i, j))\n-        elif self.nic in ['columbiaville_25g']:\n-            rule_li = list(map(str, range(14848)))\n-            pkts = ['Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.0.0\")/Raw(\"x\" * 80)',\n-                    'Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.57.255\")/Raw(\"x\" * 80)']\n-            for i in range(58):\n-                for j in range(256):\n-                    rules.append(rule_pattern % (i, j))\n-                    pkts2.append(pkt_pattern % (i, j))\n-        else:\n-            raise Exception('%s not supported by this case' % self.nic)\n+        count = int(self.max_rule_num/256)\n+        rule_li = list(map(str, range(self.max_rule_num)))\n+        pkts = ['Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.0.0\")/Raw(\"x\" * 80)',\n+                'Ether(dst=\"00:11:22:33:44:55\")/IP(src=\"192.168.100.20\",dst=\"192.168.%s.255\")/Raw(\"x\" * 80)'%(count-1)]\n+        for i in range(count):\n+            for j in range(256):\n+                rules.append(rule_pattern % (i, j))\n+                pkts2.append(pkt_pattern % (i, j))\n         cmd_path = '/tmp/test_max_rules'\n         cmd_li = map(lambda x: x + os.linesep, rules)\n         with open(cmd_path, 'w') as f:\n@@ -3104,7 +3098,7 @@ class TestCVLFdir(TestCase):\n             self.verify('Failed to create flow' not in out, \"create some rule failed\")\n             self.config_testpmd()\n             self.pmd_output.execute_cmd('start')\n-            rule = \"flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.60.0 / end actions queue index 1 / mark / end\"\n+            rule = \"flow create 0 ingress pattern eth / ipv4 src is 192.168.100.20 dst is 192.168.65.0 / end actions queue index 1 / mark / end\"\n             self.create_fdir_rule(rule=rule, check_stats=False, msg='Failed to create flow', validate=False)\n             self.check_fdir_rule(port_id=0, stats=True, rule_list=rule_li)\n             out1 = self.send_pkts_getouput(pkts=pkts, port_id=0, count=1)\n",
    "prefixes": [
        "V1",
        "3/3"
    ]
}