From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id 89683E72 for ; Fri, 5 Jun 2015 08:01:30 +0200 (CEST) Received: from [10.100.1.152] (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Fri, 05 Jun 2015 08:01:19 +0200 Message-ID: <55713B30.8030000@netinsight.net> Date: Fri, 05 Jun 2015 08:01:20 +0200 From: =?windows-1252?Q?Simon_K=E5gstr=F6m?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: dev@dpdk.org References: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> <20150603171255.545e0df8@urahara> <20150604135542.GC24585@hmsreliant.think-freely.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time 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 Jun 2015 06:01:30 -0000 On 2015-06-04 23:27, Chilikin, Andrey wrote: >> Its not a bad addition, I'm just not sure its worth having to take on the >> additional API surface to include. I'd be more supportive if you could enhance >> the function to allow the previously mentioned before/after flexibiilty. Then we >> could just deprecate rte_eal_init as an API call entirely, and use this instead. > > Before/after would be very useful, a lot of applications use only "-c" and "-n" EAL command line parameters and "-c" in many cases is redundant as application can calculate core mask from its own parameters, and "-n" just a required parameter which can be defaulted to a platform specific value. So in addition to rte_set_application_usage_hook() it would be nice to have some more general way of overwriting eal initialization parameters. I've always found it a bit strange that DPDK forces argv handling this way. The application will anyway have to setup system-specific stuff (buffer count etc) for the ports to use, so special-casing memory and core setup seems strange. I think it would be more logical to have EAL configuration from a structure like for the ports: struct dpdk_conf conf = { .core_mask = 0x7, .huge_pages = 1, [...] }; rte_eal_init(&conf); And make the current argv parser optional, i.e., something like int main(argc, argv) { struct dpdk_conf conf; ret = rte_eal_parse_argv(&conf); rte_eal_init(&conf); argc -= ret; ... } // Simon