mbuf init questions
Bruce Richardson
bruce.richardson at intel.com
Tue Dec 5 10:56:04 CET 2023
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
More information about the dev
mailing list