DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: Ruifeng Wang <Ruifeng.Wang@arm.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>,
	 Jan Viktorin <viktorin@rehivetech.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	 Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	dev <dev@dpdk.org>,  Pavan Nikhilesh <pbhagavatula@marvell.com>,
	 "hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v3 1/5] lpm: add sve support for lookup on Arm platform
Date: Thu, 28 Jan 2021 09:03:11 +0100	[thread overview]
Message-ID: <CAJFAV8ztOiHYvudbmFpjK6ewibN0Hm3kbP2f9LiuzKm+5akjug@mail.gmail.com> (raw)
In-Reply-To: <DBAPR08MB58145266821547F777DA9B2D98BB0@DBAPR08MB5814.eurprd08.prod.outlook.com>

On Wed, Jan 27, 2021 at 10:03 PM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
>
> <snip>
>
> >
> > On Tue, Jan 12, 2021 at 3:57 AM Ruifeng Wang <ruifeng.wang@arm.com>
> > wrote:
> > > diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h index
> > > 1afe55cdc..28b57683b 100644
> > > --- a/lib/librte_lpm/rte_lpm.h
> > > +++ b/lib/librte_lpm/rte_lpm.h
> > > @@ -402,7 +402,11 @@ rte_lpm_lookupx4(const struct rte_lpm *lpm,
> > xmm_t ip, uint32_t hop[4],
> > >         uint32_t defv);
> > >
> > >  #if defined(RTE_ARCH_ARM)
> > > +#ifdef __ARM_FEATURE_SVE
> > > +#include "rte_lpm_sve.h"
> > > +#else
> > >  #include "rte_lpm_neon.h"
> > > +#endif
> > >  #elif defined(RTE_ARCH_PPC_64)
> > >  #include "rte_lpm_altivec.h"
> > >  #else
> > > diff --git a/lib/librte_lpm/rte_lpm_sve.h
> > > b/lib/librte_lpm/rte_lpm_sve.h new file mode 100644 index
> > > 000000000..2e319373e
> > > --- /dev/null
> > > +++ b/lib/librte_lpm/rte_lpm_sve.h
> > > @@ -0,0 +1,83 @@
> > > +/* SPDX-License-Identifier: BSD-3-Clause
> > > + * Copyright(c) 2020 Arm Limited
> > > + */
> > > +
> > > +#ifndef _RTE_LPM_SVE_H_
> > > +#define _RTE_LPM_SVE_H_
> > > +
> > > +#include <rte_vect.h>
> > > +
> > > +#ifdef __cplusplus
> > > +extern "C" {
> > > +#endif
> > > +
> > > +__rte_internal
> > > +static void
> >
> > I was looking into use of the __rte_internal tag in the tree.
> >
> > This helper is called from a inlined API used by applications, so out of the
> > DPDK build.
> > It looks like the compiler is not complaining when compiling examples (I
> > hacked my env to cross compile with gcc 10 + SVE enabled) but this seems
> > incorrect to me.
> >
> > Is there really a need for this helper?
> > It is only used below afaics.
> I do not think it is required.
>
> At the same time the commit log when '__rte_internal' was introduced is confusing.
> It says "Introduce the __rte_internal tag to mark internal ABI function which is used only by the drivers or other libraries". Why would an internal function have an ABI?

It happens that drivers/libraries in DPDK offer some interface for
other parts of the DPDK to use.
But we might want them to keep them hidden to final applications,
because this is purely internal and/or we don't want to guarantee
compatibility in later versions.
For such cases, a function can be marked __rte_internal.


This tag has two impacts:
- a marked symbol is versionned as INTERNAL when exported (so this
does not apply to inlines),
- if an application tries to use a marked API, an error is triggered
at build time to prevent use of such API,


-- 
David Marchand


  reply	other threads:[~2021-01-28  8:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 10:12 [dpdk-dev] [RFC PATCH] " Ruifeng Wang
2021-01-05 15:44 ` Medvedkin, Vladimir
2021-01-06 10:11   ` Ruifeng Wang
2021-01-08  8:25 ` [dpdk-dev] [PATCH v2 0/5] lpm lookup with sve support Ruifeng Wang
2021-01-08  8:25   ` [dpdk-dev] [PATCH v2 1/5] lpm: add sve support for lookup on Arm platform Ruifeng Wang
2021-01-13 18:54     ` Medvedkin, Vladimir
2021-01-08  8:25   ` [dpdk-dev] [PATCH v2 2/5] net/hns3: fix build with sve enabled Ruifeng Wang
2021-01-09  0:06     ` Honnappa Nagarahalli
2021-01-09  2:11       ` oulijun
2021-01-11  2:39         ` Ruifeng Wang
2021-01-11 13:38           ` Honnappa Nagarahalli
2021-01-09  2:15     ` oulijun
2021-01-11  2:27       ` Ruifeng Wang
2021-01-08  8:25   ` [dpdk-dev] [PATCH v2 3/5] net/octeontx: " Ruifeng Wang
2021-01-08  8:25   ` [dpdk-dev] [PATCH v2 4/5] common/octeontx2: " Ruifeng Wang
2021-01-08 10:29     ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-01-11  9:51       ` Ruifeng Wang
2021-01-08  8:25   ` [dpdk-dev] [PATCH v2 5/5] config: add Arm Neoverse N2 Ruifeng Wang
2021-01-08 23:58     ` Honnappa Nagarahalli
2021-01-11  3:01       ` Ruifeng Wang
2021-01-11  3:09         ` Jerin Jacob
2021-01-11  8:32           ` Ruifeng Wang
2021-01-11 13:58             ` Honnappa Nagarahalli
2021-01-12  2:57 ` [dpdk-dev] [PATCH v3 0/5] lpm lookup with sve support Ruifeng Wang
2021-01-12  2:57   ` [dpdk-dev] [PATCH v3 1/5] lpm: add sve support for lookup on Arm platform Ruifeng Wang
2021-01-13 15:58     ` David Marchand
2021-01-27 13:04     ` David Marchand
2021-01-27 21:03       ` Honnappa Nagarahalli
2021-01-28  8:03         ` David Marchand [this message]
2021-01-28 12:24           ` Honnappa Nagarahalli
2021-01-28  5:47       ` Ruifeng Wang
2021-01-12  2:57   ` [dpdk-dev] [PATCH v3 2/5] net/hns3: fix build with sve enabled Ruifeng Wang
2021-01-13  2:16     ` Honnappa Nagarahalli
2021-01-12  2:57   ` [dpdk-dev] [PATCH v3 3/5] net/octeontx: " Ruifeng Wang
2021-01-12  4:39     ` Jerin Jacob
2021-01-12  2:57   ` [dpdk-dev] [PATCH v3 4/5] common/octeontx2: " Ruifeng Wang
2021-01-12  4:38     ` Jerin Jacob
2021-01-12  2:57   ` [dpdk-dev] [PATCH v3 5/5] config: add Arm Neoverse N2 Ruifeng Wang
2021-01-12  4:44     ` Jerin Jacob
2021-01-13  2:08     ` Honnappa Nagarahalli
2021-01-14 15:18   ` [dpdk-dev] [PATCH v3 0/5] lpm lookup with sve support David Marchand
2021-01-14 15:40     ` David Marchand
2021-01-15  7:02       ` Ruifeng Wang

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=CAJFAV8ztOiHYvudbmFpjK6ewibN0Hm3kbP2f9LiuzKm+5akjug@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=pbhagavatula@marvell.com \
    --cc=viktorin@rehivetech.com \
    --cc=vladimir.medvedkin@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).