DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: <dev@dpdk.org>
Subject: mbuf init questions
Date: Tue, 5 Dec 2023 10:07:56 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F08D@smartserver.smartshare.dk> (raw)

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.


Slightly related:

When built without RTE_IOVA_IN_MBUF, m->next lives in the first cache line.

Theoretically, it would improve performance to initialize m->next together with the RX descriptor rearm, when writing to the first cache line anyway, instead of in rte_pktmbuf_prefree_seg(), which requires another write to the first cache line. (In the case where m->next is non-NULL and m->refcnt is 1.)



Med venlig hilsen / Kind regards,
-Morten Brørup



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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  9:07 Morten Brørup [this message]
2023-12-05  9:56 ` Bruce Richardson
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=98CBD80474FA8B44BF855DF32C47DC35E9F08D@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@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).