From: Kevin Traynor <ktraynor@redhat.com>
To: Qi Zhang <qi.z.zhang@intel.com>
Cc: Beilei Xing <beilei.xing@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/i40e/base: improve the polling mechanism' has been queued to stable release 18.08.1
Date: Wed, 21 Nov 2018 16:47:31 +0000 [thread overview]
Message-ID: <20181121164828.32249-17-ktraynor@redhat.com> (raw)
In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com>
Hi,
FYI, your patch has been queued to stable release 18.08.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 11/27/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Kevin Traynor
---
>From a788a452adf94a9c4d3cac183b8f3d666de4a369 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 25 Sep 2018 10:34:29 +0800
Subject: [PATCH] net/i40e/base: improve the polling mechanism
[ upstream commit 54f4a22dc1731ef32760eb3a13f7d5a2e889650b ]
This patch fixes the polling mechanism of GLGEN_RSTAT.DEVSTATE
in the PF Reset path when Global Reset is in progress.
While the driver is polling for the end of the PF Reset and
the Global Reset is triggered, abandon the PF Reset path and
prepare for the upcoming Global Reset.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
drivers/net/i40e/base/i40e_common.c | 35 ++++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 6fbba01d3..f10761644 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1327,4 +1327,27 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
}
+/**
+ * i40e_poll_globr - Poll for Global Reset completion
+ * @hw: pointer to the hardware structure
+ * @retry_limit: how many times to retry before failure
+ **/
+STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
+ u32 retry_limit)
+{
+ u32 cnt, reg = 0;
+
+ for (cnt = 0; cnt < retry_limit; cnt++) {
+ reg = rd32(hw, I40E_GLGEN_RSTAT);
+ if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK))
+ return I40E_SUCCESS;
+ i40e_msec_delay(100);
+ }
+
+ DEBUGOUT("Global reset failed.\n");
+ DEBUGOUT1("I40E_GLGEN_RSTAT = 0x%x\n", reg);
+
+ return I40E_ERR_RESET_FAILED;
+}
+
#define I40E_PF_RESET_WAIT_COUNT 200
/**
@@ -1396,12 +1419,12 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)
break;
reg2 = rd32(hw, I40E_GLGEN_RSTAT);
- if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) {
- DEBUGOUT("Core reset upcoming. Skipping PF reset request.\n");
- DEBUGOUT1("I40E_GLGEN_RSTAT = 0x%x\n", reg2);
- return I40E_ERR_NOT_READY;
- }
+ if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK)
+ break;
i40e_msec_delay(1);
}
- if (reg & I40E_PFGEN_CTRL_PFSWR_MASK) {
+ if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) {
+ if (i40e_poll_globr(hw, grst_del) != I40E_SUCCESS)
+ return I40E_ERR_RESET_FAILED;
+ } else if (reg & I40E_PFGEN_CTRL_PFSWR_MASK) {
DEBUGOUT("PF reset polling failed to complete.\n");
return I40E_ERR_RESET_FAILED;
--
2.19.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-21 16:44:31.399682301 +0000
+++ 0017-net-i40e-base-improve-the-polling-mechanism.patch 2018-11-21 16:44:30.000000000 +0000
@@ -1,16 +1,16 @@
-From 54f4a22dc1731ef32760eb3a13f7d5a2e889650b Mon Sep 17 00:00:00 2001
+From a788a452adf94a9c4d3cac183b8f3d666de4a369 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 25 Sep 2018 10:34:29 +0800
Subject: [PATCH] net/i40e/base: improve the polling mechanism
+[ upstream commit 54f4a22dc1731ef32760eb3a13f7d5a2e889650b ]
+
This patch fixes the polling mechanism of GLGEN_RSTAT.DEVSTATE
in the PF Reset path when Global Reset is in progress.
While the driver is polling for the end of the PF Reset and
the Global Reset is triggered, abandon the PF Reset path and
prepare for the upcoming Global Reset.
-Cc: stable@dpdk.org
-
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
@@ -18,10 +18,10 @@
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index 18009be3b..0affa98ac 100644
+index 6fbba01d3..f10761644 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
-@@ -1297,4 +1297,27 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
+@@ -1327,4 +1327,27 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
}
+/**
@@ -49,7 +49,7 @@
+
#define I40E_PF_RESET_WAIT_COUNT 200
/**
-@@ -1366,12 +1389,12 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)
+@@ -1396,12 +1419,12 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)
break;
reg2 = rd32(hw, I40E_GLGEN_RSTAT);
- if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK) {
next prev parent reply other threads:[~2018-11-21 16:49 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 16:47 [dpdk-stable] patch 'doc: fix eventdev shared library version' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'event/dpaa2: fix mbuf assignment in atomic processing' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'eventdev: fix eth Rx adapter hotplug incompatibility' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: remove eth Rx adapter vdev workaround' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'event/sw: fix cq index check for unlink usecases' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: check burst mode capability' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: fix build for timer adapter' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: fix RSS config for eth Rx " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'app/eventdev: fix minor typos' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: fix eth Rx adapter test for skeleton PMD' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'test/event: fix Rx adapter intr " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'mem: fix undefined behavior in NUMA-aware mapping' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'mem: fix --huge-unlink option' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'igb_uio: fix refcount if open returns error' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e: fix send admin queue command before init' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e/base: fix partition id calculation for X722' " Kevin Traynor
2018-11-21 16:47 ` Kevin Traynor [this message]
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e/base: read LLDP config area with correct endianness' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e/base: properly clean resources' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e/base: gracefully clean the " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/i40e/base: correct global reset timeout calculation' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/ixgbe: wait longer for link after fiber MAC setup' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/enic: do not use non-standard integer types' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/enic: set Rx VLAN offload flag for non-stripped packets' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/enic: explicitly disable overlay offload' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/failsafe: report actual device capabilities' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/nfp: fix RSS' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnx2x: fix logging to include device name' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnx2x: fix to disable further interrupts' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnx2x: fix call to link handling periodic function' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnx2x: fix to add PHY lock' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/enic: fix flow API memory leak' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: get rid of ff pools and use VNIC info array' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: fix uninitialized pointer access in Tx' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: fix MTU setting' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: fix registration of VF async event completion ring' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: set MAC filtering as outer for non tunnel frames' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: set a VNIC as default only once' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: set VLAN strip mode before default VNIC cfg' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: remove excess log messages' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/bnxt: reduce polling interval for valid bit' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'app/testpmd: check Rx VLAN offload flag to print VLAN TCI' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'app/testpmd: fix csum parse-tunnel command invocation' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'doc: fix typos in the flow API guide' " Kevin Traynor
2018-11-21 16:47 ` [dpdk-stable] patch 'net/sfc: receive prepared packets even in Rx exception case' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'mbuf: fix Tx offload mask' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: fix representor port link status' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: fix representor port xstats' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx4: support externally allocated static memory' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'app/testpmd: fix displaying RSS hash functions' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'doc: clarify L3 Tx checksum prerequisite' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'doc: clarify L4 " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/failsafe: use prefix for function' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: fix errno values for flow engine' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'doc: add VFIO in ENA guide' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'drivers/net: fix log type string' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'app/testpmd: fix printf format in event callback' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'app/testpmd: fix duplicate exit' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: support missing counter in extended statistics' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: add representor specific " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/mlx5: always use representor ifindex for ioctl' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/e1000: do not error out if Rx drop enable is set' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/ifc: fix address translation function name' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/sfc: do not skip RSS configuration step on reconfigure' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/sfc: allow to query RSS key and HF in isolated mode' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/sfc: allow to query RSS key and HF when RSS is disabled' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'eal: use correct data type for bitmap slab operations' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'app/testpmd: fix metering and policing commands' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'examples/ip_pipeline: fix IPv6 endianness' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/softnic: " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'bus/fslmc: fix physical addressing check' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/dpaa2: fix IOVA conversion for congestion memory' " Kevin Traynor
2018-11-21 16:48 ` [dpdk-stable] patch 'net/dpaa2: fix VLAN filter enablement' " Kevin Traynor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121164828.32249-17-ktraynor@redhat.com \
--to=ktraynor@redhat.com \
--cc=beilei.xing@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).