get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75927,
    "url": "http://patchwork.dpdk.org/api/patches/75927/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200825115305.58490-7-huwei013@chinasoftinc.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200825115305.58490-7-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200825115305.58490-7-huwei013@chinasoftinc.com",
    "date": "2020-08-25T11:53:00",
    "name": "[06/11] net/hns3: support a maximun 256 FDIR counter",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "971c1bf59503a44eb4e7f2e0947cbfbf7de32d77",
    "submitter": {
        "id": 1537,
        "url": "http://patchwork.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200825115305.58490-7-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 11778,
            "url": "http://patchwork.dpdk.org/api/series/11778/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11778",
            "date": "2020-08-25T11:52:54",
            "name": "updates for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/11778/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/75927/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/75927/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8418DA04B1;\n\tTue, 25 Aug 2020 13:54:36 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E4DF91C25A;\n\tTue, 25 Aug 2020 13:53:44 +0200 (CEST)",
            "from mail.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 860021C126\n for <dev@dpdk.org>; Tue, 25 Aug 2020 13:53:41 +0200 (CEST)",
            "from localhost.localdomain (65.49.108.226) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 25 Aug 2020\n 19:53:32 +0800"
        ],
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@intel.com>, <xavier.huwei@huawei.com>",
        "Date": "Tue, 25 Aug 2020 19:53:00 +0800",
        "Message-ID": "<20200825115305.58490-7-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20200825115305.58490-1-huwei013@chinasoftinc.com>",
        "References": "<20200825115305.58490-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[65.49.108.226]",
        "Subject": "[dpdk-dev] [PATCH 06/11] net/hns3: support a maximun 256 FDIR\n\tcounter",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nThe FDIR counter was used to count the number of FDIR hit, the maximum\nnumber of the counter is 128 based on kunpeng 920, and it was 256 based\non kunpeng 930.\n\nThe firmware is responsible to allocate counters for diffent PF devices,\nso the available counter number of one PF may be bigger than 128.\n\nCurrently, there are two places using the counter in hns3 PMD driver:\n1. Configure the counter. Driver uses the command whose opcode is\n   HNS3_OPC_FD_AD_OP, now we extend one bit to hold the high bit of\n   counter-id in the command format.\n2. Query the statistic information of the counter. Driver uses the command\n   whose opcode is HNS3_OPC_FD_COUNTER_OP, now the command already support\n   16-bit counter-id.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_fdir.c | 5 +++++\n 1 file changed, 5 insertions(+)",
    "diff": "diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c\nindex 6ab439d06..5c3dd05f2 100644\n--- a/drivers/net/hns3/hns3_fdir.c\n+++ b/drivers/net/hns3/hns3_fdir.c\n@@ -41,6 +41,8 @@\n #define HNS3_FD_AD_WR_RULE_ID_B\t0\n #define HNS3_FD_AD_RULE_ID_S\t\t1\n #define HNS3_FD_AD_RULE_ID_M\t\tGENMASK(13, 1)\n+#define HNS3_FD_AD_COUNTER_HIGH_BIT     7\n+#define HNS3_FD_AD_COUNTER_HIGH_BIT_B   26\n \n enum HNS3_PORT_TYPE {\n \tHOST_PORT,\n@@ -424,6 +426,9 @@ static int hns3_fd_ad_config(struct hns3_hw *hw, int loc,\n \t\t     action->write_rule_id_to_bd);\n \thns3_set_field(ad_data, HNS3_FD_AD_RULE_ID_M, HNS3_FD_AD_RULE_ID_S,\n \t\t       action->rule_id);\n+\t/* set extend bit if counter_id is in [128 ~ 255] */\n+\tif (action->counter_id & BIT(HNS3_FD_AD_COUNTER_HIGH_BIT))\n+\t\thns3_set_bit(ad_data, HNS3_FD_AD_COUNTER_HIGH_BIT_B, 1);\n \tad_data <<= HNS3_FD_AD_DATA_S;\n \thns3_set_bit(ad_data, HNS3_FD_AD_DROP_B, action->drop_packet);\n \thns3_set_bit(ad_data, HNS3_FD_AD_DIRECT_QID_B,\n",
    "prefixes": [
        "06/11"
    ]
}