From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 04 Jun 2015 04:50:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,552,1427785200"; d="scan'208";a="502664288" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by FMSMGA003.fm.intel.com with ESMTP; 04 Jun 2015 04:50:46 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 4 Jun 2015 04:50:37 -0700 Received: from fmsmsx108.amr.corp.intel.com (10.18.124.206) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 4 Jun 2015 04:50:34 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.213]) by FMSMSX108.amr.corp.intel.com ([10.18.124.206]) with mapi id 14.03.0224.002; Thu, 4 Jun 2015 04:50:33 -0700 From: "Wiles, Keith" To: Stephen Hemminger Thread-Topic: [dpdk-dev] [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time Thread-Index: AQHQnltA/wkwK4V9H0iqXqFk9uBgcZ2cXhyA 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> In-Reply-To: <20150603171255.545e0df8@urahara> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.134.161] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" 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: Thu, 04 Jun 2015 11:50:48 -0000 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 >