This series fixes the support of indirect mbufs when the application reserves a private area in mbufs. This is done adding a new field in each mbuf storing the size of this private area. Another option would have been to store that in the mbuf pool private info, but as we have enough room in mbuf, it's faster to have it in the mbuf.
The series also removes the limitation that rte_pktmbuf_clone() is only allowed on direct (non-cloned) mbufs. Changes in v2: - do not change the use of MBUF_EXT_MEM() in vhost - change rte_mbuf_from_baddr() to rte_mbuf_from_indirect(), removing one parameter - fix and rework rte_pktmbuf_detach() - move m->priv_size in second mbuf cache line - fix mbuf free in test error case Olivier Matz (5): mbuf: fix clone support when application uses private mbuf data mbuf: allow to clone an indirect mbuf test/mbuf: rename mc variable in m test/mbuf: enhance mbuf refcnt test test/mbuf: verify that cloning a clone works properly app/test-pmd/testpmd.c | 1 + app/test/test_mbuf.c | 88 ++++++++++++++++++++++++++++++++++++++------- examples/vhost/main.c | 2 +- lib/librte_mbuf/rte_mbuf.c | 1 + lib/librte_mbuf/rte_mbuf.h | 90 ++++++++++++++++++++++++++++++---------------- 5 files changed, 138 insertions(+), 44 deletions(-) -- 2.1.4