numam-dpdk/lib/librte_mbuf
Maxime Coquelin febf2bb46d mbuf: add function to reset headroom
Some application use rte_mbuf_raw_alloc() function to improve
performance by not resetting mbuf's fields to their default state.

This can be however problematic for mbuf consumers that need some
headroom, meaning that data_off field gets decremented after
allocation. When the mbuf is re-used afterwards, there might not
be enough room for the consumer to prepend anything, if the data_off
field is not reset to its default value.

This patch adds a new rte_pktmbuf_reset_headroom() function that
applications can call to reset the data_off field.
This patch also replaces current data_off affectations in the mbuf
lib with a call to this function.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2016-10-05 15:13:37 +02:00
..
Makefile mbuf: remove packet type from offload flags 2015-09-03 19:22:48 +02:00
rte_mbuf_version.map lib: remove redundant definition of local symbols 2015-06-29 18:57:32 +02:00
rte_mbuf.c mbuf: fix error handling on pool creation 2016-10-05 14:21:05 +02:00
rte_mbuf.h mbuf: add function to reset headroom 2016-10-05 15:13:37 +02:00