get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 112886,
    "url": "http://patches.dpdk.org/api/patches/112886/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220616094122.1909-2-fengchengwen@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": "<20220616094122.1909-2-fengchengwen@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220616094122.1909-2-fengchengwen@huawei.com",
    "date": "2022-06-16T09:41:19",
    "name": "[v8,1/4] ethdev: support device error recovery notification",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "8cbf7cbe035c1bbe7bbf4673d3212782c66d8ff9",
    "submitter": {
        "id": 2146,
        "url": "http://patches.dpdk.org/api/people/2146/?format=api",
        "name": "fengchengwen",
        "email": "fengchengwen@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/20220616094122.1909-2-fengchengwen@huawei.com/mbox/",
    "series": [
        {
            "id": 23570,
            "url": "http://patches.dpdk.org/api/series/23570/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23570",
            "date": "2022-06-16T09:41:18",
            "name": "ethdev: support error recovery notification",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/23570/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/112886/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/112886/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 A2118A00BE;\n\tThu, 16 Jun 2022 11:48:07 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E82E242C26;\n\tThu, 16 Jun 2022 11:47:56 +0200 (CEST)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 5FA8042BF3\n for <dev@dpdk.org>; Thu, 16 Jun 2022 11:47:52 +0200 (CEST)",
            "from dggpeml500024.china.huawei.com (unknown [172.30.72.57])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LNy1q1h9BzSgxv;\n Thu, 16 Jun 2022 17:44:31 +0800 (CST)",
            "from localhost.localdomain (10.67.165.24) by\n dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Thu, 16 Jun 2022 17:47:50 +0800"
        ],
        "From": "Chengwen Feng <fengchengwen@huawei.com>",
        "To": "<thomas@monjalon.net>, <ferruh.yigit@xilinx.com>",
        "CC": "<dev@dpdk.org>, <kalesh-anakkur.purayil@broadcom.com>,\n <somnath.kotur@broadcom.com>, <ajit.khaparde@broadcom.com>, <mdr@ashroe.eu>,\n <Andrew.Rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH v8 1/4] ethdev: support device error recovery notification",
        "Date": "Thu, 16 Jun 2022 17:41:19 +0800",
        "Message-ID": "<20220616094122.1909-2-fengchengwen@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20220616094122.1909-1-fengchengwen@huawei.com>",
        "References": "<20220128124830.427-1-kalesh-anakkur.purayil@broadcom.com>\n <20220616094122.1909-1-fengchengwen@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.67.165.24]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n dggpeml500024.china.huawei.com (7.185.36.10)",
        "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: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>\n\nSome PMDs (e.g. hns3) could detect hardware or firmware errors, and try\nto recover from the errors. In this process, the PMD sets the data path\npointers to dummy functions (which will prevent the crash), and also\nmake sure the control path operations failed with retcode -EBUSY.\n\nAlso in this process, from the perspective of application, services are\naffected. For example, the Rx/Tx bust APIs cannot receive and send\npackets, and the control plane API return failure.\n\nIn some service scenarios, application needs to be aware of the event\nto determine whether to migrate services. So three events were\nintroduced:\n\n1. RTE_ETH_EVENT_ERR_RECOVERING: the PMD must trigger this event to\nnotify the application that it detected a hardware or firmware error\nand tries to recover.\n2. RTE_ETH_EVENT_RECOVER_SUCCESS: the PMD must trigger this event to\nnotify the application that it has recovered from the error. And PMD\nalready re-configures the port to the state prior to the error.\n3. RTE_ETH_EVENT_RECOVER_FAILED: the PMD must trigger this event to\nnotify the application that it has failed to recover from the error.\nThe port may not be usable anymore.\n\nNote: the error recovery of these events is mainly performed by the\nPMD. Unlike the RTE_ETH_EVENT_INTR_RESET which the error recovery is\nperformed by the application. The PMD must ensure that the above two\nerror handling methods cannot be used at the same time.\n\nSigned-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n doc/guides/prog_guide/poll_mode_drv.rst | 32 +++++++++++++++++++++++++\n doc/guides/rel_notes/release_22_07.rst  | 11 +++++++++\n lib/ethdev/rte_ethdev.h                 |  6 +++++\n 3 files changed, 49 insertions(+)",
    "diff": "diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst\nindex 9d081b1cba..6398917485 100644\n--- a/doc/guides/prog_guide/poll_mode_drv.rst\n+++ b/doc/guides/prog_guide/poll_mode_drv.rst\n@@ -627,3 +627,35 @@ by application.\n The PMD itself should not call rte_eth_dev_reset(). The PMD can trigger\n the application to handle reset event. It is duty of application to\n handle all synchronization before it calls rte_eth_dev_reset().\n+\n+Error Recovery Notification\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Some PMDs (e.g. hns3) could detect hardware or firmware errors, and try to\n+recover from the errors. In this process, the PMD sets the data path pointers\n+to dummy functions (which will prevent the crash), and also make sure the\n+control path operations failed with retcode -EBUSY.\n+\n+Also in this process, from the perspective of application, services are\n+affected. For example, the Rx/Tx bust APIs cannot receive and send packets,\n+and the control plane API return failure.\n+\n+In some service scenarios, application needs to be aware of the event to\n+determine whether to migrate services. So three events was introduced.\n+\n+The PMD must trigger RTE_ETH_EVENT_ERR_RECOVERING event to notify the\n+application that it detected a hardware or firmware error and tries to recover.\n+\n+The PMD must trigger RTE_ETH_EVENT_RECOVER_SUCCESS event to notify the\n+application that it has recovered from the error. And PMD already re-configures\n+the port to the state prior to the error.\n+\n+The PMD must trigger RTE_ETH_EVENT_RECOVER_FAILED event to notify the\n+application that it has failed to recover from the error. The port may not be\n+usable anymore.\n+\n+.. note::\n+        The error recovery of these events is mainly performed by the PMD.\n+        Unlike the RTE_ETH_EVENT_INTR_RESET which the error recovery is\n+        performed by the application. The PMD must ensure that the above two\n+        error handling methods cannot be used at the same time.\ndiff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst\nindex 6fc044edaa..b237bd3303 100644\n--- a/doc/guides/rel_notes/release_22_07.rst\n+++ b/doc/guides/rel_notes/release_22_07.rst\n@@ -108,6 +108,17 @@ New Features\n \n   Added an API which can get the device type of vDPA device.\n \n+* **Added error recover notification.**\n+\n+  Added error recover notification to application including:\n+\n+  * Added new event: ``RTE_ETH_EVENT_ERR_RECOVERING`` for the PMD to report\n+    that the port is recovering from an error.\n+  * Added new event: ``RTE_ETH_EVENT_RECOVER_SUCCESS`` for the PMD to report\n+    that the port recover successful from an error.\n+  * Added new event: ``RTE_ETH_EVENT_RECOVER_FAILED`` for the PMD to report\n+    that the prot recover failed from an error.\n+\n * **Updated Amazon ena driver.**\n \n   The new driver version (v2.7.0) includes:\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 045ee64747..6998f6f0be 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -3928,6 +3928,12 @@ enum rte_eth_event_type {\n \t * @see rte_eth_rx_avail_thresh_set()\n \t */\n \tRTE_ETH_EVENT_RX_AVAIL_THRESH,\n+\t/** Port recovering from a hardware or firmware error */\n+\tRTE_ETH_EVENT_ERR_RECOVERING,\n+\t/** Port recovers successful from the error */\n+\tRTE_ETH_EVENT_RECOVER_SUCCESS,\n+\t/** Port recovers failed from the error */\n+\tRTE_ETH_EVENT_RECOVER_FAILED,\n \tRTE_ETH_EVENT_MAX       /**< max value of this enum */\n };\n \n",
    "prefixes": [
        "v8",
        "1/4"
    ]
}