mbuf headroom question

Morten Brørup mb at smartsharesystems.com
Thu Jan 6 10:29:11 CET 2022


Hi Olivier,

The data_room_size parameter description for the mbuf pool creation functions says:
"Size of data buffer in each mbuf, including RTE_PKTMBUF_HEADROOM."

Furthermore, both rte_mbuf_data_iova_default() and rte_mbuf_data_addr_default() simply add RTE_PKTMBUF_HEADROOM to the return value.

Based on the above, I would think that it is impossible for m->buf_len to be smaller than RTE_PKTMBUF_HEADROOM.

So why does rte_pktmbuf_reset_headroom() use RTE_MIN(m->buf_len, RTE_PKTMBUF_HEADROOM), instead of just RTE_PKTMBUF_HEADROOM? What am I missing here?


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



More information about the dev mailing list