From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id BBAE1AD8F for ; Thu, 19 May 2016 18:02:40 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id n129so42908413wmn.1 for ; Thu, 19 May 2016 09:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=WrkzohZWl4HlnOSp+6hJ5s6xcq/FYOiGDYAWZCQDFMg=; b=HTyyWA5tBWcLFwFYBFInI0uNWjeFhpYXjA+pUcuKYV4GL/WdeXg9YyS5+bY7pYGZeO 7nfWqurYG93oLJ3RxM9lB4PtzTyC5zszgU0xT8tc2hADSK2+PdImK+AasQYJNNcpSXcY S/rm95la/al2brIpActzqa44h4PxoaFh/d944ZByDle9GPLC1YuY8NWYv3771IEB0CI6 Q+mJ9QDzxdwrDmY/9pkP+81j8J3GMk79JoOg03rNccoZXEp1XrioHOFSzs9ph0iIAF/y Os4iB18TDyva73NsLQEcxR9Xe+hG0oMn5j4WYO7wV/qeQDruv7fAmg7ihq2Myxfb7JCV x62A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=WrkzohZWl4HlnOSp+6hJ5s6xcq/FYOiGDYAWZCQDFMg=; b=aQeZjGX3slivxpPtGjlY7WdNLLyLyEh2aFp6/t5uJomqvT+a0Se0cCRDjXyno9TbxI 7UFv5yVJFRUx5hdk7RsoibNogJwYgE6fmjQ/jPnzs+IlSLNoxpLi3oLIEvRaAqp984tq u4pJq//ct3Drp30Vq5L2QxeOdfmSYFqgtQJlWHfvdQQ0PKzdpkFf8CZVLOyB3vRYCV3L mc469FpL/7PkdZ6zpfXGqGpGHx8pXgEMxpQgNeLq+SuH7gqc2OLsCLbHVuEe1qgdXxDy PPot0rETKWuqK+blujqhk5H4NTPiAHC2AlABCgzYgVKCssKXXhtLBf2O6HT+loNFpxpD 9Ybg== X-Gm-Message-State: AOPr4FWdfp1u/fIZktJwfIpO+3DX07QC1EOc1GnnS+rIOY2RyBTOuBNa7yXnzTMsxn37pmRu X-Received: by 10.28.92.9 with SMTP id q9mr14152131wmb.72.1463673760535; Thu, 19 May 2016 09:02:40 -0700 (PDT) Received: from xps13.localnet (113.202.154.77.rev.sfr.net. [77.154.202.113]) by smtp.gmail.com with ESMTPSA id r123sm15563123wmg.20.2016.05.19.09.00.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2016 09:02:39 -0700 (PDT) From: Thomas Monjalon To: Jianbo Liu Cc: dev@dpdk.org, Jerin Jacob Date: Thu, 19 May 2016 17:56:36 +0200 Message-ID: <2611917.yjRp4jXU2P@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1462869064-9423-1-git-send-email-jianbo.liu@linaro.org> <2364439.Jm7BSl6O9C@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] arm64: change rte_memcpy to inline function 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, 19 May 2016 16:02:40 -0000 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.