On Fri, Jan 11, 2019 at 9:11 AM David Marchand <david.march...@redhat.com> wrote:
> On Thu, Jan 10, 2019 at 11:40 PM Yongseok Koh <ys...@mellanox.com> wrote: > 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 // > > + * >> + * @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 forget > about such things to do. > Thomas ? > Maybe we could have something explicit in rte_mbuf_to_baddr that would avoid it "inherits" the experimental tag. @@ -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 = (char *)md + sizeof(*md) + rte_pktmbuf_priv_size(md->pool); return buffer_addr; +#endif } /** -- David Marchand