get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 78314,
    "url": "http://patches.dpdk.org/api/patches/78314/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200922085401.12272-7-huwei013@chinasoftinc.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": "<20200922085401.12272-7-huwei013@chinasoftinc.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200922085401.12272-7-huwei013@chinasoftinc.com",
    "date": "2020-09-22T08:53:50",
    "name": "[06/17] net/hns3: avoid accessing nonexistent VF reg when PF in FLR",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ce009f1c09061bf66b0a2fd72b25adee776bc24f",
    "submitter": {
        "id": 1537,
        "url": "http://patches.dpdk.org/api/people/1537/?format=api",
        "name": "Wei Hu (Xavier)",
        "email": "huwei013@chinasoftinc.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200922085401.12272-7-huwei013@chinasoftinc.com/mbox/",
    "series": [
        {
            "id": 12401,
            "url": "http://patches.dpdk.org/api/series/12401/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12401",
            "date": "2020-09-22T08:53:46",
            "name": "updates for hns3 PMD driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12401/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/78314/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/78314/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 77525A04E1;\n\tTue, 22 Sep 2020 11:02:50 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0AE681DC2F;\n\tTue, 22 Sep 2020 10:55:14 +0200 (CEST)",
            "from incedge.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 8852C1DB0F\n for <dev@dpdk.org>; Tue, 22 Sep 2020 10:54:57 +0200 (CEST)",
            "from mail.chinasoftinc.com ([10.168.0.51]) by\n incedge.chinasoftinc.com with ESMTP id CLYwwLWOCCV7ZqMK (version=TLSv1\n cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO);\n Tue, 22 Sep 2020 16:54:55 +0800 (CST)",
            "from localhost.localdomain (120.133.139.157) by INCCAS001.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Tue, 22 Sep 2020\n 16:54:54 +0800"
        ],
        "X-ASG-Debug-ID": "1600764894-149d111bae19b030003-TfluYd",
        "X-Barracuda-Envelope-From": "huwei013@chinasoftinc.com",
        "X-Barracuda-RBL-Trusted-Forwarder": [
            "10.168.0.51",
            "10.168.0.60"
        ],
        "X-ASG-Whitelist": "Client",
        "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<xavier.huwei@huawei.com>",
        "Date": "Tue, 22 Sep 2020 16:53:50 +0800",
        "X-ASG-Orig-Subj": "[PATCH 06/17] net/hns3: avoid accessing nonexistent VF reg\n when PF in FLR",
        "Message-ID": "<20200922085401.12272-7-huwei013@chinasoftinc.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20200922085401.12272-1-huwei013@chinasoftinc.com>",
        "References": "<20200922085401.12272-1-huwei013@chinasoftinc.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[120.133.139.157]",
        "X-Barracuda-Connect": "UNKNOWN[10.168.0.51]",
        "X-Barracuda-Start-Time": "1600764895",
        "X-Barracuda-Encrypted": "ECDHE-RSA-AES256-SHA",
        "X-Barracuda-URL": "https://incspam.chinasofti.com:443/cgi-mod/mark.cgi",
        "X-Virus-Scanned": "by bsmtpd at chinasoftinc.com",
        "X-Barracuda-Scan-Msg-Size": "3044",
        "Subject": "[dpdk-dev] [PATCH 06/17] net/hns3: avoid accessing nonexistent VF\n\treg when PF in FLR",
        "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: Hongbo Zheng <zhenghongbo3@huawei.com>\n\nAccording to the protocol of PCIe, FLR to a PF device resets the PF state\nas well as the SR-IOV extended capability including VF Enable which means\nthat VFs no longer exist.\n\nWhen PF device is in FLR reset stage, at this time, the register state\nof VF device is not reliable, so VF device's register state detection\nis not carried out in PF FLR.\n\nIn this case, we just ignore the register states to avoid accessing\nnonexistent register and return false in the internal function named\nhns3vf_is_reset_pending to indicate that there are no other reset states\nthat need to be processed by PMD driver.\n\nFixes: 2790c6464725 (\"net/hns3: support device reset\")\nCc: stable@dpdk.org\n\nSigned-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.h    |  7 +++++++\n drivers/net/hns3/hns3_ethdev_vf.c | 15 +++++++++++++++\n 2 files changed, 22 insertions(+)",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h\nindex f170df9..3f3f973 100644\n--- a/drivers/net/hns3/hns3_ethdev.h\n+++ b/drivers/net/hns3/hns3_ethdev.h\n@@ -275,6 +275,13 @@ enum hns3_reset_level {\n \t * Kernel PF driver use mailbox to inform DPDK VF to do reset, the value\n \t * of the reset level and the one defined in kernel driver should be\n \t * same.\n+\t *\n+\t * According to the protocol of PCIe, FLR to a PF resets the PF state as\n+\t * well as the SR-IOV extended capability including VF Enable which\n+\t * means that VFs no longer exist.\n+\t *\n+\t * In PF FLR, the register state of VF is not reliable, VF's driver\n+\t * should not access the registers of the VF device.\n \t */\n \tHNS3_VF_FULL_RESET = 3,\n \tHNS3_FLR_RESET,     /* A VF perform FLR reset */\ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 565cf60..cb2747b 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -2191,6 +2191,21 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)\n \tstruct hns3_hw *hw = &hns->hw;\n \tenum hns3_reset_level reset;\n \n+\t/*\n+\t * According to the protocol of PCIe, FLR to a PF device resets the PF\n+\t * state as well as the SR-IOV extended capability including VF Enable\n+\t * which means that VFs no longer exist.\n+\t *\n+\t * HNS3_VF_FULL_RESET means PF device is in FLR reset. when PF device\n+\t * is in FLR stage, the register state of VF device is not reliable,\n+\t * so register states detection can not be carried out. In this case,\n+\t * we just ignore the register states and return false to indicate that\n+\t * there are no other reset states that need to be processed by driver.\n+\t */\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 \treset = hns3vf_get_reset_level(hw, &hw->reset.pending);\n \tif (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) {\n",
    "prefixes": [
        "06/17"
    ]
}