From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 5/5] mempool: allow rte_pktmbuf_pool_create switch between memool handlers Date: Fri, 5 Feb 2016 11:11:46 +0100 Message-ID: <56B47562.5030204@6wind.com> References: <1453829155-1366-1-git-send-email-david.hunt@intel.com> <1453829155-1366-6-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: David Hunt , dev@dpdk.org Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id DBC79C136 for ; Fri, 5 Feb 2016 11:11:53 +0100 (CET) In-Reply-To: <1453829155-1366-6-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 01/26/2016 06:25 PM, David Hunt wrote: > if the user wants to have rte_pktmbuf_pool_create() use an external mempool > handler, they simply define MEMPOOL_HANDLER_NAME to be the name of the > mempool handler they wish to use. May move this to config I agree it could move to configuration. > > Signed-off-by: David Hunt > --- > lib/librte_mbuf/rte_mbuf.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c > index c18b438..362396e 100644 > --- a/lib/librte_mbuf/rte_mbuf.c > +++ b/lib/librte_mbuf/rte_mbuf.c > @@ -167,10 +167,21 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, > mbp_priv.mbuf_data_room_size = data_room_size; > mbp_priv.mbuf_priv_size = priv_size; > > +/* #define MEMPOOL_HANDLER_NAME "custom_handler" */ > +#undef MEMPOOL_HANDLER_NAME > + > +#ifndef MEMPOOL_HANDLER_NAME > return rte_mempool_create(name, n, elt_size, > cache_size, sizeof(struct rte_pktmbuf_pool_private), > rte_pktmbuf_pool_init, &mbp_priv, rte_pktmbuf_init, NULL, > socket_id, 0); > +#else > + return rte_mempool_create_ext(name, n, elt_size, > + cache_size, sizeof(struct rte_pktmbuf_pool_private), > + rte_pktmbuf_pool_init, &mbp_priv, rte_pktmbuf_init, NULL, > + socket_id, 0, > + MEMPOOL_HANDLER_NAME); > +#endif > } Is it possible to always use rte_mempool_create_ext(), and set the default handler name to 'ring_mp_mc'? After checking in rte_mempool_create(), I found the behavior is different when using xen. Do you know if xen still works with your patches? Regards, Olivier