Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/112884/?format=api
http://patches.dpdk.org/api/patches/112884/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220616094122.1909-4-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-4-fengchengwen@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220616094122.1909-4-fengchengwen@huawei.com", "date": "2022-06-16T09:41:21", "name": "[v8,3/4] net/hns3: support error recovery notification event", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "4a586b1885428d0d71e9c8b0e49781f66eb6b063", "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-4-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/112884/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/112884/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 1BB8EA00BE;\n\tThu, 16 Jun 2022 11:47:58 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E938B42C1A;\n\tThu, 16 Jun 2022 11:47:54 +0200 (CEST)", "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 6298242C10\n for <dev@dpdk.org>; Thu, 16 Jun 2022 11:47:52 +0200 (CEST)", "from dggpeml500024.china.huawei.com (unknown [172.30.72.54])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LNy3t3QS2zjXfD;\n Thu, 16 Jun 2022 17:46:18 +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 3/4] net/hns3: support error recovery notification event", "Date": "Thu, 16 Jun 2022 17:41:21 +0800", "Message-ID": "<20220616094122.1909-4-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": "This patch supports error recovery notification event:\n1. RTE_ETH_EVENT_ERR_RECOVERING: the PMD report this event to nofify\nthe application that it detected a hardware or firmware error and\ntries to recover.\n2. RTE_ETH_EVENT_RECOVER_SUCCESS: the PMD report this event to nofify\nthe application that it has recovered from the error. And PMD already\nre-configures the port to the state prior to the error.\n3. RTE_ETH_EVENT_RECOVER_FAILED: the PMD report this event to notify\nthe application that it has failed to recover from the error. The port\nmay not be usable anymore.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n drivers/net/hns3/hns3_intr.c | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)", "diff": "diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c\nindex 3ca2e1e338..d6d2209f73 100644\n--- a/drivers/net/hns3/hns3_intr.c\n+++ b/drivers/net/hns3/hns3_intr.c\n@@ -1486,6 +1486,27 @@ static const struct hns3_hw_err_type hns3_hw_error_type[] = {\n \t}\n };\n \n+static void\n+hns3_report_reset_begin(struct hns3_hw *hw)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n+\trte_eth_dev_callback_process(dev, RTE_ETH_EVENT_ERR_RECOVERING, NULL);\n+}\n+\n+static void\n+hns3_report_reset_success(struct hns3_hw *hw)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n+\trte_eth_dev_callback_process(dev, RTE_ETH_EVENT_RECOVER_SUCCESS, NULL);\n+}\n+\n+static void\n+hns3_report_reset_failed(struct hns3_hw *hw)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[hw->data->port_id];\n+\trte_eth_dev_callback_process(dev, RTE_ETH_EVENT_RECOVER_FAILED, NULL);\n+}\n+\n static int\n hns3_config_ncsi_hw_err_int(struct hns3_adapter *hns, bool en)\n {\n@@ -2645,6 +2666,7 @@ hns3_reset_pre(struct hns3_adapter *hns)\n \tif (hw->reset.stage == RESET_STAGE_NONE) {\n \t\t__atomic_store_n(&hns->hw.reset.resetting, 1, __ATOMIC_RELAXED);\n \t\thw->reset.stage = RESET_STAGE_DOWN;\n+\t\thns3_report_reset_begin(hw);\n \t\tret = hw->reset.ops->stop_service(hns);\n \t\thns3_clock_gettime(&tv);\n \t\tif (ret) {\n@@ -2754,6 +2776,7 @@ hns3_reset_post(struct hns3_adapter *hns)\n \t\t\t hns3_clock_calctime_ms(&tv_delta),\n \t\t\t tv.tv_sec, tv.tv_usec);\n \t\thw->reset.level = HNS3_NONE_RESET;\n+\t\thns3_report_reset_success(hw);\n \t}\n \treturn 0;\n \n@@ -2799,6 +2822,7 @@ hns3_reset_fail_handle(struct hns3_adapter *hns)\n \t\t hns3_clock_calctime_ms(&tv_delta),\n \t\t tv.tv_sec, tv.tv_usec);\n \thw->reset.level = HNS3_NONE_RESET;\n+\thns3_report_reset_failed(hw);\n }\n \n /*\n", "prefixes": [ "v8", "3/4" ] }{ "id": 112884, "url": "