From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v5 2/2] test: migrate custom handler test to stack handler Date: Fri, 1 Jul 2016 09:32:47 +0200 Message-ID: References: <1467272502-56059-1-git-send-email-david.hunt@intel.com> <1467309909-123881-1-git-send-email-david.hunt@intel.com> <1467309909-123881-3-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: viktorin@rehivetech.com, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com To: David Hunt , dev@dpdk.org Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 7B5F32BB5 for ; Fri, 1 Jul 2016 09:32:57 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id r201so16591615wme.1 for ; Fri, 01 Jul 2016 00:32:57 -0700 (PDT) In-Reply-To: <1467309909-123881-3-git-send-email-david.hunt@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > [...] > > -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.