Hi, Stephen

Thanks a lot for the comment.

> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Friday, January 10, 2020 20:24
> To: Slava Ovsiienko <viachesl...@mellanox.com>
> Cc: dev@dpdk.org; Matan Azrad <ma...@mellanox.com>; Raslan Darawsheh
> <rasl...@mellanox.com>; Ori Kam <or...@mellanox.com>; Shahaf Shuler
> <shah...@mellanox.com>
> Subject: Re: [dpdk-dev] [PATCH 1/4] mbuf: detach mbuf with pinned external
> buffer
> 
> On Fri, 10 Jan 2020 17:56:59 +0000
> Viacheslav Ovsiienko <viachesl...@mellanox.com> wrote:
> 
> > +
> > +static inline uint64_t
> > +rte_mbuf_has_pinned_extbuf(const struct rte_mbuf *m) {
> > +   if (RTE_MBUF_HAS_EXTBUF(m)) {
> > +           /*
> > +            * The mbuf has the external attached buffer,
> > +            * we should check the type of the memory pool where
> > +            * the mbuf was allocated from.
> > +            */
> > +           struct rte_pktmbuf_pool_private *priv =
> > +                   (struct rte_pktmbuf_pool_private *)
> > +                           rte_mempool_get_priv(m->pool);
> > +
> > +           return priv->flags &
> RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF;
> > +   }
> > +   return 0;
> > +}
> 
> New functions need to be marked experimental.
> The return value should be boolean not uint64_t
Will be fixed in v2.

> 
> Why does this need to be inlined (and thereby create new ABI burden)?
> Also having it inline makes making pktmbuf_pool_private really private in
> future.
Due to performance reasons. This routine potentially might be used in datapath.

With best regards, Slava

Reply via email to