[dpdk-dev] How to free a ring?
Dmitry Vyal
dmitryvyal at gmail.com
Wed Sep 11 11:07:35 CEST 2013
On 09/11/2013 11:46 AM, AndyChen wrote:
> Dpdk hasn't API to free ring/memzone/mempool, what's the scene you
> must free the ring?
>
Well, I'm writing a packet defragmenting code. I have a data structure
consisting of a rte_hash, a rte_ring and an array allocated with
rte_zmalloc. All these besides the ring can be freed. So looks like I
can't destruct my object after allocating. Strictly speaking, I don't
have to. The need shouldn't arise in normal situation. I just considered
writing allocating/deallocating function pairs and processing all
allocation errors to be a good practice.
Isn't it a bit strange to have rte_hash_free() and not have
rte_ring_free()? What's the reason for this?
Best wishes,
Dmitry
More information about the dev
mailing list