From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 074E41B5DB for ; Fri, 13 Oct 2017 03:07:04 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2017 18:07:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,369,1503385200"; d="scan'208";a="145935063" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 12 Oct 2017 18:06:57 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 12 Oct 2017 18:06:37 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 12 Oct 2017 18:06:36 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Fri, 13 Oct 2017 09:06:35 +0800 From: "Li, Xiaoyun" To: Thomas Monjalon CC: "dev@dpdk.org" , "Ananyev, Konstantin" , "Richardson, Bruce" , "Lu, Wenzhuo" , "Zhang, Helin" Thread-Topic: [dpdk-dev] [PATCH v7 1/3] eal/x86: run-time dispatch over memcpy Thread-Index: AQHTPdZeGmi+IF3YRUSW4MVNnLsWHaLbS3MAgAW17WA= Date: Fri, 13 Oct 2017 01:06:34 +0000 Message-ID: References: <1507157911-8702-1-git-send-email-xiaoyun.li@intel.com> <1507206794-79941-1-git-send-email-xiaoyun.li@intel.com> <1507206794-79941-2-git-send-email-xiaoyun.li@intel.com> <35071535.8NSjKInSoG@xps> In-Reply-To: <35071535.8NSjKInSoG@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 01:07:05 -0000 Hi Sorry for the late reply. I took AL last 3 days. > -----Original Message----- > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Tuesday, October 10, 2017 01:47 > To: Li, Xiaoyun > Cc: dev@dpdk.org; Ananyev, Konstantin ; > Richardson, Bruce ; Lu, Wenzhuo > ; Zhang, Helin > Subject: Re: [dpdk-dev] [PATCH v7 1/3] eal/x86: run-time dispatch over > memcpy >=20 > 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, >=20 > Naive question: > Is there a real benefit of using a macro compared to a static inline func= tion > optimized by a modern compiler? >=20 The macro is in the existing DPDK codes. I didn't touch it. I just change t= he 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? > Anyway, if you are doing a new version, please reduce lines length and fi= x > the indent from spaces to tabs. >=20 They are original DPDK codes so I didn't touch them. But in next version, I will fix them. Best Regards Xiaoyun Li > Thank you