From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C3543A0471 for ; Wed, 19 Jun 2019 14:51:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 753641C2E3; Wed, 19 Jun 2019 14:51:17 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DA0161BEEC for ; Wed, 19 Jun 2019 14:51:15 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 05:51:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,392,1557212400"; d="scan'208";a="186448873" Received: from vmedvedk-mobl.ger.corp.intel.com (HELO [10.237.220.98]) ([10.237.220.98]) by fmsmga002.fm.intel.com with ESMTP; 19 Jun 2019 05:51:13 -0700 To: Ruifeng Wang , bruce.richardson@intel.com Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, gavin.hu@arm.com, nd@arm.com References: <20190619053615.24613-1-ruifeng.wang@arm.com> <20190619053615.24613-3-ruifeng.wang@arm.com> From: "Medvedkin, Vladimir" Message-ID: Date: Wed, 19 Jun 2019 13:51:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190619053615.24613-3-ruifeng.wang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 3/3] lib/lpm: remove unnecessary inline 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Wang, 1. It is better to explicitly use __rte_noinline with this function because my gcc still inlines it even without the inline qualifier. 2. The same should be applied to _v20 functions. 3. Please try running the tests again and show the results. 4. Make this patch the first in a series. On 19/06/2019 06:36, Ruifeng Wang wrote: > Tests showed that the 'inline' keyword caused performance drop > on some x86 platforms after the memory ordering patches applied. > By removing the 'inline' keyword, the performance was recovered > as before on x86 and no impact to arm64 platforms. > > Suggested-by: Medvedkin Vladimir > Signed-off-by: Ruifeng Wang > Reviewed-by: Gavin Hu > --- > v2: initail version to recover rte_lpm_add() performance > > lib/librte_lpm/rte_lpm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c > index 0addff5d4..c97b602e6 100644 > --- a/lib/librte_lpm/rte_lpm.c > +++ b/lib/librte_lpm/rte_lpm.c > @@ -778,7 +778,7 @@ add_depth_small_v20(struct rte_lpm_v20 *lpm, uint32_t ip, uint8_t depth, > return 0; > } > > -static inline int32_t > +static int32_t > add_depth_small_v1604(struct rte_lpm *lpm, uint32_t ip, uint8_t depth, > uint32_t next_hop) > { > @@ -975,7 +975,7 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth, > return 0; > } > > -static inline int32_t > +static int32_t > add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth, > uint32_t next_hop) > { -- Regards, Vladimir