From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CCAAB43B86 for ; Tue, 5 Mar 2024 10:56:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BD8D42E26; Tue, 5 Mar 2024 10:56:12 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2057.outbound.protection.outlook.com [40.107.94.57]) by mails.dpdk.org (Postfix) with ESMTP id B3FBC4026B for ; Tue, 5 Mar 2024 10:56:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TAFuy9rQYix9a2yeDp1JZ2ZYgEZ7mbAIazWjzti+/FNI2j6FiaBmAPGXBjd3N+ZArNpRYxQngJjF4LqUQ1mh88Orxmg8VRaiLAA0EMCaT/m4HqUZtj8qFFcx5yUrePLZV/FHUjo9W4hopdla0v9sOAYR8MHITa8j5QZfbYkuAQsBHLEEtDhArX+zNA4bQIYoPuCGxi4biaF0pFRE+QVIQLGhTcFpbTnqVeCplVgQrQIr8NX6NrZQTNZJPW3FxU7lTMMqGl3gS3B3VzJxcdD4kqBNpykZuQSOhCQ1YPJqj/8btZOjbOq3T6DT6ymKKJYcyXc7Zy2tnMI4hVq6eZEXow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6gErPb2j6vk3sA1WyqELhBPm81adTh5BpxP9kLE2N2o=; b=HRK3E7yof+TxZThRkTP3x8HbBfB0YIFIqn6UDXMz9NlTn6bblZllYXO/4IpGRASdbtRESsoVk7tWNnYqQ2amaLdn5Kb9qYpX2G2ttqh+GWOmoMJJXEbkYZi8O/lHG1pgR5J4RC08NcUbcBb6trFLY7r+ClT0O+YjbzBTUUhSQA6E8yKNG3hnPWjeQRXn4y2GXGEN6oKT78G/6mMgnn/4r7Ytl/kjaGs9aAmOkEbVMzJPdPUsinIB9fZuYUD5vhdeO4YitMtxX0sybRsZ2c9Swyx1c1lEkBDxUdCIKaKtQOvxDnw395wPZsUrsRJOGNb4kiQ+witfxhk1bvFhFVhPFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6gErPb2j6vk3sA1WyqELhBPm81adTh5BpxP9kLE2N2o=; b=h7GmJVURgedYSkabxwlBMVuLpOouxuFo2ca8XT0mh+iHNlJ/bQefzC3g3iWPazv+KZMZMCkd1+aiIvPXTWqzmGospv1I723x5SZ7AMZxLisSmRbtMt4iSocMPb5eSqORznvGpAkQmAhemTdXfyljhkci3U9glP0ZGIXn5tJMXOLjAjx9tfqAw9wH4QACd6SetSfe8GnStyQklqPJvIzjEApCsjo5CMDBJSKTsOD+9+CwTDTBLZqKKj5kR5dfDCWDhiL/aeLZh7E3DrfhXnRhRBjYwvDfGa5tG4iD6ERB9mwSrVw6eKXc6oaJVZyMhYNNAMQKPzSjtq8Rhwj/qlsZjg== Received: from MW4PR04CA0209.namprd04.prod.outlook.com (2603:10b6:303:86::34) by CY5PR12MB6106.namprd12.prod.outlook.com (2603:10b6:930:29::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Tue, 5 Mar 2024 09:56:09 +0000 Received: from CO1PEPF000042AB.namprd03.prod.outlook.com (2603:10b6:303:86:cafe::90) by MW4PR04CA0209.outlook.office365.com (2603:10b6:303:86::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Tue, 5 Mar 2024 09:56:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042AB.mail.protection.outlook.com (10.167.243.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:56:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:55:52 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:55:51 -0800 From: Xueming Li To: Dengdui Huang CC: Jie Hai , dpdk stable Subject: patch 'net/hns3: fix reset level comparison' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:09 +0800 Message-ID: <20240305094757.439387-89-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AB:EE_|CY5PR12MB6106:EE_ X-MS-Office365-Filtering-Correlation-Id: c348a71c-09d0-41ce-ab37-08dc3cfa7b72 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EbZminEaSdf2dmKX1MIt0SSu3SaNzbLGYuo6Hm3oggy6tZK709AT8hPCDEZaVt5VmVbAehfu7avR+1bRTLpBMEG2JQeN2R2bDmJ4qHvGiphNlI6s2C89ugFf1N7mdInEuTcuBaZEnkQX9Jo0kYZEKqmKZI1gaEbQp4UHWx6KeZIKRksvKjWmFF8vCB1ljovY4brVzs8M8YRPIafYExyB0BUSBbOeSEq8pwcO+Nce4BfUEf+GBNrSQKH8QppEe9Y8kmoI/I7zpyCJl+GSuanoV7pvHg6Tjx1QPm5Q/FxR33qqdWOtyDMrTIzwxQHsm364jRjfhikYUEadJX1tvv1cC7FmJLtlFLWa5JOpTrHdOBaxxT7kwfPcb3A3Y3miFvGKbS+d5f+ToFNMM+lA8oXIsrOaItZvvKzb1iwVJpOo6yDlS48R+DwIqoPXRVAobr5su1s6uN4pGsGFZKnSR4+xdHFRmiOR5cOD3en97JRznfyXY2skCX+jXfrVN9YgHs53CVtY56UsrAA/2olCe5viQnppyOX7z8ge2upmcarAcNyewlHh4HWPkZ/h5LuLdjTwQjZ62ijRcucB95PdpZ4TbMftcym2nRz3kE5oeLfVtOb9IdEqVvDbTw2IEtyPhBXsVSdqdewOJTTzOL2t5u8rI0q2wJZcpe+zz+jg9XOc2ov7xIZnM0/L7KyYcc6/A6hPIu7P0u9srsaOiogT7C0Qw6FccSHyCaidrpee6CHse6SIeDUCIyL3PMSMZ3Kv2L0k X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(36860700004)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:56:08.8964 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c348a71c-09d0-41ce-ab37-08dc3cfa7b72 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AB.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6106 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=cb1cef89c47a4d266c9077b39170e4b96ce0784e Thanks. Xueming Li --- >From cb1cef89c47a4d266c9077b39170e4b96ce0784e Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 8 Dec 2023 15:44:16 +0800 Subject: [PATCH] net/hns3: fix reset level comparison Cc: Xueming Li [ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ] Currently, there are two problems in hns3vf_is_reset_pending(): 1. The new detect reset level is not HNS3_NONE_RESET, but the last reset level is HNS3_NONE_RESET, this function returns false. 2. Comparison between last_req and new_req is opposite. In addition, the reset level comparison in hns3_detect_reset_event() is similar to the hns3vf_is_reset_pending(). So this patch fixes above the problems and merges the logic of reset level comparison. Fixes: 5be38fc6c0fc ("net/hns3: fix multiple reset detected log") Signed-off-by: Dengdui Huang Signed-off-by: Jie Hai --- drivers/net/hns3/hns3_ethdev.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index d626bdd5b1..eafcf2c6f6 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5545,27 +5545,15 @@ is_pf_reset_done(struct hns3_hw *hw) static enum hns3_reset_level hns3_detect_reset_event(struct hns3_hw *hw) { - struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); enum hns3_reset_level new_req = HNS3_NONE_RESET; - enum hns3_reset_level last_req; uint32_t vector0_intr_state; - last_req = hns3_get_reset_level(hns, &hw->reset.pending); vector0_intr_state = hns3_read_dev(hw, HNS3_VECTOR0_OTHER_INT_STS_REG); if (BIT(HNS3_VECTOR0_IMPRESET_INT_B) & vector0_intr_state) new_req = HNS3_IMP_RESET; else if (BIT(HNS3_VECTOR0_GLOBALRESET_INT_B) & vector0_intr_state) new_req = HNS3_GLOBAL_RESET; - if (new_req == HNS3_NONE_RESET) - return HNS3_NONE_RESET; - - if (last_req == HNS3_NONE_RESET || last_req < new_req) { - __atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED); - hns3_schedule_delayed_reset(hns); - hns3_warn(hw, "High level reset detected, delay do reset"); - } - return new_req; } @@ -5584,10 +5572,14 @@ hns3_is_reset_pending(struct hns3_adapter *hns) return false; new_req = hns3_detect_reset_event(hw); + if (new_req == HNS3_NONE_RESET) + return false; + last_req = hns3_get_reset_level(hns, &hw->reset.pending); - if (last_req != HNS3_NONE_RESET && new_req != HNS3_NONE_RESET && - new_req < last_req) { - hns3_warn(hw, "High level reset %d is pending", last_req); + if (last_req == HNS3_NONE_RESET || last_req < new_req) { + __atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED); + hns3_schedule_delayed_reset(hns); + hns3_warn(hw, "High level reset detected, delay do reset"); return true; } last_req = hns3_get_reset_level(hns, &hw->reset.request); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:33.679629090 +0800 +++ 0088-net-hns3-fix-reset-level-comparison.patch 2024-03-05 17:39:30.843566495 +0800 @@ -1 +1 @@ -From 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 Mon Sep 17 00:00:00 2001 +From cb1cef89c47a4d266c9077b39170e4b96ce0784e Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 1ceb5ad2dfdcc3e6658119d25253bced5be3cc32 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org