Thread (48 messages) 48 messages, 7 authors, 2016-07-01

Re: [PATCH v5 2/2] test: migrate custom handler test to stack handler

From: Olivier MATZ <hidden>
Date: 2016-07-01 07:32:57

Hi David,

On 06/30/2016 08:05 PM, David Hunt wrote:
quoted hunk ↗ jump to hunk
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 <redacted>

[...]

-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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help