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 91624A0A02 for ; Thu, 14 Jan 2021 13:20:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E4241411F0; Thu, 14 Jan 2021 13:20:05 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id BFC791411F0; Thu, 14 Jan 2021 13:20:03 +0100 (CET) IronPort-SDR: 9NqPZRyhkKEMUbwlY7LnxaXFXAeOpjW5OSW661c3FXqNNVWjsgqc5138yDRedj2eaIljODdEC0 cTWdCWaq15CA== X-IronPort-AV: E=McAfee;i="6000,8403,9863"; a="177576361" X-IronPort-AV: E=Sophos;i="5.79,347,1602572400"; d="scan'208";a="177576361" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 04:20:01 -0800 IronPort-SDR: gpOzejAN8jcT4KYNg/z/OI1LAlrsfdR1uSy53/P+86vxcAE2YQU2pGBHaEPrPZ/Qn5sqn3uRS2 YBE9Ft4obaNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,347,1602572400"; d="scan'208";a="424930344" Received: from silpixa00399126.ir.intel.com ([10.237.222.4]) by orsmga001.jf.intel.com with ESMTP; 14 Jan 2021 04:19:59 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ciara Power , Keith Wiles Date: Thu, 14 Jan 2021 12:17:33 +0000 Message-Id: <20210114121733.46801-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [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" When querying the link status via telemetry interface, we don't want the client to have to wait for multiple seconds for a reply. Therefore use "rte_eth_link_get_nowait()" rather than "rte_eth_link_get()" in the telemetry callback. Cc: stable@dpdk.org Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks") Signed-off-by: Bruce Richardson --- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 17ddacc78..1f4545fe0 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -5692,7 +5692,7 @@ eth_dev_handle_port_link_status(const char *cmd __rte_unused, if (!rte_eth_dev_is_valid_port(port_id)) return -1; - ret = rte_eth_link_get(port_id, &link); + ret = rte_eth_link_get_nowait(port_id, &link); if (ret < 0) return -1; -- 2.27.0