From: Bruce Richardson Date: Thu, 14 Jan 2021 12:17:33 +0000 (+0000) Subject: ethdev: avoid blocking telemetry for link status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=26fe208ad81fc7439728d743bccd4b2a32701bfe;p=dpdk.git ethdev: avoid blocking telemetry for link status 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. Fixes: c190daedb9b1 ("ethdev: add telemetry callbacks") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Acked-by: Ciara Power Acked-by: Thomas Monjalon --- diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 9fe1c9d769..daf5f24f7e 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -5739,7 +5739,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;