eal: customize delay function
authorJozef Martiniak <jozmarti@cisco.com>
Mon, 26 Sep 2016 08:35:09 +0000 (10:35 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 26 Sep 2016 12:48:42 +0000 (14:48 +0200)
commitb4d63fb622400449d78bc1ea3e18a6ef14e8d7da
treea920b6067218e99014a5a082096e2ba7cf98480e
parent7b3c4f351708a4bf5d311266d9f8c32e5704701f
eal: customize delay function

When running single-core, some drivers tend to call rte_delay_us for a
long time, and that is causing packet drops.
To avoid this, rte_delay_us can be replaced with user-defined delay
function with:

void rte_delay_us_callback_register(void(*userfunc)(unsigned));

When userfunc==rte_delay_us_block build-in blocking delay function is
restored.

Signed-off-by: Jozef Martiniak <jozmarti@cisco.com>
app/test/test_cycles.c
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/eal_common_timer.c
lib/librte_eal/common/include/generic/rte_cycles.h
lib/librte_eal/linuxapp/eal/rte_eal_version.map