From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time Date: Wed, 3 Jun 2015 17:12:55 -0700 Message-ID: <20150603171255.545e0df8@urahara> References: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Keith Wiles Return-path: Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) by dpdk.org (Postfix) with ESMTP id 53D415A8B for ; Thu, 4 Jun 2015 02:12:54 +0200 (CEST) Received: by qkoo18 with SMTP id o18so15702061qko.1 for ; Wed, 03 Jun 2015 17:12:53 -0700 (PDT) In-Reply-To: <1433357393-54434-1-git-send-email-keith.wiles@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" On Wed, 3 Jun 2015 13:49:53 -0500 Keith Wiles wrote: > +/* Launch threads, called at application init() and parse app args. */ > +int > +rte_eal_init_parse(int argc, char **argv, > + int (*parse)(int, char **)) > +{ > + int ret; > + > + ret = rte_eal_init(argc, argv); > + if ((ret >= 0) && (parse != NULL)) { > + argc -= ret; > + argv += ret; This won't work C is call by value.