ring: support freeing
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 2 Oct 2015 15:53:44 +0000 (16:53 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 3 Nov 2015 23:49:59 +0000 (00:49 +0100)
commit4e32101f9b01827ed24bf26c53cc9aec7e8db231
tree9ecf60279276802e5e7e02d89f664d909cb6a550
parent34a068db146fe806539ce194749862d7031b4c6b
ring: support freeing

When creating a ring, a memzone is created to allocate it in memory,
but the ring could not be freed, as memzones could not be.

Since memzones can be freed now, then rings can be as well,
taking into account if they were initialized using pre-allocated memory
(in which case, memory should be freed externally) or using rte_memzone_reserve
(with rte_ring_create), freeing the memory with rte_memzone_free.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
doc/guides/rel_notes/release_2_2.rst
lib/librte_ring/rte_ring.c
lib/librte_ring/rte_ring.h
lib/librte_ring/rte_ring_version.map