From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 203EF1B614 for ; Fri, 13 Oct 2017 09:21:54 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9B8BF20B58; Fri, 13 Oct 2017 03:21:53 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 13 Oct 2017 03:21:53 -0400 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=zWqYPPKVIbDgYTP0fsOfEfbZ9M 3HnKKuAnBVkC42nd0=; b=G4Jzvn7uSGoC9jIuZ57SQhMF9exJH/9KQRc1o42Z5D B1hiNahsQ+9MhZFPxCh0rgrParuABQMRDB5k2aERBPnQzCnAlCeRIzj6+eiU41Q6 rjV0XzWyNQV8ta3I8VEhOEhbl0P0ijKh0AHgOvdIWijmpbCqYizRNf4E7uceEbV4 E= 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=zWqYPP KVIbDgYTP0fsOfEfbZ9M3HnKKuAnBVkC42nd0=; b=WBQaXAfyi2mHUqUOR5tnSu SNb4B6FLJ+2gZh04VJR3zv7xGqByhrvkOj9JQA0if6iXjujs9wryiOiiXw+07YOG xUvtpV/tGzS/g9EEyUjFYZT8lApIuAWRYvKHBBrRnpcPMK9AK66dg3+W6jMn/ZQY HRP/fIuW8OOJf4yg1aqnYAO6gLTRS+ZkVQKGEtExc+6rcYHVAZp5GB019GDtPTX6 DYSlBDfjO21rzPDVrdB0i45tYYS/eixB/ewKx7viRYS2qSpgBvcMpN/IKgHiCAft 1lOT2Yg57uJzMmaOp2CWBjHzOM9y6V4XLNk0w6Yq8ym8SmsW5mHcz5dlV0sSMxTw == 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 44EA324739; Fri, 13 Oct 2017 03:21:53 -0400 (EDT) From: Thomas Monjalon To: "Li, Xiaoyun" Cc: dev@dpdk.org, "Ananyev, Konstantin" , "Richardson, Bruce" , "Lu, Wenzhuo" , "Zhang, Helin" Date: Fri, 13 Oct 2017 09:21:52 +0200 Message-ID: <1709550.5v5ZG7JxHL@xps> In-Reply-To: References: <1507157911-8702-1-git-send-email-xiaoyun.li@intel.com> <35071535.8NSjKInSoG@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v7 1/3] eal/x86: run-time dispatch over memcpy 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, 13 Oct 2017 07:21:54 -0000 13/10/2017 03:06, Li, Xiaoyun: > Hi > Sorry for the late reply. I took AL last 3 days. > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 05/10/2017 14:33, Xiaoyun Li: > > > +/** > > > + * Macro for copying unaligned block from one location to another > > > +with constant load offset, > > > + * 47 bytes leftover maximum, > > > + * locations should not overlap. > > > + * Requirements: > > > + * - Store is aligned > > > + * - Load offset is , which must be immediate value within > > > +[1, 15] > > > + * - For , make sure bit backwards & <16 - offset> bit > > > +forwards are available for loading > > > + * - , , must be variables > > > + * - __m128i ~ must be pre-defined */ #define > > > +MOVEUNALIGNED_LEFT47_IMM(dst, src, len, > > > > Naive question: > > Is there a real benefit of using a macro compared to a static inline function > > optimized by a modern compiler? > > > The macro is in the existing DPDK codes. I didn't touch it. I just change the file name and the function name to rte_memcpy_internal. > So I am not clear about if there is real benefit. > In my opinion, I think it is the same as static inline function. > > Do I need to change them to inline function? In this patch, it appears as a new macro. If you can, inline function is cleaner for the new one. > > Anyway, if you are doing a new version, please reduce lines length and fix > > the indent from spaces to tabs. > > > They are original DPDK codes so I didn't touch them. > But in next version, I will fix them. Just to be sure: we are talking about fixing checkpatch warnings only for the code added, changed or moved. Thanks