From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 191EA8E6D for ; Mon, 18 Jan 2016 11:08:42 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 18 Jan 2016 02:08:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,312,1449561600"; d="scan'208";a="729396013" Received: from unknown (HELO dpdk5.sh.intel.com) ([10.239.129.244]) by orsmga003.jf.intel.com with ESMTP; 18 Jan 2016 02:08:41 -0800 From: Zhihong Wang To: dev@dpdk.org Date: Sun, 17 Jan 2016 22:05:13 -0500 Message-Id: <1453086314-30158-5-git-send-email-zhihong.wang@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1453086314-30158-1-git-send-email-zhihong.wang@intel.com> References: <1452752002-107586-1-git-send-email-zhihong.wang@intel.com> <1453086314-30158-1-git-send-email-zhihong.wang@intel.com> Subject: [dpdk-dev] [PATCH v2 4/5] 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: Mon, 18 Jan 2016 10:08:43 -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