dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Smoczynski, MarcinX" <marcinx.smoczynski@intel.com>,
	"Kovacevic, Marko" <marko.kovacevic@intel.com>,
	"orika@mellanox.com" <orika@mellanox.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
	"Nicolau, Radu" <radu.nicolau@intel.com>,
	"Kantecki, Tomasz" <tomasz.kantecki@intel.com>,
	"Iremonger, Bernard" <bernard.iremonger@intel.com>,
	"olivier.matz@6wind.com" <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/3] net: new ipv6 header extension parsing function
Date: Fri, 21 Jun 2019 08:01:33 +0000	[thread overview]
Message-ID: <VE1PR04MB663903D56058E5988074890FE6E70@VE1PR04MB6639.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB97725801689E2C5B@IRSMSX104.ger.corp.intel.com>

Hi Konstantin,

> 
> Hi Akhil,
> 
> >
> > Hi Marcin,
> >
> > >
> > > Introduce new function for IPv6 header extension parsing able to
> > > determine extension length and next protocol number.
> > >
> > > This function is helpful when implementing IPv6 header traversing.
> > >
> > > Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
> > > ---
> > >  lib/librte_net/rte_ip.h | 49
> +++++++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 49 insertions(+)
> > >
> > > diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
> > > index f9b909090..be64da662 100644
> > > --- a/lib/librte_net/rte_ip.h
> > > +++ b/lib/librte_net/rte_ip.h
> > > @@ -425,6 +425,55 @@ rte_ipv6_udptcp_cksum(const struct ipv6_hdr
> > > *ipv6_hdr, const void *l4_hdr)
> > >  	return (uint16_t)cksum;
> > >  }
> > >
> > > +/* IPv6 fragmentation header size */
> > > +#define RTE_IPV6_FRAG_HDR_SIZE 8
> > > +
> > > +/**
> > > + * Parse next IPv6 header extension
> > > + *
> > > + * This function checks if proto number is an IPv6 extensions and parses its
> > > + * data if so, providing information on next header and extension length.
> > > + *
> > > + * @param p
> > > + *   Pointer to an extension raw data.
> > > + * @param proto
> > > + *   Protocol number extracted from the "next header" field from
> > > + *   the IPv6 header or the previous extension.
> > > + * @param ext_len
> > > + *   Extension data length.
> > > + * @return
> > > + *   next protocol number if proto is an IPv6 extension, -EINVAL otherwise
> > > + */
> > > +static inline int __rte_experimental
> >
> >
> > Rte_experimental may not be required for inline functions.
> 
> AFAIK we do need that tag for both inline and non-inline functions,
> till API will be transferred to 'stable' state:
> 
> $ find lib -type f | xargs grep __rte_experimental | grep inline | wc -l
> 57

My first impression was that this API was not exposed. Inline APIs are normally not exposed, 
So I thought rte_experimental is not required. I believe only exposed APIs
Need to be tagged with rte_experimental.

Now since this API is exposed to the application as well, it should have an entry in the .map file.
Otherwise shared build will fail I think for application.

> 
> >
> >
> > > +rte_ipv6_get_next_ext(uint8_t *p, int proto, size_t *ext_len)
> > > +{
> > > +	int next_proto;
> > > +
> > > +	switch (proto) {
> > > +	case IPPROTO_AH:
> > > +		next_proto = *p++;
> > > +		*ext_len = (*p + 2) * sizeof(uint32_t);
> > > +		break;
> > > +
> > > +	case IPPROTO_HOPOPTS:
> > > +	case IPPROTO_ROUTING:
> > > +	case IPPROTO_DSTOPTS:
> > > +		next_proto = *p++;
> > > +		*ext_len = (*p + 1) * sizeof(uint64_t);
> > > +		break;
> > > +
> > > +	case IPPROTO_FRAGMENT:
> > I see that there is some compilation issues with respect to IPPROTO_xxx fields.
> These are reported in patchworks if you need details.
> >
> > Could you please fix these and send next rev.
> >
> > Thanks,
> > Akhil

  reply	other threads:[~2019-06-21  8:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 10:47 [dpdk-dev] [PATCH 1/3] net: new ipv6 header extension parsing function Marcin Smoczynski
2019-05-08 10:47 ` [dpdk-dev] [PATCH 2/3] ipsec: fix transport mode for ipv6 with extensions Marcin Smoczynski
2019-05-14 12:42   ` Ananyev, Konstantin
2019-06-20 12:07   ` Akhil Goyal
2019-05-08 10:47 ` [dpdk-dev] [PATCH 3/3] examples/ipsec-secgw: add support for ipv6 options Marcin Smoczynski
2019-05-14 12:51   ` Ananyev, Konstantin
2019-05-14 12:48 ` [dpdk-dev] [PATCH 1/3] net: new ipv6 header extension parsing function Ananyev, Konstantin
2019-06-20 11:40 ` Akhil Goyal
2019-06-20 17:40   ` Ananyev, Konstantin
2019-06-21  8:01     ` Akhil Goyal [this message]
2019-06-24 11:45       ` Smoczynski, MarcinX
2019-06-25 12:57         ` Akhil Goyal
2019-06-24 13:39 ` [dpdk-dev] [PATCH v2 0/4] IPv6 with options support for IPsec transport Marcin Smoczynski
2019-06-24 13:39   ` [dpdk-dev] [PATCH v2 1/4] net: new ipv6 header extension parsing function Marcin Smoczynski
2019-06-24 18:54     ` Ananyev, Konstantin
2019-07-02  9:06     ` Olivier Matz
2019-06-24 13:39   ` [dpdk-dev] [PATCH v2 2/4] ipsec: fix transport mode for ipv6 with extensions Marcin Smoczynski
2019-06-24 18:55     ` Ananyev, Konstantin
2019-06-24 13:39   ` [dpdk-dev] [PATCH v2 3/4] examples/ipsec-secgw: add support for ipv6 options Marcin Smoczynski
2019-06-24 18:55     ` Ananyev, Konstantin
2019-06-24 13:40   ` [dpdk-dev] [PATCH v2 4/4] examples/ipsec-secgw: add scapy based unittests Marcin Smoczynski
2019-06-24 18:56     ` Ananyev, Konstantin
2019-06-25 12:59   ` [dpdk-dev] [PATCH v2 0/4] IPv6 with options support for IPsec transport Akhil Goyal

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=VE1PR04MB663903D56058E5988074890FE6E70@VE1PR04MB6639.eurprd04.prod.outlook.com \
    --to=akhil.goyal@nxp.com \
    --cc=bernard.iremonger@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=marcinx.smoczynski@intel.com \
    --cc=marko.kovacevic@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=orika@mellanox.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=radu.nicolau@intel.com \
    --cc=tomasz.kantecki@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).