DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Marchand <david.marchand@redhat.com>
Cc: mohamad ali <ali64mohammad64@gmail.com>, users <users@dpdk.org>
Subject: Re: [dpdk-users] Changing rte_mbuf
Date: Wed, 16 Jun 2021 08:26:53 -0700	[thread overview]
Message-ID: <20210616082653.5c47f140@hermes.local> (raw)
In-Reply-To: <CAJFAV8yWrScfkLZOcOM3B-GVtEV7fkEsgJDiSOeoFMxLFGmLCg@mail.gmail.com>

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

> On Wed, Jun 16, 2021 at 8:09 AM mohamad ali <ali64mohammad64@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

  reply	other threads:[~2021-06-16 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  6:42 mohamad ali
2021-06-16  6:31 ` David Marchand
2021-06-16 15:26   ` Stephen Hemminger [this message]
2021-06-18 10:06 ` Tom Barbette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616082653.5c47f140@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=ali64mohammad64@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).