20/01/2020 21:43, Stephen Hemminger:
> On Mon, 20 Jan 2020 17:23:19 +0000
> Viacheslav Ovsiienko <viachesl...@mellanox.com> wrote:
> 
> > The routine rte_pktmbuf_priv_flags is introduced to fetch
> > the flags from the mbuf memory pool private structure
> > in unified fashion.
> > 
> > Signed-off-by: Viacheslav Ovsiienko <viachesl...@mellanox.com>
> > Acked-by: Olivier Matz <olivier.m...@6wind.com>
> > ---
> > --- a/lib/librte_mbuf/rte_mbuf.h
> > +++ b/lib/librte_mbuf/rte_mbuf.h
> > +static inline uint32_t
> > +rte_pktmbuf_priv_flags(struct rte_mempool *mp)
> > +{
> > +   struct rte_pktmbuf_pool_private *mbp_priv;
> > +
> > +   mbp_priv = (struct rte_pktmbuf_pool_private *)rte_mempool_get_priv(mp);
> > +   return mbp_priv->flags;
> > +}
> 
> Looks fine, but a couple of minor suggestions.
> 
> 
> Since this doesn't modify the mbuf, the arguments should be const.
> Since rte_mempool_get_priv returns void *, the cast is unnecessary.

It makes sense.
Please let's make these minor changes in a separate patch
as I am closing -rc1 with the v6 of this series included.
Thanks


Reply via email to