From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3380241BE7 for ; Mon, 6 Feb 2023 07:25:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2733342D16; Mon, 6 Feb 2023 07:25:45 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1FBC440A7D; Mon, 6 Feb 2023 07:25:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675664742; x=1707200742; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yDRljxFYzI79lHkBe4BZFUI0/eNNB2hUdaZiShfim/Q=; b=RL+F2xlKLqZcNjnPB9Wr7VOKDhPGXcDCiwyRy2txJ4U9NARblpT0GJez CTYjY8YAfD7S0rTlsT0a2CoNJnoRIVByMHUgNPwlQuTBbMBOsjlJV/g17 mjJrduh5wQR3sibY+k8OD4JHA1tm/96VHUC2uu31S8WEwSkRIBty158Xb 0dZPhKu2akR7cllK8SVfswZfre3RWkcIXdJF5F9zYcnw3UQRVt1Kgdoah lDhOA8InJUgemc/mK8sENu152r4wZWJWgMas7wJt5XvrJ2IBoxvlKmhRe xpN5TT9x94Uwc5tBAax6nYztDu2/To3fGWuhY5zoQGRsWdOgAI5jnfS3H g==; X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="330431669" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="330431669" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2023 22:25:41 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10612"; a="659743853" X-IronPort-AV: E=Sophos;i="5.97,276,1669104000"; d="scan'208";a="659743853" Received: from unknown (HELO localhost.localdomain) ([10.239.252.253]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2023 22:25:39 -0800 From: Mingjin Ye To: dev@dpdk.org Cc: stable@dpdk.org, yidingx.zhou@intel.com, Mingjin Ye , Qiming Yang , Qi Zhang Subject: [PATCH] net/ice: fix get link status timeout Date: Mon, 6 Feb 2023 06:22:39 +0000 Message-Id: <20230206062239.1042172-1-mingjinx.ye@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org When hw is just started, it will immediately obtain the link status, and the longest attempt is 1 second. Some NICs are slow to initialize, which make it fails to obtain the link status. The patch fixes this issue by modifying the longest attempt to 5 seconds. Fixes: cf911d90e366 ("net/ice: support link update") Cc: stable@dpdk.org Signed-off-by: Mingjin Ye --- drivers/net/ice/ice_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 0bc739daf0..eaa556f45c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3927,7 +3927,7 @@ 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 MAX_REPEAT_TIME 50 /* 5s (50 * 100ms) 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; -- 2.25.1