From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E93AC43613 for ; Mon, 24 Jun 2019 11:45:19 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 9E36F20674 for ; Mon, 24 Jun 2019 11:45:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E36F20674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD26B1BEE9; Mon, 24 Jun 2019 13:45:17 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 76AC31BEC9 for ; Mon, 24 Jun 2019 13:45:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 04:45:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,412,1557212400"; d="scan'208";a="163300222" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 24 Jun 2019 04:45:14 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 04:45:14 -0700 Received: from lcsmsx156.ger.corp.intel.com (10.186.165.234) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 04:45:14 -0700 Received: from lcsmsx153.ger.corp.intel.com ([169.254.8.163]) by LCSMSX156.ger.corp.intel.com ([169.254.15.128]) with mapi id 14.03.0439.000; Mon, 24 Jun 2019 14:45:11 +0300 From: "Smoczynski, MarcinX" To: Akhil Goyal , "Ananyev, Konstantin" , "Kovacevic, Marko" , "orika@mellanox.com" , "Richardson, Bruce" , "De Lara Guarch, Pablo" , "Nicolau, Radu" , "Kantecki, Tomasz" , "Iremonger, Bernard" , "olivier.matz@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/3] net: new ipv6 header extension parsing function Thread-Index: AQHVBYuBotPm/9+dskO2UR2K/9lc4KakfGcAgABkoQCAAPCrgIAFHu5A Date: Mon, 24 Jun 2019 11:45:11 +0000 Message-ID: <2F25558C1648FA498380EAC12A861262CE62EB@LCSMSX153.ger.corp.intel.com> References: <20190508104717.13448-1-marcinx.smoczynski@intel.com> <2601191342CEEE43887BDE71AB97725801689E2C5B@IRSMSX104.ger.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjExNzdlNTMtNDNhZS00ODg1LWE2ODMtMGZkNmM3MDdlMmM2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaDBOMWRtclZnSnZXUDdhdUpnK0pQSFo4eGxmYmlRMXYxeldmR0oydGlyQ1lERmNQY0Y0Q1dtUFhmbGNHbjJlRCJ9 x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/3] net: new ipv6 header extension parsing function 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 Akhil, I've double checked and there is no problem with linking application agains= t shared libraries, because inline functions are being inlined during compi= lation and before linking is done. To be more specific: there is not such s= ymbol as rte_ipv6_get_next_ext in ipsec-secgw.o (which uses this function i= n prepare_one_packet function). There are a number of inline experimental functions defined today and they= are mostly (43 out of 59) not listed in maps, e.g. rte_ticketlock function= s family defined here: lib/librte_eal/common/include/generic/rte_ticketlock.h Is there any particular reason we should put inlines in maps? Maps are used= by linker to control versions of shared libraries and inlines are not proc= essed by linker. I am aware this patchset causes build failures on BSDs - this is a project-= wide issue which I have addressed here: http://patchwork.dpdk.org/patch/53406/ I'll put a note in the next version of this patchset's cover that it depend= s on abovementioned patchset. Marcin >=20 > Hi Konstantin, >=20 > > > > 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 > > > > --- > > > > 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 >=20 > 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. >=20 > 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. >=20 > > > > > > > > > > > > +rte_ipv6_get_next_ext(uint8_t *p, int proto, size_t *ext_len) { > > > > + int next_proto; > > > > + > > > > + switch (proto) { > > > > + case IPPROTO_AH: > > > > + next_proto =3D *p++; > > > > + *ext_len =3D (*p + 2) * sizeof(uint32_t); > > > > + break; > > > > + > > > > + case IPPROTO_HOPOPTS: > > > > + case IPPROTO_ROUTING: > > > > + case IPPROTO_DSTOPTS: > > > > + next_proto =3D *p++; > > > > + *ext_len =3D (*p + 1) * sizeof(uint64_t); > > > > + break; > > > > + > > > > + case IPPROTO_FRAGMENT: > > > I see that there is some compilation issues with respect to IPPROTO_x= xx > fields. > > These are reported in patchworks if you need details. > > > > > > Could you please fix these and send next rev. > > > > > > Thanks, > > > Akhil