From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wiles, Keith" Subject: Re: [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time Date: Thu, 4 Jun 2015 11:50:33 +0000 Message-ID: References: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> <20150603171255.545e0df8@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Stephen Hemminger Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AF4B6B3D6 for ; Thu, 4 Jun 2015 13:50:47 +0200 (CEST) In-Reply-To: <20150603171255.545e0df8@urahara> Content-Language: en-US Content-ID: 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 Stephen On 6/3/15, 7:12 PM, "Stephen Hemminger" wrote: >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 =3D rte_eal_init(argc, argv); >> + if ((ret >=3D 0) && (parse !=3D NULL)) { >> + argc -=3D ret; >> + argv +=3D ret; > >This won't work C is call by value. I tested this routine with Pktgen (again), which has a number of application options and it appears to work correctly. Can you explain why this will not work? Regards, ++Keith >