From: Zhihong Wang Date: Mon, 18 Jan 2016 03:05:13 +0000 (-0500) Subject: app/test: adjust alignment unit for memcpy performance X-Git-Tag: spdx-start~7670 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=48093287c8d9cca1e1ce6838e6c60a5b821d72c7;p=dpdk.git app/test: adjust alignment unit for memcpy performance Decide alignment unit for memcpy perf test based on predefined macros. Signed-off-by: Zhihong Wang --- diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 754828e9d7..73babece6d 100644 --- a/app/test/test_memcpy_perf.c +++ b/app/test/test_memcpy_perf.c @@ -79,7 +79,13 @@ static size_t buf_sizes[TEST_VALUE_RANGE]; #define TEST_BATCH_SIZE 100 /* Data is aligned on this many bytes (power of 2) */ +#ifdef RTE_MACHINE_CPUFLAG_AVX512F +#define ALIGNMENT_UNIT 64 +#elif RTE_MACHINE_CPUFLAG_AVX2 #define ALIGNMENT_UNIT 32 +#else /* RTE_MACHINE_CPUFLAG */ +#define ALIGNMENT_UNIT 16 +#endif /* RTE_MACHINE_CPUFLAG */ /* * Pointers used in performance tests. The two large buffers are for uncached