summaryrefslogtreecommitdiff
path: root/drivers/net/ifc
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2018-10-10 17:12:20 +0300
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-26 22:14:06 +0200
commitfd61c749dbb2224d1e988085340c22ab9c985243 (patch)
treece4ca3a3bb721289084b15ed8141c0cf4c83e65f /drivers/net/ifc
parenta51639cc720aa17922d4b479e9961169f3a36c64 (diff)
downloaddpdk-next-eventdev-fd61c749dbb2224d1e988085340c22ab9c985243.zip
dpdk-next-eventdev-fd61c749dbb2224d1e988085340c22ab9c985243.tar.gz
dpdk-next-eventdev-fd61c749dbb2224d1e988085340c22ab9c985243.tar.xz
drivers/net: use sleep delay by default for Intel NICs
NICs uses different delays up to a second during their configuration. It makes no sense to busy-wait so long wasting CPU cycles and preventing any other threads to execute on the same CPU core. These busy polling are the rudiments that came from the kernel drivers where you can not sleep in interrupt context, but as we're in userspace, we're able and should sleep to allow other threads to run. Delays never called on rx/tx path, so this should not affect performance. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'drivers/net/ifc')
-rw-r--r--drivers/net/ifc/base/ifcvf_osdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ifc/base/ifcvf_osdep.h b/drivers/net/ifc/base/ifcvf_osdep.h
index cf151ef..6aef25e 100644
--- a/drivers/net/ifc/base/ifcvf_osdep.h
+++ b/drivers/net/ifc/base/ifcvf_osdep.h
@@ -17,7 +17,7 @@
#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, PMD, S, ##args)
#define STATIC static
-#define msec_delay rte_delay_ms
+#define msec_delay(x) rte_delay_us_sleep(1000 * (x))
#define IFCVF_READ_REG8(reg) rte_read8(reg)
#define IFCVF_WRITE_REG8(val, reg) rte_write8((val), (reg))