<div dir="ltr">I create a mempool thusly with 0 bytes private size and 1024 bytes data room size:<br><br>rte_mempool *pool = rte_pktmbuf_pool_create("test", 1024, 0, 0, 1024, 0);<br><br>from which I allocate 1 mbuf.<div><br>which of the following three memory layouts best describes mbufs I allocate from this <br>pool? I can't tell if it's the 2nd or 3rd one. I believe the first one is wrong:<br><br><pre class="gmail-result--content--pre" style="margin-top:0px;margin-bottom:0px;padding:0px;overflow:hidden;line-height:1.2em;color:rgb(0,0,0)">
mbuf - RTE_PKTMBUF_HEADROOM not in data room
+--------------------------------+
|+------------------------------+|
||struct rte_mbuf ||
|+------------------------------+|
||RTE_PKTMBUF_HEADROOM bytes ||
|+------------------------------+| Data room starts here which will hold
||1024 bytes of data room size || L2/3/4 headers and actual payload. A
|+------------------------------+| pointer to the start of this field is
| . | given by rte_pktmbuf(mbuf, ...)
| . |
| . |
+--------------------------------+
mbuf - RTE_PKTMBUF_HEADROOM adds to data room size:
+--------------------------------+
|+------------------------------+|
||struct rte_mbuf ||
|+------------------------------+|Data room starts here which will hold
||1024 bytes + RTE_PKTMBUF_HEAD\||L2/3/4 headers and actual payload. A
||ROOM bytes ||pointer to the start of this field is
|| ||given by rte_pktmbuf(mbuf, ...)
|| ||
|+------------------------------+|
| . |
| . |
| . |
+--------------------------------+
mbuf - RTE_PKTMBUF_HEADROOM included in data room size
+--------------------------------+
|+------------------------------+|
||struct rte_mbuf ||
|+------------------------------+|Data room starts here which will hold
||1024 bytes of data room size ||L2/3/4 headers and actual payload. Since
|| ||data room size was >= RTE_PKTMBUF_HEADROOM
|| ||size the data room size of 1024 was valid
|+------------------------------+|and that's all that is reserved for the
| |data room
| |
| |
| |
+--------------------------------+ </pre><br><br></div></div>