On Wed, Jul 10, 2019 at 10:49:17AM -0700, Stephen Hemminger wrote:
> On Wed, 10 Jul 2019 11:29:07 +0200
> Olivier Matz <olivier.m...@6wind.com> wrote:
> 
> >  /**
> >   * Indicate that the metadata field in the mbuf is in use.
> > @@ -738,6 +741,8 @@ struct rte_mbuf {
> >      */
> >     struct rte_mbuf_ext_shared_info *shinfo;
> >  
> > +   uint64_t dynfield1; /**< Reserved for dynamic fields. */
> > +   uint64_t dynfield2; /**< Reserved for dynamic fields. */
> >  } __rte_cache_aligned;
> 
> Growing mbuf is a fundamental ABI break and this needs
> higher level approval.

The size of the mbuf is still 128, I used the last 16 bytes that
were unused.

Later, we can think about removing existing fields and replace
them by a dynfield area, which can be anywhere in the structure
(even if it is in a 1 byte hole).

>  Why not one pointer?

A pointer to what?

> It looks like you are creating something like FreeBSD m_tag.
> Why not use that?

My implementation targets performance (accessing to *(mbuf + offset)
should be nearly as fast as accessing to a static field), at the price
of less flexibility compared to something like FreeBSD m_tag.

Reply via email to