From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yongseok Koh Subject: Re: [PATCH v4 1/2] mbuf: add function returning default buffer address Date: Fri, 11 Jan 2019 11:09:38 +0000 Message-ID: <20190111110927.GB8355@minint-98vp2qg> References: <20190109085426.39965-1-yskoh@mellanox.com> <20190110224030.2671-1-yskoh@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , Olivier Matz , Shahaf Shuler , "dev@dpdk.org" , "roszenrami@gmail.com" To: David Marchand Return-path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40064.outbound.protection.outlook.com [40.107.4.64]) by dpdk.org (Postfix) with ESMTP id 802EB1B94E for ; Fri, 11 Jan 2019 12:09:40 +0100 (CET) In-Reply-To: Content-Language: en-US Content-ID: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jan 11, 2019 at 09:32:52AM +0100, David Marchand wrote: > On Fri, Jan 11, 2019 at 9:11 AM David Marchand > wrote: >=20 > > On Thu, Jan 10, 2019 at 11:40 PM Yongseok Koh wrot= e: > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > > >> index bc562dc8a9..5787616999 100644 > >> --- a/lib/librte_mbuf/rte_mbuf.h > >> +++ b/lib/librte_mbuf/rte_mbuf.h > >> @@ -788,8 +788,54 @@ rte_mbuf_from_indirect(struct rte_mbuf *mi) > >> } > >> > >> /** > >> + * Return the default buffer address of the mbuf. > >> > > > > Nit: missed it... s/default // Okay > > > > + * > >> + * @warning > >> + * @b EXPERIMENTAL: This API may change without prior notice. > >> + * This will be used by rte_mbuf_to_baddr() which has redundant code = once > >> + * experimental tag is removed. > >> > > > > Good point. > > I wonder if we have a "todolist" for release n+2 so that we don't forge= t > > about such things to do. > > Thomas ? > > >=20 > Maybe we could have something explicit in rte_mbuf_to_baddr that would > avoid it "inherits" the experimental tag. >=20 > @@ -844,9 +844,13 @@ struct rte_mbuf_ext_shared_info { > static inline char * > rte_mbuf_to_baddr(struct rte_mbuf *md) > { > +#ifdef ALLOW_EXPERIMENTAL_API > + return rte_mbuf_buf_addr(md, md->pool); > +#else > char *buffer_addr; > buffer_addr =3D (char *)md + sizeof(*md) + > rte_pktmbuf_priv_size(md->pool); > return buffer_addr; > +#endif I like it, so that we can't forget to change it. Yongseok