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 1B64EA0A04 for ; Tue, 19 Jan 2021 11:06:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE8AE140D63; Tue, 19 Jan 2021 11:06:20 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 64B10140D4D; Tue, 19 Jan 2021 11:06:17 +0100 (CET) IronPort-SDR: gQDLqRKSqqc7UWH858dC7zeXUdRiSBL/OjSa2E+zdpK+rF18gAzbyMp7r6TkIWJmWcc+hLwmeK 4CcOGVMmhmIA== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="165994677" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="165994677" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 02:06:10 -0800 IronPort-SDR: YOjdYNk8w6UbC54jJLpq2PqkCGEX8/sIuvEEY2Ixcm4ACuCHFqogtQORKuIXf0hYFB2EGiFrvH CenKNcqiKa+w== X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="365695600" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.18.163]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 19 Jan 2021 02:06:06 -0800 Date: Tue, 19 Jan 2021 10:06:02 +0000 From: Bruce Richardson To: "Min Hu (Connor)" Cc: Stephen Hemminger , dev@dpdk.org, stable@dpdk.org, Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ciara Power , Keith Wiles , Beilei Xing , Jeff Guo , Haiyue Wang , Ajit Khaparde , somnath.kotur@broadcom.com, qiming.yang@intel.com, qi.z.zhang@intel.com Message-ID: <20210119100602.GB1786@bricha3-MOBL.ger.corp.intel.com> References: <20210114121733.46801-1-bruce.richardson@intel.com> <4b5e9630-b331-f498-2488-d9418719ff8c@huawei.com> <20210118182614.63f1d5d2@hermes.local> <52dbf960-6d9e-5070-cde1-27c5a1e32e97@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52dbf960-6d9e-5070-cde1-27c5a1e32e97@huawei.com> Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: avoid blocking telemetry callback for link status 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 Sender: "stable" On Tue, Jan 19, 2021 at 10:58:42AM +0800, Min Hu (Connor) wrote: > Thank Stephen, > but in which the scenarios, it should wait link to up, in which > scenarios, it should not ? > By the way, how to define the "wait" time value ? > I believe the documentation somewhere refers to a wait time of up to 9 seconds, but I don't think it's terribly well defined. Some Intel NICs will stall for a few seconds if the link is not yet stable or if the link is down. With the link up, I don't think any NIC fails to return immediately. However, if delays in the app are something you want to avoid, the _nowait varient is the one to call to be sure. /Bruce > > > 在 2021/1/19 10:26, Stephen Hemminger 写道: > > On Tue, 19 Jan 2021 09:06:48 +0800 > > "Min Hu (Connor)" wrote: > > > > > Hi, Bruce and all, > > > Do you know the difference between "rte_eth_link_get" and > > > "rte_eth_link_get_nowait"? I know they call funciton "link_update" > > > with differenct parameter "wait_to_complete"(set 1 means wait, set 0 > > > means not wait). But how to define the "wait" time, and why it shoud wait? > > > On the further, What are the application scenarios of the two > > > APIs? > > > > > > > The default behavior of rte_eth_link_get (in some drivers) is to wait > > for link to come up. Many drivers don't do this. It seems mostly the > > Intel ones that do. > > . > >