[dpdk-dev] mempool: fix lack of free() registration

Message ID 1468939061-19734-1-git-send-email-zoltan.kiss@schaman.hu (mailing list archive)
State Superseded, archived
Headers

Commit Message

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

449c49b9 mempool: support handler operations

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
---
 lib/librte_mempool/rte_mempool_ops.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Olivier Matz July 19, 2016, 3:26 p.m. UTC | #1
Hi Zoltan,

I ran ./scripts/check-git-log.sh on your patch, showing some minor
styling issues:

On 07/19/2016 04:37 PM, Zoltan Kiss wrote:
> [PATCH] mempool: fix lack of free() registration

"()" should be removed

> The new mempool handler interface forgets to register the free() function
> of the ops. Introduced in this patch:
> 
> 449c49b9 mempool: support handler operations

The format should be:
Fixes: 449c49b93a6b ("mempool: support handler operations")


> 
> Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
> ---
>  lib/librte_mempool/rte_mempool_ops.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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;
> 

Apart from that:
Acked-by: Olivier Matz <olivier.matz@6wind.com>

+CC Thomas, I think it should be included in 16.07.

Thanks!
  
Zoltan Kiss July 19, 2016, 4:17 p.m. UTC | #2
On 19/07/16 16:26, Olivier Matz wrote:
> Hi Zoltan,
>
> I ran ./scripts/check-git-log.sh on your patch, showing some minor
> styling issues:

Thanks, do you want me to resend it, or could Thomas fix them upon 
commiting?

>
> On 07/19/2016 04:37 PM, Zoltan Kiss wrote:
>> [PATCH] mempool: fix lack of free() registration
>
> "()" should be removed
>
>> The new mempool handler interface forgets to register the free() function
>> of the ops. Introduced in this patch:
>>
>> 449c49b9 mempool: support handler operations
>
> The format should be:
> Fixes: 449c49b93a6b ("mempool: support handler operations")
>
>
>>
>> Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>
>> ---
>>   lib/librte_mempool/rte_mempool_ops.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> 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;
>>
>
> Apart from that:
> Acked-by: Olivier Matz <olivier.matz@6wind.com>
>
> +CC Thomas, I think it should be included in 16.07.
>
> 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;