From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aRdO1-0000a7-9N; Fri, 05 Feb 2016 11:13:10 +0100 To: David Hunt , dev@dpdk.org References: <1453829155-1366-1-git-send-email-david.hunt@intel.com> <1453829155-1366-6-git-send-email-david.hunt@intel.com> From: Olivier MATZ X-Enigmail-Draft-Status: N1110 Message-ID: <56B47562.5030204@6wind.com> Date: Fri, 5 Feb 2016 11:11:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 MIME-Version: 1.0 In-Reply-To: <1453829155-1366-6-git-send-email-david.hunt@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 5/5] mempool: allow rte_pktmbuf_pool_create switch between memool handlers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2016 10:11:54 -0000 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