Module Name: src
Committed By: msaitoh
Date: Tue Dec 14 05:35:46 UTC 2021
Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_common.c
Log Message:
Wait longer for link after fiber MAC setup.
- FreeBSD:
aaa3af802f90d93fdffb99100fe56f0bc3dda119
96ef6eb3ae9d622906fb838c82ede3074f864cdc
DPDK:
64f1c8539c8ce99214b9eb1fb728a2c6745f3300
73247f1ced303c16987bb366d38a2d8a0fc40db4
After setting up the link on a fiber port, the maximum wait time for
the link to come up is 500 ms in ixgbe_setup_mac_link_multispeed_fiber().
On an x550 SFP+ port, this is often not sufficiently long for the link
to come up. This can result in never being able to retrieve accurate
link status for the port using rte_eth_link_get_nowait().
Increase the maximum wait time in ixgbe_setup_mac_link_multispeed_fiber()
to 1 s.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/ixgbe/ixgbe_common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.40 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.41
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.40 Tue Dec 14 05:33:08 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c Tue Dec 14 05:35:46 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.40 2021/12/14 05:33:08 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.41 2021/12/14 05:35:46 msaitoh Exp $ */
/******************************************************************************
SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_common.c 331224 2018-03-19 20:55:05Z erj $*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.40 2021/12/14 05:33:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.41 2021/12/14 05:35:46 msaitoh Exp $");
#include "ixgbe_common.h"
#include "ixgbe_phy.h"
@@ -5433,10 +5433,10 @@ s32 ixgbe_setup_mac_link_multispeed_fibe
ixgbe_flap_tx_laser(hw);
/* Wait for the controller to acquire link. Per IEEE 802.3ap,
- * Section 73.10.2, we may have to wait up to 500ms if KR is
+ * Section 73.10.2, we may have to wait up to 1000ms if KR is
* attempted. 82599 uses the same timing for 10g SFI.
*/
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 10; i++) {
/* Wait for the link partner to also set speed */
msec_delay(100);