diff options
author | sreejith <sreejith.surendrannair@linaro.org> | 2017-03-29 01:15:02 -0400 |
---|---|---|
committer | sreejith <sreejith.surendrannair@linaro.org> | 2017-03-29 02:23:59 -0400 |
commit | a23197980e40d4d9414bcfaf59005a1dc2a89251 (patch) | |
tree | da3fc5410a9cda99e05d2e0f6dae06072a0c50b8 /vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch | |
parent | 746b57564deede624261ab8a96c94f562f24d22c (diff) |
Added vpp intial source code from master branch 17.01.1
Change-Id: I81bdace6f330825a1746a853766779dfb24765fd
Signed-off-by: sreejith <sreejith.surendrannair@linaro.org>
Diffstat (limited to 'vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch')
-rw-r--r-- | vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch b/vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch new file mode 100644 index 00000000..8a32f600 --- /dev/null +++ b/vpp/dpdk/dpdk-16.07_patches/0006-Allow-applications-to-override-rte_delay_us.patch @@ -0,0 +1,43 @@ +From 3432c140c9c51e671a4d58bb428d5852426add1f Mon Sep 17 00:00:00 2001 +From: "Todd Foggoa (tfoggoa)" <tfoggoa@cisco.com> +Date: Wed, 3 Feb 2016 08:35:27 -0800 +Subject: [PATCH 5/6] Allow applications to override rte_delay_us() + +Some applications may wish to define their own implentation of +usec delay other than the existing blocking one. The default +behavior remains unchanged. + +Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com> +--- + lib/librte_eal/common/eal_common_timer.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c +index c4227cd..cc26b91 100644 +--- a/lib/librte_eal/common/eal_common_timer.c ++++ b/lib/librte_eal/common/eal_common_timer.c +@@ -47,9 +47,21 @@ + /* The frequency of the RDTSC timer resolution */ + static uint64_t eal_tsc_resolution_hz; + ++/* Allow an override of the rte_delay_us function */ ++int rte_delay_us_override (unsigned us) __attribute__((weak)); ++ ++int ++rte_delay_us_override(__attribute__((unused)) unsigned us) ++{ ++ return 0; ++} ++ + void + rte_delay_us(unsigned us) + { ++ if (rte_delay_us_override(us)) ++ return; ++ + const uint64_t start = rte_get_timer_cycles(); + const uint64_t ticks = (uint64_t)us * rte_get_timer_hz() / 1E6; + while ((rte_get_timer_cycles() - start) < ticks) +-- +2.7.4 + |