[dpdk-dev] [PATCH v2 1/4] mbuf: add accessor function for private data area

Thomas Monjalon thomas at monjalon.net
Fri Jul 13 23:10:29 CEST 2018


26/06/2018 09:39, Olivier Matz:
> Hi Dan,
> 
> On Mon, Jun 18, 2018 at 04:35:34PM -0700, Dan Gora wrote:
> > Add an inline accessor function to return the starting address of
> > the private data area in the supplied mbuf.
> > 
> > This allows applications to easily access the private data area between
> > the struct rte_mbuf and the data buffer in the specified mbuf without
> > creating private macros or accessor functions.
> > 
> > No checks are made to ensure that a private data area actually exists
> > in the buffer.
> > 
> > Signed-off-by: Dan Gora <dg at adax.com>
> 
> Thank you for this patch.
> 
> Few (late) comments to your previous questions:
> 
> - about rte_mbuf vs rte_pktmbuf, as Andrew said pktmbuf was used in
>   the past when there was a ctrlmbuf. This one has been removed now, so
>   mbuf should be used.
> 
> - I agree that removing the test (m->priv_size == 0) is better for
>   the reasons mentionned, and also because it would add a test in the
>   dataplane area, which would sometimes be useless: the application create
>   the mbuf pools, so it can know that all mbufs have a priv area.
> 
> 
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>

Series applied




More information about the dev mailing list