From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5EE778E9E for ; Thu, 14 Jan 2016 14:16:50 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 14 Jan 2016 05:16:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,294,1449561600"; d="scan'208";a="881268085" Received: from unknown (HELO dpdk5.sh.intel.com) ([10.239.129.244]) by fmsmga001.fm.intel.com with ESMTP; 14 Jan 2016 05:16:48 -0800 From: Zhihong Wang To: dev@dpdk.org Date: Thu, 14 Jan 2016 01:13:22 -0500 Message-Id: <1452752002-107586-5-git-send-email-zhihong.wang@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452752002-107586-1-git-send-email-zhihong.wang@intel.com> References: <1452752002-107586-1-git-send-email-zhihong.wang@intel.com> Subject: [dpdk-dev] [PATCH 4/4] app/test: Adjust alignment unit for memcpy perf test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 13:16:50 -0000 Decide alignment unit for memcpy perf test based on predefined macros. Signed-off-by: Zhihong Wang --- app/test/test_memcpy_perf.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/test/test_memcpy_perf.c b/app/test/test_memcpy_perf.c index 754828e..73babec 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 -- 2.5.0