From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] arm64: change rte_memcpy to inline function Date: Fri, 17 Jun 2016 12:30:32 +0200 Message-ID: <2989572.Qmv8XzlVsK@xps13> References: <1462869064-9423-1-git-send-email-jianbo.liu@linaro.org> <2611917.yjRp4jXU2P@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Jerin Jacob To: Jianbo Liu Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 12859CCB6 for ; Fri, 17 Jun 2016 12:30:35 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id a66so94929701wme.0 for ; Fri, 17 Jun 2016 03:30:35 -0700 (PDT) In-Reply-To: <2611917.yjRp4jXU2P@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-05-19 17:56, Thomas Monjalon: > 2016-05-19 21:48, Jianbo Liu: > > On 13 May 2016 at 23:49, Thomas Monjalon wrote: > > > 2016-05-10 14:01, Jianbo Liu: > > >> Other APP may call rte_memcpy by function pointer, > > >> so change it to an inline function. > > > > > > Any example in mind? > > > > > It's for ODP-DPDK. > > Given that ODP is open (dataplane), you should also consider ppc64 and tile. > > > >> --- a/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h > > >> +++ b/lib/librte_eal/common/include/arch/arm/rte_memcpy_64.h > > >> -#define rte_memcpy(d, s, n) memcpy((d), (s), (n)) > > >> +static inline void * > > >> +rte_memcpy(void *dst, const void *src, size_t n) > > >> +{ > > >> + return memcpy(dst, src, n); > > >> +} > > > > > > It has no sense if other archs (arm32, ppc64, tile) are not updated. > > > > > But it also an inline function on x86. > > In x86, it was implemented as a function because there is some code. > If you want to make sure it is always a function, even in the case > of just calling memcpy from libc, you should put a doxygen comment in > the generic part and adapt every archs. no news? a v2 would be welcome