From patchwork Thu Oct 19 17:26:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Miskell X-Patchwork-Id: 133017 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2ED8431B0; Thu, 19 Oct 2023 19:27:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B592040276; Thu, 19 Oct 2023 19:27:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B08444021F for ; Thu, 19 Oct 2023 19:27:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697736440; x=1729272440; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MDEH7fTkmkgvKZ7Uy3/dJvAniVG1O+lsqD67xq79YjA=; b=KfGokJUsfZ/tuqQe73zGH3KKlqE+O90yMeWVJST4mRDNMtotRe/5dFfx nKpik+/KDRcTYkUIDHitqq3YvkytZfpO3TrrcgHBJ9tnt826IOFC4rG0a 1KsjvTKMIwHobGu9AneNemeqEGJP4KMeoGmAO4NuDkcan4cZCxEq8D1nz ljDMgEgINvH51maS3auQOds7OwGDIxO9tWE+K/mdi9ruGMFHLMcL5IvC/ SwLK87piPxJ3MI5QLjmwOR4FEZs0Y3DuPLB9fB6OJHxb/Hq5jEBP5FRmo B5qSLfrprr6/RqeVV1EzP2G0XtycE5rlKnID+lTP85hLdn5cXo3/NzeWu g==; X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="389181929" X-IronPort-AV: E=Sophos;i="6.03,237,1694761200"; d="scan'208";a="389181929" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2023 10:26:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10868"; a="760720826" X-IronPort-AV: E=Sophos;i="6.03,237,1694761200"; d="scan'208";a="760720826" Received: from wfp43-hdpae.hd.intel.com ([10.127.128.96]) by fmsmga007.fm.intel.com with ESMTP; 19 Oct 2023 10:26:50 -0700 From: Timothy Miskell To: qi.z.zhang@intel.com Cc: dev@dpdk.org, Timothy Miskell , Jonathan Tsai Subject: [PATCH v2] net/ice: fix L1 check interval to account for longer link times Date: Thu, 19 Oct 2023 17:26:10 +0000 Message-Id: <20231019172610.325081-1-timothy.miskell@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 Tested-by: Jonathan Tsai Acked-by: Qi Zhang --- .mailmap | 2 ++ drivers/net/ice/ice_ethdev.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 3f5bab26a8..93c09a23ee 100644 --- a/.mailmap +++ b/.mailmap @@ -674,6 +674,7 @@ John Romein John W. Linville Jonas Pfefferle Jonathan Erb +Jonathan Tsai Jon DeVree Jon Loeliger Joongi Kim @@ -1414,6 +1415,7 @@ Tianli Lai Tianyu Li Timmons C. Player Timothy McDaniel +Timothy Miskell Timothy Redaelli Tim Shearer Ting Xu 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;