From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro Date: Thu, 17 Apr 2014 06:59:11 -0400 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 Cc: dev-VfR2kkLFssw@public.gmane.org To: Olivier MATZ Return-path: Content-Disposition: inline In-Reply-To: <534F8BFD.6070701-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 > >