[dpdk-stable] patch 'net/ice: retry getting VF VSI map after failure' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:40 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/c9eddf61f5d527436bb08c406bc7a29cddd00b25

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu at intel.com>
Date: Fri, 24 Sep 2021 16:08:20 +0800
Subject: [PATCH] net/ice: retry getting VF VSI map after failure
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]

The request of getting VF VSI map request may fail when DCF is busy,
this patch adds retry mechanism to make it able to succeed.

Fixes: b09d34ac8584 ("net/ice: fix flow redirector")

Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
Acked-by: Haiyue Wang <haiyue.wang at intel.com>
---
 drivers/net/ice/ice_dcf.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 6a24f4f36c..e371b3dc67 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -529,15 +529,26 @@ int
 ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw)
 {
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(hw->eth_dev);
-	int err = 0;
+	int i = 0;
+	int err = -1;
 
 	rte_spinlock_lock(&hw->vc_cmd_send_lock);
 
 	rte_intr_disable(&pci_dev->intr_handle);
 	ice_dcf_disable_irq0(hw);
 
-	if (ice_dcf_get_vf_resource(hw) || ice_dcf_get_vf_vsi_map(hw) < 0)
-		err = -1;
+	for (;;) {
+		if (ice_dcf_get_vf_resource(hw) == 0 &&
+		    ice_dcf_get_vf_vsi_map(hw) >= 0) {
+			err = 0;
+			break;
+		}
+
+		if (++i >= ICE_DCF_ARQ_MAX_RETRIES)
+			break;
+
+		rte_delay_ms(ICE_DCF_ARQ_CHECK_TIME);
+	}
 
 	rte_intr_enable(&pci_dev->intr_handle);
 	ice_dcf_enable_irq0(hw);
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:06.285199445 +0800
+++ 0096-net-ice-retry-getting-VF-VSI-map-after-failure.patch	2021-11-10 14:17:01.850746254 +0800
@@ -1 +1 @@
-From b71573ec2fc239e814a3f329a7c88f4067e91eae Mon Sep 17 00:00:00 2001
+From c9eddf61f5d527436bb08c406bc7a29cddd00b25 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit b71573ec2fc239e814a3f329a7c88f4067e91eae ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 38e9a84698..c9c01a14e3 100644
+index 6a24f4f36c..e371b3dc67 100644
@@ -22 +24 @@
-@@ -534,15 +534,26 @@ int
+@@ -529,15 +529,26 @@ int


More information about the stable mailing list