[dpdk-dev,v2] mempool: fix lack of free registration

Message ID 1469034842-2580-1-git-send-email-zoltan.kiss@schaman.hu (mailing list archive)
State Accepted, archived
Headers

Commit Message

Zoltan Kiss July 20, 2016, 5:14 p.m. UTC
  The new mempool handler interface forgets to register the free() function
of the ops. Introduced in this patch:

Fixes: 449c49b93a6b ("mempool: support handler operations")

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---

Notes:
    v2: fix commit message

 lib/librte_mempool/rte_mempool_ops.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Thomas Monjalon July 21, 2016, 9:04 p.m. UTC | #1
2016-07-20 18:14, Zoltan Kiss:
> The new mempool handler interface forgets to register the free() function
> of the ops. Introduced in this patch:
> 
> Fixes: 449c49b93a6b ("mempool: support handler operations")
> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_mempool/rte_mempool_ops.c b/lib/librte_mempool/rte_mempool_ops.c
index fd0b64c..5f24de2 100644
--- a/lib/librte_mempool/rte_mempool_ops.c
+++ b/lib/librte_mempool/rte_mempool_ops.c
@@ -81,6 +81,7 @@  rte_mempool_register_ops(const struct rte_mempool_ops *h)
 	ops = &rte_mempool_ops_table.ops[ops_index];
 	snprintf(ops->name, sizeof(ops->name), "%s", h->name);
 	ops->alloc = h->alloc;
+	ops->free = h->free;
 	ops->enqueue = h->enqueue;
 	ops->dequeue = h->dequeue;
 	ops->get_count = h->get_count;