[dpdk-dev] [PATCH v5 2/2] test: migrate custom handler test to stack handler
Olivier MATZ
olivier.matz at 6wind.com
Fri Jul 1 09:32:47 CEST 2016
Hi David,
On 06/30/2016 08:05 PM, David Hunt wrote:
> After introducing the stack handler in the previous commit,
> we now have very similar code to the custom handler in test_mempool.c,
> which creates a custom mempool based on simple mallocs.
> The stack handler is a cleaner example of adding a new mempool handler,
> so this commit replaces the custom handler test with a stack
> handler test, and removes the custom handler code.
>
> Signed-off-by: David Hunt <david.hunt at intel.com>
>
> [...]
>
> -static struct rte_mempool_ops mempool_ops_custom = {
> - .name = "custom_handler",
> - .alloc = custom_mempool_alloc,
> - .free = custom_mempool_free,
> - .enqueue = custom_mempool_enqueue,
> - .dequeue = custom_mempool_dequeue,
> - .get_count = custom_mempool_get_count,
> -};
> -
> -MEMPOOL_REGISTER_OPS(mempool_ops_custom);
> -
> -/*
> * save the object number in the first 4 bytes of object data. All
> * other bytes are set to 0.
> */
> @@ -600,6 +507,7 @@ test_mempool(void)
> struct rte_mempool *mp_cache = NULL;
> struct rte_mempool *mp_nocache = NULL;
> struct rte_mempool *mp_ext = NULL;
mp_ext remains but is unused (it is just freed below).
It should be removed.
More information about the dev
mailing list