From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [dpdk-dev,v5,1/3] mempool: support external handler Date: Tue, 31 May 2016 22:40:59 +0200 Message-ID: <574DF6DB.4050905@6wind.com> References: <1463665501-18325-2-git-send-email-david.hunt@intel.com> <20160523143511.7d30699b@pcviktorin.fit.vutbr.cz> <574D54D6.1080409@intel.com> <20160531140652.018a03de@pcviktorin.fit.vutbr.cz> <574D95E9.4020504@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, yuanhan.liu@linux.intel.com, pmatilai@redhat.com, jerin.jacob@caviumnetworks.com To: "Hunt, David" , Jan Viktorin Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id F274838EB for ; Tue, 31 May 2016 22:41:00 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id n184so868908wmn.1 for ; Tue, 31 May 2016 13:41:00 -0700 (PDT) In-Reply-To: <574D95E9.4020504@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, On 05/31/2016 03:47 PM, Hunt, David wrote: > On 5/31/2016 1:06 PM, Jan Viktorin wrote: >> On Tue, 31 May 2016 10:09:42 +0100 >> "Hunt, David" wrote: >> >>> The *p pointer is the opaque data for a given mempool handler (ring, >>> array, linked list, etc) >> Again, doc comments... >> >> I don't like the obj_table representation to be an array of void *. I >> could see >> it already in DPDK for defining Ethernet driver queues, so, it's >> probably not >> an issue. I just say, I would prefer some basic type safety like >> >> struct rte_mempool_obj { >> void *p; >> }; >> >> Is there somebody with different opinions? >> >> [...] > > Comments added. I've left as a void* for the moment. Jan, could you please detail why you think having a rte_mempool_obj structure brings more safety? For now, I'm in favor of keeping the array of void *, because that's what we use in other mempool or ring functions. >>>>> +/** Structure defining a mempool handler. */ >>>> Later in the text, I suggested to rename rte_mempool_handler to >>>> rte_mempool_ops. >>>> I believe that it explains the purpose of this struct better. It >>>> would improve >>>> consistency in function names (the *_ext_* mark is very strange and >>>> inconsistent). >>> I agree. I've gone through all the code and renamed to >>> rte_mempool_handler_ops. >> Ok. I meant rte_mempool_ops because I find the word "handler" to be >> redundant. > > I prefer the use of the word handler, unless others also have opinions > either way? Well, I think rte_mempool_ops is clear enough, and shorter, so I'd vote for it. Regards, Olivier