From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 18DC52951 for ; Fri, 12 Jan 2018 18:04:18 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A53C5204D2; Fri, 12 Jan 2018 12:04:17 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 12 Jan 2018 12:04:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=a3tGVJvpxe6FjEH5HevbYP8CUT nvZp7ctn4j5pPexdg=; b=EvvsUWA0Ar+2DVUfDyLJc8EZq1OHfeWSXn38bxYTWr swxGdmvJcy9daXL6EDDu2LuyuGELe8kEOO1DIR8HLw7bha/BvQQm6egfM+s51UnS ML8sCJLUPwHQEjBMNziZ7+TuwKIhEM0Z+P8Bc7iFxiIMcDH3mXLQGAnH6bgWZrzm U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=a3tGVJ vpxe6FjEH5HevbYP8CUTnvZp7ctn4j5pPexdg=; b=O2rSJd2zFd/i5PTz5H1wVL MxU83xEyYmuN5fpTuFToD1sdcBR6C+G5XgY94vLLgcuXvH1+dgBxNRhTgtJyZcxS PiA+osHajJVRWFlPlQ3hLBiUb3E7rO1FPPK8ZajQPw/E7kiWs2iVJS+H5J3iReZk GYc3qDzG+lZR++kPPADJ6ZvD1U/zAyS3ptHQ6c1Gt/OQkwPh6GXn9gGkuymY9pR+ MZjM3NyEBSz+qKlwSaV90NxerKjNa79b/ySeYI9DE6bPpL56AD12tp1B5d9hQxok gY4GfEALYsQp5OntuKX+Tq7n4wJnbhMk1X5cvAwmdta3kMthKGc8hRagDof73VJw == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 53AC72473E; Fri, 12 Jan 2018 12:04:17 -0500 (EST) From: Thomas Monjalon To: Herbert Guan Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com Date: Fri, 12 Jan 2018 18:03:48 +0100 Message-ID: <3668269.EoJLONrpA4@xps> In-Reply-To: <1515061208-27252-1-git-send-email-herbert.guan@arm.com> References: <1511768985-21639-1-git-send-email-herbert.guan@arm.com> <1515061208-27252-1-git-send-email-herbert.guan@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] arch/arm: optimization for memcpy on AArch64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 17:04:18 -0000 Hi, All the code is using ARM64, but the title suggests AArch64. What is the difference between AArch64 and ARM64 (and ARMv8)? 04/01/2018 11:20, Herbert Guan: > +/************************************** > + * Beginning of customization section > + **************************************/ > +#define RTE_ARM64_MEMCPY_ALIGN_MASK 0x0F > +#ifndef RTE_ARCH_ARM64_MEMCPY_STRICT_ALIGN > +/* Only src unalignment will be treaed as unaligned copy */ typo: treaed > +#define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \ > + ((uintptr_t)(dst) & RTE_ARM64_MEMCPY_ALIGN_MASK) > +#else > +/* Both dst and src unalignment will be treated as unaligned copy */ > +#define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \ > + (((uintptr_t)(dst) | (uintptr_t)(src)) & RTE_ARM64_MEMCPY_ALIGN_MASK) > +#endif > + > + > +/* > + * If copy size is larger than threshold, memcpy() will be used. > + * Run "memcpy_perf_autotest" to determine the proper threshold. > + */ > +#define RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD ((size_t)(0xffffffff)) > +#define RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD ((size_t)(0xffffffff)) > + > +/* > + * The logic of USE_RTE_MEMCPY() can also be modified to best fit platform. > + */ > +#define USE_RTE_MEMCPY(dst, src, n) \ > +((!RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \ > +n <= RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD) \ > +|| (RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \ > +n <= RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD)) > + > +/************************************** > + * End of customization section > + **************************************/ Modifying the code to asjust the platform is not easy for deployment. Can we move some customization variables inside the configuration file?