DPDK patches and discussions
 help / color / mirror / Atom feed
* mbuf headroom question
@ 2022-01-06  9:29 Morten Brørup
  2022-01-06  9:48 ` Olivier Matz
  0 siblings, 1 reply; 5+ messages in thread
From: Morten Brørup @ 2022-01-06  9:29 UTC (permalink / raw)
  To: Olivier Matz, dev

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


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

end of thread, other threads:[~2022-01-06 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06  9:29 mbuf headroom question Morten Brørup
2022-01-06  9:48 ` Olivier Matz
2022-01-06 10:50   ` Morten Brørup
2022-01-06 12:41     ` Olivier Matz
2022-01-06 12:49       ` 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).