From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9FC01A0518 for ; Fri, 24 Jul 2020 14:02:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 953F81BFE3; Fri, 24 Jul 2020 14:02:12 +0200 (CEST) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 30D851C043 for ; Fri, 24 Jul 2020 14:02:11 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id t142so1668196wmt.4 for ; Fri, 24 Jul 2020 05:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qGMl2m2ZxubC37OxmbgF7Hy7T/4g70IZxZSOH0/+2u4=; b=NzL65OTCol2B6MOQck6DyAlaK3h4t2mdEp1bF1C50Ztees7A8c7u67lQnePg+h46vg ngA/v2vB4FUJGhu7bN8EGzq6H3EBsdF9dWOi10dYLZ/No9I0oB0B3yi7Qo4qAUA08was iq1ZF7tt+FM+rTDT5/pqxgRqVwjOcJroZiEJ82M6hxR010I9mDwDlOvAU1pULDISmrup WLLHQQTo5COIsEmgs2qdsNaNGZQ/1DCLrAQJ/L6T8RETW9PIdtb+/maHptKGDQ+5jfL7 0YfK9HXOhAxPjJj66qA5/SqY/PaJupsi9eo6XtMV0FRVz/eGwjyAFziPO17BzdLaZF0m bJuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qGMl2m2ZxubC37OxmbgF7Hy7T/4g70IZxZSOH0/+2u4=; b=faC4rRMz/TSqrNCO2QwTiwBvY8RDOUJDjsJxO+6Ytl93YdGGSLbVi7UsnzF5Vpub+A k5tFiszwZTFfEbQDYI5h4JS849reFn2AjZdOl6iJQqurcBe4PenU5e75HmIFkbt5aw/+ lPL9FXJyme6ZcbIFr4T2W7wNqXHGwBYLr41mF7GW7qcLVGH3EKz0DwviLh6DVdLkdYNg 0nbzJLd7Yunh31eLl+s/VWLcrAa47ejkY2k4KYlfuFYxaUOpVMUFarnB7j3RClVj2baK EX94JAMUunGYfggFCnXAqDWB8uHPeZowFlNAoKFIWlUXERIj5b8fjC6BvAf/+O/2/zfz 8r6A== X-Gm-Message-State: AOAM533kVyuhXqlyJlgE7Fgmn1GGXfkj1VKsQD1orTGmZsdRKFDWj4DY Y/X+UPY+KQr/xeRUsND1x0wKzoXV3x8= X-Google-Smtp-Source: ABdhPJyIDg4qOATO7ueeBUK/CXcGzNmtAfjg5mVQWJnLkP9UcTuB7+Xo5udegvBW2N01ICteUZK8XA== X-Received: by 2002:a1c:ed01:: with SMTP id l1mr8631925wmh.33.1595592130939; Fri, 24 Jul 2020 05:02:10 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id o2sm1147273wrj.21.2020.07.24.05.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:02:09 -0700 (PDT) From: luca.boccassi@gmail.com To: Hongbo Zheng Cc: Wei Hu , dpdk stable Date: Fri, 24 Jul 2020 12:57:46 +0100 Message-Id: <20200724120030.1863487-28-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: ignore function return on reset error path' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. 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. Thanks. Luca Boccassi --- >From 0596f4a6e1872526253528ae825e9340b849cf77 Mon Sep 17 00:00:00 2001 From: Hongbo Zheng Date: Tue, 9 Jun 2020 16:44:15 +0800 Subject: [PATCH] net/hns3: ignore function return on reset error path [ upstream commit 80cd38e1b530973926c007d65a84600e8c27740d ] There is a coverity defect related "Unchecked return value". The internal static hns3_reset_err_handle function is reset error process of hns3 PMD driver. If failure in reset process, it does not mean that the network port is completely unavailable, so the command interface between driver and firmware still needs to be initialized. Regardless of whether the execution of the function named hns3_cmd_init is successful or not, the next process after execution must be continued, so there is no need to check the return value. If hns3_cmd_init fails to execute, there will be corresponding log information inside hns3_cmd_init. This patch adds '(void)' Type conversion to avoid coverity warning. Coverity issue: 349934 Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Hongbo Zheng Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_intr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 9953a1d98..46d617c68 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -882,8 +882,14 @@ hns3_reset_err_handle(struct hns3_adapter *hns) return true; } + /* + * Failure to reset does not mean that the network port is + * completely unavailable, so cmd still needs to be initialized. + * Regardless of whether the execution is successful or not, the + * flow after execution must be continued. + */ if (rte_atomic16_read(&hw->reset.disable_cmd)) - hns3_cmd_init(hw); + (void)hns3_cmd_init(hw); reset_fail: hw->reset.attempts = 0; hw->reset.stats.fail_cnt++; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:49.694877763 +0100 +++ 0028-net-hns3-ignore-function-return-on-reset-error-path.patch 2020-07-24 12:53:48.215005118 +0100 @@ -1,8 +1,10 @@ -From 80cd38e1b530973926c007d65a84600e8c27740d Mon Sep 17 00:00:00 2001 +From 0596f4a6e1872526253528ae825e9340b849cf77 Mon Sep 17 00:00:00 2001 From: Hongbo Zheng Date: Tue, 9 Jun 2020 16:44:15 +0800 Subject: [PATCH] net/hns3: ignore function return on reset error path +[ upstream commit 80cd38e1b530973926c007d65a84600e8c27740d ] + There is a coverity defect related "Unchecked return value". The internal static hns3_reset_err_handle function is reset error @@ -19,7 +21,6 @@ Coverity issue: 349934 Fixes: 2790c6464725 ("net/hns3: support device reset") -Cc: stable@dpdk.org Signed-off-by: Hongbo Zheng Signed-off-by: Wei Hu (Xavier)