Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134897/?format=api
https://patches.dpdk.org/api/patches/134897/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231207014205.4002558-4-haijie1@huawei.com/", "project": { "id": 1, "url": "https://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": "<20231207014205.4002558-4-haijie1@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231207014205.4002558-4-haijie1@huawei.com", "date": "2023-12-07T01:42:04", "name": "[v2,3/4] net/hns3: fix incorrect reset level comparison", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "71c5e886153b06db21630e983530c6724595578e", "submitter": { "id": 2935, "url": "https://patches.dpdk.org/api/people/2935/?format=api", "name": "Jie Hai", "email": "haijie1@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231207014205.4002558-4-haijie1@huawei.com/mbox/", "series": [ { "id": 30466, "url": "https://patches.dpdk.org/api/series/30466/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30466", "date": "2023-12-07T01:42:01", "name": "net/hns3: bugfix on reset and stdatomic API", "version": 2, "mbox": "https://patches.dpdk.org/series/30466/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/134897/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/134897/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 C700843692;\n\tThu, 7 Dec 2023 02:46:25 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 42F3242EAB;\n\tThu, 7 Dec 2023 02:46:11 +0100 (CET)", "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id F1BD342E94\n for <dev@dpdk.org>; Thu, 7 Dec 2023 02:46:06 +0100 (CET)", "from kwepemd100004.china.huawei.com (unknown [172.30.72.56])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SlxpZ0WJkzrVVM\n for <dev@dpdk.org>; Thu, 7 Dec 2023 09:42:14 +0800 (CST)", "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.28; Thu, 7 Dec 2023 09:46:02 +0800" ], "From": "Jie Hai <haijie1@huawei.com>", "To": "<dev@dpdk.org>, Yisen Zhuang <yisen.zhuang@huawei.com>, Dengdui Huang\n <huangdengdui@huawei.com>", "CC": "<lihuisong@huawei.com>, <fengchengwen@huawei.com>,\n <liudongdong3@huawei.com>, <haijie1@huawei.com>", "Subject": "[PATCH v2 3/4] net/hns3: fix incorrect reset level comparison", "Date": "Thu, 7 Dec 2023 09:42:04 +0800", "Message-ID": "<20231207014205.4002558-4-haijie1@huawei.com>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20231207014205.4002558-1-haijie1@huawei.com>", "References": "<20231111015915.2776769-1-haijie1@huawei.com>\n <20231207014205.4002558-1-haijie1@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.67.165.2]", "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n kwepemd100004.china.huawei.com (7.221.188.31)", "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: Dengdui Huang <huangdengdui@huawei.com>\n\nCurrently, there are two problems in hns3vf_is_reset_pending():\n1. The new detect reset level is not HNS3_NONE_RESET, but the\n last reset level is HNS3_NONE_RESET, this function returns false.\n2. Comparison between last_req and new_req is opposite.\n\nIn addition, the reset level comparison in hns3_detect_reset_event()\nis similar to the hns3vf_is_reset_pending(). So this patch fixes\nabove the problems and merges the logic of reset level comparison.\n\nFixes: 5be38fc6c0fc (\"net/hns3: fix multiple reset detected log\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\nSigned-off-by: Jie Hai <haijie1@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c | 22 +++++++---------------\n 1 file changed, 7 insertions(+), 15 deletions(-)", "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 76fc401bd62c..b8f7e408d1e0 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5545,27 +5545,15 @@ is_pf_reset_done(struct hns3_hw *hw)\n static enum hns3_reset_level\n hns3_detect_reset_event(struct hns3_hw *hw)\n {\n-\tstruct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);\n \tenum hns3_reset_level new_req = HNS3_NONE_RESET;\n-\tenum hns3_reset_level last_req;\n \tuint32_t vector0_intr_state;\n \n-\tlast_req = hns3_get_reset_level(hns, &hw->reset.pending);\n \tvector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG);\n \tif (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state)\n \t\tnew_req = HNS3_IMP_RESET;\n \telse if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state)\n \t\tnew_req = HNS3_GLOBAL_RESET;\n \n-\tif (new_req == HNS3_NONE_RESET)\n-\t\treturn HNS3_NONE_RESET;\n-\n-\tif (last_req == HNS3_NONE_RESET || last_req < new_req) {\n-\t\t__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);\n-\t\thns3_schedule_delayed_reset(hns);\n-\t\thns3_warn(hw, \"High level reset detected, delay do reset\");\n-\t}\n-\n \treturn new_req;\n }\n \n@@ -5584,10 +5572,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns)\n \t\treturn false;\n \n \tnew_req = hns3_detect_reset_event(hw);\n+\tif (new_req == HNS3_NONE_RESET)\n+\t\treturn false;\n+\n \tlast_req = hns3_get_reset_level(hns, &hw->reset.pending);\n-\tif (last_req != HNS3_NONE_RESET && new_req != HNS3_NONE_RESET &&\n-\t new_req < last_req) {\n-\t\thns3_warn(hw, \"High level reset %d is pending\", last_req);\n+\tif (last_req == HNS3_NONE_RESET || last_req < new_req) {\n+\t\t__atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED);\n+\t\thns3_schedule_delayed_reset(hns);\n+\t\thns3_warn(hw, \"High level reset detected, delay do reset\");\n \t\treturn true;\n \t}\n \tlast_req = hns3_get_reset_level(hns, &hw->reset.request);\n", "prefixes": [ "v2", "3/4" ] }{ "id": 134897, "url": "