get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114274,
    "url": "http://patches.dpdk.org/api/patches/114274/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220727103616.18596-6-liudongdong3@huawei.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20220727103616.18596-6-liudongdong3@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220727103616.18596-6-liudongdong3@huawei.com",
    "date": "2022-07-27T10:36:13",
    "name": "[5/8] net/hns3: fix segment fault when secondary process access FW",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f1c939201312946cf64afe2e86d9f4fc0e50063a",
    "submitter": {
        "id": 2718,
        "url": "http://patches.dpdk.org/api/people/2718/?format=api",
        "name": "Dongdong Liu",
        "email": "liudongdong3@huawei.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220727103616.18596-6-liudongdong3@huawei.com/mbox/",
    "series": [
        {
            "id": 24104,
            "url": "http://patches.dpdk.org/api/series/24104/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24104",
            "date": "2022-07-27T10:36:08",
            "name": "some bugfixes for hns3",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/24104/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114274/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/114274/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 0B182A00C4;\n\tWed, 27 Jul 2022 12:37:43 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4C3CD42B70;\n\tWed, 27 Jul 2022 12:37:28 +0200 (CEST)",
            "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id 772FD40F19;\n Wed, 27 Jul 2022 12:37:26 +0200 (CEST)",
            "from kwepemi500017.china.huawei.com (unknown [172.30.72.54])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Lt9Bb59lMz1M8Gb;\n Wed, 27 Jul 2022 18:34:31 +0800 (CST)",
            "from localhost.localdomain (10.28.79.22) by\n kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 27 Jul 2022 18:37:24 +0800"
        ],
        "From": "Dongdong Liu <liudongdong3@huawei.com>",
        "To": "<dev@dpdk.org>, <andrew.rybchenko@oktetlabs.ru>,\n <ferruh.yigit@xilinx.com>, <thomas@monjalon.net>",
        "CC": "<stable@dpdk.org>, Chengwen Feng <fengchengwen@huawei.com>, Dongdong Liu\n <liudongdong3@huawei.com>, Yisen Zhuang <yisen.zhuang@huawei.com>, Anatoly\n Burakov <anatoly.burakov@intel.com>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Huisong Li <lihuisong@huawei.com>, \"Wei Hu (Xavier)\"\n <xavier.huwei@huawei.com>, Hao Chen <chenhao164@huawei.com>, \"Min Hu\n (Connor)\" <humin29@huawei.com>",
        "Subject": "[PATCH 5/8] net/hns3: fix segment fault when secondary process access\n FW",
        "Date": "Wed, 27 Jul 2022 18:36:13 +0800",
        "Message-ID": "<20220727103616.18596-6-liudongdong3@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20220727103616.18596-1-liudongdong3@huawei.com>",
        "References": "<20220727103616.18596-1-liudongdong3@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.28.79.22]",
        "X-ClientProxiedBy": "dggems702-chm.china.huawei.com (10.3.19.179) To\n kwepemi500017.china.huawei.com (7.221.188.110)",
        "X-CFilter-Loop": "Reflected",
        "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"
    },
    "content": "From: Chengwen Feng <fengchengwen@huawei.com>\n\nCurrently, to prevent missing reporting of reset interrupts and quickly\nidentify reset interrupts, the following logic is designed in the\nFW (firmware) command interface hns3_cmd_send: if an unprocessed\ninterrupt exist (by checking reset registers), related reset task is\nscheduled.\n\nThe secondary process may invoke the hns3_cmd_send interface (e.g. using\nproc-info query some stats). Unfortunately, the secondary process\ndoes not support reset processing, and a segment fault may occur if it\nschedules reset task.\n\nThis patch fixes it by limit the checking and scheduling of reset under\nonly primary process.\n\nFixes: 2790c6464725 (\"net/hns3: support device reset\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nSigned-off-by: Dongdong Liu <liudongdong3@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c    | 10 +++++++++-\n drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++++++--\n 2 files changed, 18 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 6b1d1a5fb1..aedd17ef26 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5601,7 +5601,15 @@ hns3_is_reset_pending(struct hns3_adapter *hns)\n \tstruct hns3_hw *hw = &hns->hw;\n \tenum hns3_reset_level reset;\n \n-\thns3_check_event_cause(hns, NULL);\n+\t/*\n+\t * Check the registers to confirm whether there is reset pending.\n+\t * Note: This check may lead to schedule reset task, but only primary\n+\t *       process can process the reset event. Therefore, limit the\n+\t *       checking under only primary process.\n+\t */\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\thns3_check_event_cause(hns, NULL);\n+\n \treset = hns3_get_reset_level(hns, &hw->reset.pending);\n \tif (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET &&\n \t    hw->reset.level < reset) {\ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 18504e6926..f3167523cf 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -1863,8 +1863,15 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)\n \tif (hw->reset.level == HNS3_VF_FULL_RESET)\n \t\treturn false;\n \n-\t/* Check the registers to confirm whether there is reset pending */\n-\thns3vf_check_event_cause(hns, NULL);\n+\t/*\n+\t * Check the registers to confirm whether there is reset pending.\n+\t * Note: This check may lead to schedule reset task, but only primary\n+\t *       process can process the reset event. Therefore, limit the\n+\t *       checking under only primary process.\n+\t */\n+\tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n+\t\thns3vf_check_event_cause(hns, NULL);\n+\n \treset = hns3vf_get_reset_level(hw, &hw->reset.pending);\n \tif (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET &&\n \t    hw->reset.level < reset) {\n",
    "prefixes": [
        "5/8"
    ]
}