From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5CD9A0524; Fri, 31 Jan 2020 12:25:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D8331C0C3; Fri, 31 Jan 2020 12:25:38 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4ACE91C0C0 for ; Fri, 31 Jan 2020 12:25:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2020 03:25:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,385,1574150400"; d="scan'208";a="402630018" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 31 Jan 2020 03:25:29 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 31 Jan 2020 03:25:28 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 31 Jan 2020 03:25:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HPoaObdNF3W7G8OYzxRllP/Yw3irev6pRM+z8jcD/BB7hygrjA4wVtSa1ZZkbhIabSEmlZ8ZbMWrOxJZuKZ0HDs6LtjONxsl08hfPAIxLgTefROwz1d7LCLHER+LGQXinwBGdAfCmOhm9NNJ6WyqXvhBzGhsJZ6ICCVxuouqMLt73poza1wA4PnHTvDu01xJ9k+NtKUaD371HPP3Vks2iDfLx9uY+OjIHQgLVppCINtnQnQwWjl23O91vDKLjoaWItNIbw2l5qSWTg7I9oAnbc79wRGPkU42XfO3r3ikj2z7S31SKIfjvahdQhvGZM8DG+c+iDXJWng01QMHe0NqHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z+7dUhmNCtNTQtdG2oC4ZQ/2BOxOKxPX2DGYUO4HpMs=; b=Bhj2i2aUBvNCoW/23M7HsH2RwvafKFXaLYc48jkJjtxaoagbuFIzagODC1kq/jUS5sV/r8C4ghgw0WsZS7XqVE8BPlIWlAf6RXbl5epKePDOB0FzeP+oPuW3aqx1FO89eP+WO/TLAprekI1+Le7jdiMrPOOYBcaTvmyjzxVebX5tZhoaGUjWEOSbKGV5ABQyx1IvRVDlbQ+hDgTIIrqGgWtIWJK3nW4NyVowAG1BraUj57zXbRbYYktQhbFBYQj/7LZXvgx6YhCQSzbHDXfJwAqg8+rFvd6NZRjS/7mQgcyx6JZsikpYjTufCJqy/yUmjPExhgwApwCJjw0i5AeKUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z+7dUhmNCtNTQtdG2oC4ZQ/2BOxOKxPX2DGYUO4HpMs=; b=oCMuPOf9aUVGhAr07gn26038c8p6nw/JohhgnUTlT/9FhjsudRfxsF0i/8uamU8mvJ4cDPvMfd8qvY9e0cXP55XWQC3LwtMMe4NrC3vkeja459swo8D1TWw9xgUIpdiseLX7eKsv8lDSAga+ZdALLK7wzoORtIdsTEsljIAulcE= Received: from BYAPR11MB2648.namprd11.prod.outlook.com (52.135.227.138) by BYAPR11MB3783.namprd11.prod.outlook.com (20.178.236.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.26; Fri, 31 Jan 2020 11:25:13 +0000 Received: from BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::d0d2:ce29:adf5:f6a5]) by BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::d0d2:ce29:adf5:f6a5%7]) with mapi id 15.20.2686.028; Fri, 31 Jan 2020 11:25:13 +0000 From: "Govindharajan, Hariprasad" To: Stephen Hemminger , "Yigit, Ferruh" CC: David Marchand , Thomas Monjalon , dev Thread-Topic: [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse user input Thread-Index: AQHV1Pz+gQkO02bgcUqui3kv9lbPTKgAWKUAgAGU9ICAAAZAgIAAFESAgAKfENA= Date: Fri, 31 Jan 2020 11:25:13 +0000 Message-ID: References: <1580121053-26083-1-git-send-email-hariprasad.govindharajan@intel.com> <1580121053-26083-3-git-send-email-hariprasad.govindharajan@intel.com> <1689bec2-91f3-77cd-8604-f7123023b109@intel.com> <6e50daed-d368-215b-22da-fc7332ded22c@intel.com> <20200129111937.031a16a6@hermes.lan> In-Reply-To: <20200129111937.031a16a6@hermes.lan> Accept-Language: en-US Content-Language: en-US X-Mentions: stephen@networkplumber.org X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjI4YjM2MDEtYzA4Yi00M2NmLWFiZTAtYjA4N2YwZTk2NzZiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib0I1OWtzZjNCVUp1czQ0aThVcHl6WDVIRmdMSFRKY1JQdmhsK0JEcUdibEZpbGJyZ2MxOXh3OGFqYkE0aERYaCJ9 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=hariprasad.govindharajan@intel.com; x-originating-ip: [192.198.151.190] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee4e3704-23d1-4238-66f1-08d7a6403d68 x-ms-traffictypediagnostic: BYAPR11MB3783: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 029976C540 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(189003)(199004)(2906002)(5660300002)(33656002)(71200400001)(110136005)(54906003)(66446008)(66476007)(66556008)(64756008)(52536014)(66946007)(6636002)(76116006)(55016002)(9686003)(498600001)(53546011)(6506007)(86362001)(7696005)(186003)(81166006)(81156014)(4326008)(8676002)(26005)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR11MB3783; H:BYAPR11MB2648.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0R4RgumelkAs4ZxjxQy+74ldu8WkEHXhY/fawZjm+Xu4D1V8mtr7sX5jUjiGNil2FuDIPnLEArMUVD0ywei60p8KwQFgst6adpr0DdR19xoA4rCZxp9qaGbQLM+VvzfoD6rV6QinLn3wx/EoQfQv4mxpcm4jmmODPa+7cJy5YCgncRrTC5AEeJxs3DR+b6y6lZPMYalfs/7vg+N9hyL6sfbIj3xlHrYY6E6scz/6bVP6cayQBehBZttmQRp4IuUH4/tVteVDTCrwdaF8eP3yhLGgHP3yAWwOV259+0HFwI/MOOZA4XVzRb8p1AmX15Dfklp29wB58DvjIcgwFx49gELEe8FDVKUxQzizFygkM8B4tiPSrEMZEWbWsktNtd/7P+lO8gOPsqW4mhXCZgZpBnWKPAYki60LdTHziG8o2CrKO8x2GPqJAYzVt85gp3P2 x-ms-exchange-antispam-messagedata: pfX6sXSJ5dUjQfl5UlEgPIEpvXSkXnmxnIqxWyTuPKFMDS0bVU2AgkCpYogkHz4gXbHl6R/bb1BFH28JPE00mM0MdhoVngkB4C97u8rHr2vk0KVHYs0aVJmnlVbNHbjTf34oJJ6v4dWL8cTd0ztj9g== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ee4e3704-23d1-4238-66f1-08d7a6403d68 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2020 11:25:13.2975 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wXaEflTTL6UPk+7QEI4Vh2ZH7lzbkGcUwbAOay6zUqEw6lMpTJqlKOfEPL83HPHVgEp4/A3kV5+ftEUmhwQAc9HLbBnWCn4eIBYMInAlM6tKFb7Mo1ytsmByJJKP7ApI X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3783 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse user input X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, I am planning to move the existing parser function to the testpmd file inst= ead of keeping it in the eal and will revert the eal back. Also, I am planning to create an util file in eal with this parser and do a= RFC. @Stephen Hemminger, We already investigated the existing function and then = decided to re-use it as seen in the patch. For creating an API, is there an= y other specific requirements=20 that should be addressed? Please clarify us. Thanks G Hariprasad -----Original Message----- From: Stephen Hemminger =20 Sent: Wednesday, January 29, 2020 7:20 PM To: Yigit, Ferruh Cc: David Marchand ; Thomas Monjalon ; Govindharajan, Hariprasad ;= dev Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse = user input On Wed, 29 Jan 2020 18:07:05 +0000 Ferruh Yigit wrote: > On 1/29/2020 5:44 PM, David Marchand wrote: > > On Tue, Jan 28, 2020 at 6:35 PM Ferruh Yigit w= rote: =20 > >> On 1/27/2020 10:30 AM, Hariprasad Govindharajan wrote: =20 > >>> In current version, there is a function which parses the corelist=20 > >>> based on user value. A new generic function eal_parse_optionlist=20 > >>> is added which will parse corelist as well as similar user input=20 > >>> so that we can use it as a public API too. > >>> > >>> Signed-off-by: Hariprasad Govindharajan=20 > >>> > >> > >> Hi David, > >> > >> Overall this patchset is to add '--portlist' command to testpmd and=20 > >> remove existing 64 port limitation. > >> > >> And in this patch re-uses the exiting parser function in eal and=20 > >> converts it to API, question is if eal is good place to have this API,= what do you think about it? > >=20 > > Exporting string parsers from the EAL has little value. > > Ok we avoid code duplication (and I can see other places in the tree=20 > > where it might be used), but in the end we will have to maintain=20 > > this API in the ABI when it enters the stable ABI. > >=20 > > I am for avoiding this. > >=20 > > =20 >=20 > The same function can be used in some sample applications too (which=20 > are using port mask), so instead of duplicating it multiple times, it=20 > would be nice to have this function somewhere that applications can use. >=20 > Does it makes sense to have a rte_util.c (under in eal or as a=20 > separate library) to have this kind of application helper functions? It makes sense to have a rte library that handles arbitrary size bitvector = and has string handling functions. Kind of like what kernel has for the cpu= set parsing. This could be used for cpus in EAL and port-masks or other ar= rays in applications. But just doing copy/paste of existing code without thinking about how API s= hould work is a bad idea.