From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id ECCA4234 for ; Wed, 3 Jun 2015 21:43:25 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 03 Jun 2015 12:43:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,548,1427785200"; d="scan'208";a="704835655" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga001.jf.intel.com with ESMTP; 03 Jun 2015 12:43:25 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 3 Jun 2015 12:43:24 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by ORSMSX116.amr.corp.intel.com (10.22.240.14) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 3 Jun 2015 12:43:24 -0700 Received: from fmsmsx113.amr.corp.intel.com ([169.254.13.213]) by FMSMSX109.amr.corp.intel.com ([169.254.15.155]) with mapi id 14.03.0224.002; Wed, 3 Jun 2015 12:43:22 -0700 From: "Wiles, Keith" To: Thomas Monjalon , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH] eal:Add new API for parsing args at rte_eal_init time Thread-Index: AQHQnjMZZ272vAPTfECCM7FSXn3bVp2bUDaA Date: Wed, 3 Jun 2015 19:43:21 +0000 Message-ID: References: <1433357393-54434-1-git-send-email-keith.wiles@intel.com> <3638515.Z9q363AFg3@xps13> In-Reply-To: <3638515.Z9q363AFg3@xps13> 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 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: Wed, 03 Jun 2015 19:43:26 -0000 On 6/3/15, 2:24 PM, "Thomas Monjalon" wrote: >Hi Keith, > >2015-06-03 13:49, Keith Wiles: >> Signed-off-by: Keith Wiles >> --- >> lib/librte_eal/bsdapp/eal/eal.c | 20 ++++++++++++++++++++ >> lib/librte_eal/common/include/rte_eal.h | 32 >>++++++++++++++++++++++++++++++++ >> 2 files changed, 52 insertions(+) > >These comments would be useful: >As a RFC patch, it is not complete yet. >This new API may be used for . I was going to add this to the real patch: The new API is to reduce some of the clutter in the applications. Most of the applications need to do the following: int ret =3D rte_eal_init(argc, argv); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "rte_eal_init: failed!"); argc -=3D ret; argv +=3D ret; ret =3D parse_args(argc, argv); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "parse_args:failed!"); With this new API: int ret =3D rte_eal_init_parse(argc, argv, parse_args); if ( ret < 0 ) rte_exit(EXIT_FAILURE, "rte_eal_init_parse: Failed!"); >