[dpdk-dev] problem with rte_pktmbuf_prepend (possible bug?)

Mario Gianni m.gianni at engineer.com
Tue Feb 18 11:27:49 CET 2014

Hi all, I'm experimenting some code with DPDK v1.5.0 and I have the following problem:

I have a thread that receives packets from NIC, once I received a packet I want to prepend some data to it and I try to do so through the function rte_pktmbuf_prepend()
then the packet is enqueued in a ring buffer where it will be used by a client thread before being dropped through the function rte_pktmbuf_free() called by the client thread.

Now, if I try to send packets to this program I have the following behaviour:
In a first time it seems to work correctly, then after a certain number of received packets (approximately the same number as the number of mbufs present in the mempool) if I call the rte_pktmbuf_headroom it returns that the headroom is shrinking more than the expected, until after a certain number of packets the headroom goes to zero.

It seems like that when I call the rte_pktmbuf_free() function it doesn't reset the data position inside the mbuf, so when I call for a second time the mbuf the headroom continues to shrink until it finishes.

Do you have any idea of this strange behaviour?Could it be a bug in the prepend/free function?

Thank you,


More information about the dev mailing list