get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87686,
    "url": "http://patchwork.dpdk.org/api/patches/87686/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1612355037-48768-10-git-send-email-oulijun@huawei.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": "<1612355037-48768-10-git-send-email-oulijun@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1612355037-48768-10-git-send-email-oulijun@huawei.com",
    "date": "2021-02-03T12:23:55",
    "name": "[09/11] net/hns3: fix cmdq cleared during firmware process",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e668aaa5466e23159a99bb5bbd3963add47c2654",
    "submitter": {
        "id": 1675,
        "url": "http://patchwork.dpdk.org/api/people/1675/?format=api",
        "name": "Lijun Ou",
        "email": "oulijun@huawei.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/1612355037-48768-10-git-send-email-oulijun@huawei.com/mbox/",
    "series": [
        {
            "id": 15123,
            "url": "http://patchwork.dpdk.org/api/series/15123/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15123",
            "date": "2021-02-03T12:23:47",
            "name": "critical bugfixes for hns3",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/15123/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/87686/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/87686/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6F904A0A0E;\n\tWed,  3 Feb 2021 13:25:37 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 939D2240579;\n\tWed,  3 Feb 2021 13:24:38 +0100 (CET)",
            "from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by mails.dpdk.org (Postfix) with ESMTP id B517C24052C\n for <dev@dpdk.org>; Wed,  3 Feb 2021 13:24:30 +0100 (CET)",
            "from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60])\n by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DW1710C6zzjHHr;\n Wed,  3 Feb 2021 20:23:25 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id\n 14.3.498.0; Wed, 3 Feb 2021 20:24:24 +0800"
        ],
        "From": "Lijun Ou <oulijun@huawei.com>",
        "To": "<ferruh.yigit@intel.com>",
        "CC": "<dev@dpdk.org>, <linuxarm@openeuler.org>",
        "Date": "Wed, 3 Feb 2021 20:23:55 +0800",
        "Message-ID": "<1612355037-48768-10-git-send-email-oulijun@huawei.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1612355037-48768-1-git-send-email-oulijun@huawei.com>",
        "References": "<1612355037-48768-1-git-send-email-oulijun@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-CFilter-Loop": "Reflected",
        "Subject": "[dpdk-dev] [PATCH 09/11] net/hns3: fix cmdq cleared during firmware\n process",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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: Chengchang Tang <tangchengchang@huawei.com>\n\nThere are two scenarios that command queue uninit performed\nconcurrently with the firmware command: asynchronous command\nand timeout command.\n\nFor asynchronous command, if a large number of functions send\ncommands, these commands may need to be queued to wait for\nfirmware processing. If a function is uninited suddenly, CMDQ\nclearing and firmware processing may be performed concurrently.\n\nFor timeout command, if the command failed due to busy scheduling\nof firmware, this command will be processed in the next scheduling.\nAnd this may lead to concurrency.\n\nThe preceding concurrency may lead to a firmware exceptions.\n\nThis patch add a waiting time to ensure the firmware complete the\nprocessing of left over command when PMD uninit.\n\nFixes: 737f30e1c3ab (\"net/hns3: support command interface with firmware\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengchang Tang <tangchengchang@huawei.com>\nSigned-off-by: Lijun Ou <oulijun@huawei.com>\n---\n drivers/net/hns3/hns3_cmd.c | 14 +++++++++++++-\n drivers/net/hns3/hns3_cmd.h |  1 +\n 2 files changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c\nindex 3d6ffc0..32cd56b 100644\n--- a/drivers/net/hns3/hns3_cmd.c\n+++ b/drivers/net/hns3/hns3_cmd.c\n@@ -582,9 +582,21 @@ hns3_cmd_destroy_queue(struct hns3_hw *hw)\n void\n hns3_cmd_uninit(struct hns3_hw *hw)\n {\n+\t__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);\n+\n+\t/*\n+\t * A delay is added to ensure that the register cleanup operations\n+\t * will not be performed concurrently with the firmware command and\n+\t * ensure that all the reserved commands are executed.\n+\t * Concurrency may occur in two scenarios: asynchronous command and\n+\t * timeout command. If the command fails to be executed due to busy\n+\t * scheduling, the command will be processed in the next scheduling\n+\t * of the firmware.\n+\t */\n+\trte_delay_ms(HNS3_CMDQ_CLEAR_WAIT_TIME);\n+\n \trte_spinlock_lock(&hw->cmq.csq.lock);\n \trte_spinlock_lock(&hw->cmq.crq.lock);\n-\t__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);\n \thns3_cmd_clear_regs(hw);\n \trte_spinlock_unlock(&hw->cmq.crq.lock);\n \trte_spinlock_unlock(&hw->cmq.csq.lock);\ndiff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h\nindex 5640fe4..5010278 100644\n--- a/drivers/net/hns3/hns3_cmd.h\n+++ b/drivers/net/hns3/hns3_cmd.h\n@@ -8,6 +8,7 @@\n #include <stdint.h>\n \n #define HNS3_CMDQ_TX_TIMEOUT\t\t30000\n+#define HNS3_CMDQ_CLEAR_WAIT_TIME\t200\n #define HNS3_CMDQ_RX_INVLD_B\t\t0\n #define HNS3_CMDQ_RX_OUTVLD_B\t\t1\n #define HNS3_CMD_DESC_ALIGNMENT\t\t4096\n",
    "prefixes": [
        "09/11"
    ]
}