From ef461b7938bcccf7bcd6b914690d806e4d9f0c18 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Fri, 27 Mar 2020 16:34:53 +0100 Subject: [PATCH] sleep in control plane thread --- lib/librte_eal/common/include/generic/rte_cycles.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h index 73d1fa7b92..a770562578 100644 --- a/lib/librte_eal/common/include/generic/rte_cycles.h +++ b/lib/librte_eal/common/include/generic/rte_cycles.h @@ -147,7 +147,10 @@ extern void static inline void rte_delay_ms(unsigned ms) { - rte_delay_us(ms * 1000); + if (rte_lcore_id() == LCORE_ID_ANY) + usleep(ms * 1000); + else + rte_delay_us(ms * 1000); } /** -- 2.20.1