eal/x86: select optimized memcpy at run-time
authorXiaoyun Li <xiaoyun.li@intel.com>
Fri, 13 Oct 2017 09:01:47 +0000 (17:01 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Oct 2017 13:20:50 +0000 (15:20 +0200)
commit84cc318424d49372dd2a5fbf3cf84426bf95acce
tree9204d3e7d3db31da72237a8d55015a4c7b24f17f
parentea39ca97d2528d235f9cfe1c0338a39e79a8a891
eal/x86: select optimized memcpy at run-time

This patch dynamically selects functions of memcpy at run-time based
on CPU flags that current machine supports. This patch uses function
pointers which are bind to the relative functions at constrctor time.
In addition, AVX512 instructions set would be compiled only if users
config it enabled and the compiler supports it.

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
lib/librte_eal/bsdapp/eal/Makefile
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/arch/x86/rte_memcpy.c [new file with mode: 0644]
lib/librte_eal/common/arch/x86/rte_memcpy_avx2.c [new file with mode: 0644]
lib/librte_eal/common/arch/x86/rte_memcpy_avx512f.c [new file with mode: 0644]
lib/librte_eal/common/arch/x86/rte_memcpy_sse.c [new file with mode: 0644]
lib/librte_eal/common/include/arch/x86/rte_memcpy.h
lib/librte_eal/common/include/arch/x86/rte_memcpy_internal.h [new file with mode: 0644]
lib/librte_eal/linuxapp/eal/Makefile
lib/librte_eal/linuxapp/eal/rte_eal_version.map
mk/rte.cpuflags.mk