[dpdk-users] Changing rte_mbuf

Stephen Hemminger stephen at networkplumber.org
Wed Jun 16 17:26:53 CEST 2021


On Wed, 16 Jun 2021 08:31:02 +0200
David Marchand <david.marchand at redhat.com> wrote:

> On Wed, Jun 16, 2021 at 8:09 AM mohamad ali <ali64mohammad64 at gmail.com> wrote:
> > Hi i want to change rte_mbuf struct and add some custom struct to it but
> > when i change it and compile again some error related to this line shows up.
> > RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET);
> >
> > What is the correct way to add struct to rte_mbuf ?  
> 
> The correct way is not to add anything to rte_mbuf :-).
> 
> If your application needs some private space per mbuf, you should
> instead embed the rte_mbuf struct into a structure of yours.
> Create a mempool with a private size accounting for this and make sure
> to init this private space per object.
> 
> 

Also after 20.11 use the dynamic field support


More information about the users mailing list