[dpdk-stable] patch 'net/i40e/base: fix using checksum before check' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:32 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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 11/12/21. 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://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ae2b2f46f532c26737476c22bf628190cab1eff4

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ae2b2f46f532c26737476c22bf628190cab1eff4 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang at intel.com>
Date: Sat, 9 Oct 2021 01:39:51 +0000
Subject: [PATCH] net/i40e/base: fix using checksum before check
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit e59d949182767cdf8c7ee1b2637034f50a8487fb ]

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")

Signed-off-by: Christopher Pau <christopher.pau at intel.com>
Signed-off-by: Robin Zhang <robinx.zhang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.520872908 +0800
+++ 0148-net-i40e-base-fix-using-checksum-before-check.patch	2021-11-10 14:17:01.934078906 +0800
@@ -1 +1 @@
-From e59d949182767cdf8c7ee1b2637034f50a8487fb Mon Sep 17 00:00:00 2001
+From ae2b2f46f532c26737476c22bf628190cab1eff4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e59d949182767cdf8c7ee1b2637034f50a8487fb ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list