Go to file
Didier Pallard 3314648f83 timer: add precise TSC function
According to Intel Developer's Manual:

"The RDTSC instruction is not a serializing instruction. It does not necessarily wait
 until all previous instructions have been executed before reading the counter. Simi-
 larly, subsequent instructions may begin execution before the read operation is
 performed. If software requires RDTSC to be executed only after all previous instruc-
 tions have completed locally, it can either use RDTSCP (if the processor supports that
 instruction) or execute the sequence LFENCE;RDTSC."

So add a rte_rdtsc_precise function that do a memory barrier before rdtsc to
synchronize operations and ensure that the TSC read is done at the expected place.
Use r/w memory barrier instead of lfence to serialize both loads and stores.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: François-Frédéric Ozog <ff@ozog.com>
Reviewed-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:07:27 +01:00
app kvargs: add test case in app/test 2014-02-26 11:01:14 +01:00
config kvargs: add a new library to parse key/value arguments 2014-02-26 11:01:13 +01:00
doc kvargs: add in doc 2014-02-26 11:01:14 +01:00
examples examples/netmap_compat: import netmap compatibility example 2014-02-26 10:47:59 +01:00
lib timer: add precise TSC function 2014-02-26 11:07:27 +01:00
mk kvargs: add a new library to parse key/value arguments 2014-02-26 11:01:13 +01:00
scripts update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
tools update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
.gitignore init DPDK repository 2013-03-07 10:57:42 +01:00
GNUmakefile add FreeBSD support 2014-02-25 21:29:18 +01:00
LICENSE.GPL doc: GPL/LGPL licenses 2013-07-25 14:43:06 +02:00
LICENSE.LGPL doc: fix file format (dos to unix) 2013-09-06 11:43:07 +02:00
Makefile add FreeBSD support 2014-02-25 21:29:18 +01:00