All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>, bruce.richardson@intel.com
Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, gavin.hu@arm.com, nd@arm.com
Subject: Re: [dpdk-dev] [PATCH v2 3/3] lib/lpm: remove unnecessary inline
Date: Wed, 19 Jun 2019 13:51:12 +0100	[thread overview]
Message-ID: <e5900a6f-2227-9185-6e1a-7841171ee328@intel.com> (raw)
In-Reply-To: <20190619053615.24613-3-ruifeng.wang@arm.com>

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 <vladimir.medvedkin@intel.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---
> 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


  reply	other threads:[~2019-06-19 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  5:36 [dpdk-dev] [PATCH v2 1/3] lib/lpm: memory orderings to avoid race conditions for v1604 Ruifeng Wang
2019-06-19  5:36 ` [dpdk-dev] [PATCH v2 2/3] lib/lpm: memory orderings to avoid race conditions for v20 Ruifeng Wang
2019-06-19  5:36 ` [dpdk-dev] [PATCH v2 3/3] lib/lpm: remove unnecessary inline Ruifeng Wang
2019-06-19 12:51   ` Medvedkin, Vladimir [this message]
2019-06-20 10:34     ` Ruifeng Wang (Arm Technology China)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5900a6f-2227-9185-6e1a-7841171ee328@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=nd@arm.com \
    --cc=ruifeng.wang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.