DPDK usage discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: mohamad ali <ali64mohammad64@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] Changing rte_mbuf
Date: Wed, 16 Jun 2021 08:31:02 +0200
Message-ID: <CAJFAV8yWrScfkLZOcOM3B-GVtEV7fkEsgJDiSOeoFMxLFGmLCg@mail.gmail.com> (raw)
In-Reply-To: <CANnn570Vp400FHZ8FonSDzLbe4V=A34ezq=X0kEHxQZMeF2d_g@mail.gmail.com>

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.

David Marchand

  reply	other threads:[~2021-06-16  6:31 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 [this message]
2021-06-16 15:26   ` Stephen Hemminger
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:

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

  git send-email \
    --in-reply-to=CAJFAV8yWrScfkLZOcOM3B-GVtEV7fkEsgJDiSOeoFMxLFGmLCg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=ali64mohammad64@gmail.com \
    --cc=users@dpdk.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git