[v2] net/ice: fix L1 check interval to account for longer link times

Message ID 20231019172610.325081-1-timothy.miskell@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v2] net/ice: fix L1 check interval to account for longer link times |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS

Commit Message

Timothy Miskell Oct. 19, 2023, 5:26 p.m. UTC
  For edge cases where the transceiver is physically inserted first and
immediately afterwards the DPDK PF is started the LSC event may occur
outside the current setting for the maximum check interval window. This
change lengthens the check interval to account for this along with other
reported cases where the link event may be longer than 1 second.

Signed-off-by: Timothy Miskell <timothy.miskell@intel.com>
Tested-by: Jonathan Tsai <jonathan1.tsai@intel.com>
---
 .mailmap                     | 2 ++
 drivers/net/ice/ice_ethdev.c | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
  

Comments

Qi Zhang Oct. 20, 2023, 1:14 a.m. UTC | #1
> -----Original Message-----
> From: Miskell, Timothy <timothy.miskell@intel.com>
> Sent: Friday, October 20, 2023 1:26 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Miskell, Timothy <timothy.miskell@intel.com>; Tsai,
> Jonathan1 <jonathan1.tsai@intel.com>
> Subject: [PATCH v2] net/ice: fix L1 check interval to account for longer link
> times
> 
> For edge cases where the transceiver is physically inserted first and
> immediately afterwards the DPDK PF is started the LSC event may occur
> outside the current setting for the maximum check interval window. This
> change lengthens the check interval to account for this along with other
> reported cases where the link event may be longer than 1 second.

Fixes: cf911d90e366 ("net/ice: support link update")
Cc: stable@dpdk.org

> 
> Signed-off-by: Timothy Miskell <timothy.miskell@intel.com>
> Tested-by: Jonathan Tsai <jonathan1.tsai@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/.mailmap b/.mailmap
index 3f5bab26a8..93c09a23ee 100644
--- a/.mailmap
+++ b/.mailmap
@@ -674,6 +674,7 @@  John Romein <romein@astron.nl>
 John W. Linville <linville@tuxdriver.com>
 Jonas Pfefferle <jpf@zurich.ibm.com> <pepperjo@japf.ch>
 Jonathan Erb <jonathan.erb@threatblockr.com> <jonathan.erb@banduracyber.com>
+Jonathan Tsai <jonathan1.tsai@intel.com>
 Jon DeVree <nuxi@vault24.org>
 Jon Loeliger <jdl@netgate.com>
 Joongi Kim <joongi@an.kaist.ac.kr>
@@ -1414,6 +1415,7 @@  Tianli Lai <laitianli@tom.com>
 Tianyu Li <tianyu.li@arm.com>
 Timmons C. Player <timmons.player@spirent.com>
 Timothy McDaniel <timothy.mcdaniel@intel.com>
+Timothy Miskell <timothy.miskell@intel.com>
 Timothy Redaelli <tredaelli@redhat.com>
 Tim Shearer <tim.shearer@overturenetworks.com>
 Ting Xu <ting.xu@intel.com>
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 305077e74e..6ef06b9926 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3992,8 +3992,8 @@  ice_atomic_write_link_status(struct rte_eth_dev *dev,
 static int
 ice_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 {
-#define CHECK_INTERVAL 100  /* 100ms */
-#define MAX_REPEAT_TIME 10  /* 1s (10 * 100ms) in total */
+#define CHECK_INTERVAL 50  /* 50ms */
+#define MAX_REPEAT_TIME 40  /* 2s (40 * 50ms) in total */
 	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct ice_link_status link_status;
 	struct rte_eth_link link, old;