[dpdk-stable] patch 'net/i40e/base: fix retrying logic' has been queued to LTS release 18.11.7

Kevin Traynor ktraynor at redhat.com
Fri Feb 7 16:12:43 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/601bb85f687ca547208063dd208008183f5eaa6c

Thanks.

Kevin.

---
>From 601bb85f687ca547208063dd208008183f5eaa6c Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye at intel.com>
Date: Mon, 13 Jan 2020 10:39:37 +0800
Subject: [PATCH] net/i40e/base: fix retrying logic

[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ]

Fixed a bug where driver was breaking out of the loop and
reporting an error without retrying first.

Fixes: 466eec7d6b1a ("net/i40e/base: retry AQC to overcome IRCRead hangs")

Signed-off-by: Marcin Formela <marcin.formela at intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 87fa7e183f..1f8bb603df 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1703,17 +1703,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
 					       abilities_size, cmd_details);
 
-		if (status != I40E_SUCCESS)
-			break;
-
-		if (hw->aq.asq_last_status == I40E_AQ_RC_EIO) {
+		switch (hw->aq.asq_last_status) {
+		case I40E_AQ_RC_EIO:
 			status = I40E_ERR_UNKNOWN_PHY;
 			break;
-		} else if (hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) {
+		case I40E_AQ_RC_EAGAIN:
 			i40e_msec_delay(1);
 			total_delay++;
 			status = I40E_ERR_TIMEOUT;
+			break;
+		/* also covers I40E_AQ_RC_OK */
+		default:
+			break;
 		}
-	} while ((hw->aq.asq_last_status != I40E_AQ_RC_OK) &&
-		 (total_delay < max_delay));
+
+	} while ((hw->aq.asq_last_status == I40E_AQ_RC_EAGAIN) &&
+		(total_delay < max_delay));
 
 	if (status != I40E_SUCCESS)
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-07 15:08:19.135625203 +0000
+++ 0031-net-i40e-base-fix-retrying-logic.patch	2020-02-07 15:08:17.564062285 +0000
@@ -1 +1 @@
-From 50126939c66692d5b74922e12a9bf0dacfb6618b Mon Sep 17 00:00:00 2001
+From 601bb85f687ca547208063dd208008183f5eaa6c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50126939c66692d5b74922e12a9bf0dacfb6618b ]
+
@@ -20 +22 @@
-index 4f87ec9fad..a37e70599d 100644
+index 87fa7e183f..1f8bb603df 100644
@@ -23 +25 @@
-@@ -1715,17 +1715,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
+@@ -1703,17 +1703,20 @@ enum i40e_status_code i40e_aq_get_phy_capabilities(struct i40e_hw *hw,



More information about the stable mailing list