Converted DPDK16.07 "Allow-applications-to-override-rte_delay_us" patch
to of callback in DPDK16.11
Change-Id: I6c802e3ea8f817e5df591166b1e0a42f5f835a71
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
/* Don't bother intercepting for short delays */
if (us < 10)
/* Don't bother intercepting for short delays */
if (us < 10)
+ {
+#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
+ rte_delay_us_block (us);
+#endif
+ return 0;
+ }
/*
* Only intercept if we are in a vlib process.
/*
* Only intercept if we are in a vlib process.
/* Turn off network stack components which we don't want */
vlib_mark_init_function_complete (vm, srp_init);
/* Turn off network stack components which we don't want */
vlib_mark_init_function_complete (vm, srp_init);
+
+#if DPDK
+#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
+ /* register custom delay function */
+ rte_delay_us_callback_register ((void (*)) rte_delay_us_override);
+#endif
+#endif