4a96e8b652
Remove one limitation of rte_pktmbuf_attach(): "mbuf we're attaching to must be direct". Now, when we attach to an indirect mbuf: - copy the all relevant fields (addr, len, offload, ...) as before - get the pointer to the mbuf that embeds the data buffer (direct mbuf), and increase the reference counter of this one. When detaching the mbuf, we can retrieve this direct mbuf as the pointer is determined from the buffer address. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>