From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id E445B678B for ; Thu, 17 Apr 2014 12:59:15 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Wak2C-0007Bk-Q6; Thu, 17 Apr 2014 06:59:14 -0400 Date: Thu, 17 Apr 2014 06:59:11 -0400 From: Neil Horman To: Olivier MATZ Message-ID: <20140417105911.GC13715@hmsreliant.think-freely.org> References: <1397585169-14537-1-git-send-email-nhorman@tuxdriver.com> <1397585169-14537-4-git-send-email-nhorman@tuxdriver.com> <1462763.GWB5SR3fGh@xps13> <20140416130848.GC11887@localhost.localdomain> <534EABB4.9020301@6wind.com> <20140416172924.GE11887@localhost.localdomain> <534F8BFD.6070701@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <534F8BFD.6070701@6wind.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro 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: Thu, 17 Apr 2014 10:59:16 -0000 On Thu, Apr 17, 2014 at 10:08:29AM +0200, Olivier MATZ wrote: > Hi Neil, > > On 04/16/2014 07:29 PM, Neil Horman wrote: > >Ok, so look it up. DPDK is open source and cscope is easy to use. A > >module initilization macro is a common method for doing init time binding in > >modular programming (the best examples are the module_init() and module_exit() > >macros in the linux kernel). It wraps up what you need to do to tie a modular > >piece of your software into the larger main component, without having to know > >all the boilerplate behind it. > > > >Also, if you expose the use of the constructor, then you've > >broken out the initalization phase to every pmd you implement, and as a result, > >if you ever need to add code to the initilization step, you have to add it in > >every pmd, instead of just updating the macro. > > > >The bottom line is, your method is 5 lines of boilerplate code thats going to > >have to get repeated as nauseum for every pmd that gets written giving every PMD > >author the opportunity to miscode the constructor, vs my one line that, if it > >compiles, will be correct every time. > OK, some of your arguments are legitimate and it's a detail point of > your patches that are globally a nice improvement of the DPDK code. > > But I'd be happy to continue this discussion over a beer ;) > Sure, I'll be in dusseldorf for plumbers this october I think. Perfect place for a beer :) Neil > Regards, > Olivier > >