DPDK patches and discussions
 help / color / mirror / Atom feed
* mbuf init questions
@ 2023-12-05  9:07 Morten Brørup
  2023-12-05  9:56 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2023-12-05  9:07 UTC (permalink / raw)
  To: dev

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-05 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05  9:07 mbuf init questions Morten Brørup
2023-12-05  9:56 ` Bruce Richardson
2023-12-05 10:10   ` Morten Brørup

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).