DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: <dev@dpdk.org>
Subject: Re: mbuf init questions
Date: Tue, 5 Dec 2023 09:56:04 +0000	[thread overview]
Message-ID: <ZW7ztGBf8Xs9cFVC@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F08D@smartserver.smartshare.dk>

On Tue, Dec 05, 2023 at 10:07:56AM +0100, Morten Brørup wrote:
> Why is m->nb_segs initialized in rte_pktmbuf_prefree_seg()?
> 
> It's part of the m->rearm_data, and will be initialized on RX descriptor rearm anyway.
> 
Presumably this is to have a sane default for apps that allocate buffers
directly using mempool_get functions.

Overall, we probably need to document clearly for mbufs allocated using
mempool apis rather than mbuf_alloc what fields are valid and what need to
be initialized.

/Bruce

  reply	other threads:[~2023-12-05  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  9:07 Morten Brørup
2023-12-05  9:56 ` Bruce Richardson [this message]
2023-12-05 10:10   ` Morten Brørup

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=ZW7ztGBf8Xs9cFVC@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    /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).