From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00040.outbound.protection.outlook.com [40.107.0.40]) by dpdk.org (Postfix) with ESMTP id 30AB61B51B for ; Wed, 11 Jul 2018 13:46:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m0YYRlSQYfzVn5uDHob23BYb+9hchujg+j8frhaKKGs=; b=w+4aJMceHNUKg/VLY5QK/1AkVvqNDams3dtb0O1blsgef6qgYn+fBFgE1arkRnZwBNX6aGJCQUndjdcmrKUrhtPwlylKZMGiKbVUTRoFxJKysmJK31wDwRDydYnrtjojX/I35TiYkHSU28JG6Y5SwPh8ejZlEst5qXgbdz3R5tA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by AM0PR04MB4675.eurprd04.prod.outlook.com (2603:10a6:208:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.21; Wed, 11 Jul 2018 11:46:38 +0000 To: Gaetan Rivet References: <4dd95d07b484a671a2be5d65ad12a4212093ada8.1530791217.git.gaetan.rivet@6wind.com> Cc: dev@dpdk.org From: Shreyansh Jain Message-ID: Date: Wed, 11 Jul 2018 17:16:15 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <4dd95d07b484a671a2be5d65ad12a4212093ada8.1530791217.git.gaetan.rivet@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BMXPR01CA0034.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::20) To AM0PR04MB4675.eurprd04.prod.outlook.com (2603:10a6:208:75::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8fc6fa9-3fc8-4235-ddbe-08d5e723f6e7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4675; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4675; 3:pxVhS7EMMi5PwexA6AcxkGrqro84BtyRhkyqop3AP09Cbbcutqr9/PhvonY6z03yGYvlMUKVJTz9SHJ7+KHAm4zfA9Fw/ziK3ZLcC1RBXx1NyNk2xaq3ibBV70u0IddB9EuTjGPfDTtBiTjhta8evsqolUdj0Eyr7UxzP3qtlFXZQbNEmD3kmslVHQ2c6/hueYFhjWF/MA7CI4GTsX/sRZfAy1uMzZBond/+vBgwxzZr843A/5jDHG80JVuqGLAM; 25:qopnOInMLy5IXJ5IIuF+px5PtofN51KQrB/1PB9+L1zQlSs/wHJ3ADq+RhIWLehhtuCUu+3Vc9vlT1NV36krqzQ2+W5EVjfVxm5cufsK2iHF0vdcKRm5WudJasI3uPpIck0aiAtOoWm9qbwkuq26c4+fBsEw4Hi4tH2vjTWaiLi+aB49BzX3KD9RPFUOvfhR09qMp2mf5kNL9Sa7Q8ABpq4KRvWR6LAPSwRRjabk2oUzLq2CNCALk9iHxeIobEVrTWsqzbKW/SQmwPVsBPnN7R4HudnHlWJbq8/5+wR+3OtPS0xcSBOCojZFohi9rr77/wQC0ZmLpirRgd2pOzytiA==; 31:q/sCC9arXfNPrMQv2B7ZhHQpMvBB6QgVJf7rlz6+WaAZ3+4qAxkJEPZwAMMd1M/Lz3vfv60pVW3sZGrxokHnFRnh1hfBZExwqb2K8tMBEFNFM+Yx3SJWHY+5k0mb3o6yUPl8Fh6GLMXmAJZ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117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR04MB4675; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4675; X-Forefront-PRVS: 0730093765 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(366004)(376002)(39860400002)(396003)(346002)(136003)(189003)(199004)(76176011)(31696002)(26005)(2906002)(67846002)(305945005)(6116002)(7736002)(50466002)(478600001)(68736007)(6666003)(5660300001)(65826007)(97736004)(66066001)(65956001)(8676002)(81156014)(25786009)(81166006)(65806001)(8936002)(230700001)(5009440100003)(3846002)(47776003)(956004)(52146003)(486006)(446003)(2486003)(23676004)(77096007)(106356001)(53936002)(105586002)(31686004)(44832011)(6916009)(36756003)(186003)(16526019)(6486002)(16576012)(229853002)(55236004)(64126003)(86362001)(58126008)(11346002)(52116002)(476003)(316002)(386003)(2616005)(6246003)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4675; H:[10.232.14.39]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTBQUjA0TUI0Njc1OzIzOjk3dDRsa2gxeUdjcGNqb2F2NlM3VzZIUk1W?= =?utf-8?B?NmpRWkU1K1pNVWFyMXB0WTRWMHowSXh3Yzd0VGZOZWZwazI5SVZNK0Q1QkR1?= =?utf-8?B?emp5TTZSRUxaYnpCbG5PU1h5blExbWNsRTFwcXNJTlFyRk1yN2g4Nkoxc2N5?= =?utf-8?B?RGcx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Zvo+QNhufKuFdbGOqwVaY4w5XxYer5U+4Jp1AZB0fwd4aFwteicZLpDGrKI6tQhNDl76i3tS8HHr2BB5kzWOFme0fotKcRpZUlkIkfylOXwMYPibhCEkZyQvEBt7RLe6vwkwZ5WPNr4k=; 24:QMMPDOOCYOuI9CDpncDVUGX8kdN6Um0KIKQL3hWGv0dIOvKIfvbYoCSkKSiqZmEA9esx2c8igTow8CD54KvCTOTX+S+E7FNPhexktslkrVY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4675; 7:wwzvHoJrwCdUdgLosbCtCO5FSAGPXrM5pSgnnCLYYRntCTw6bqv3Bc1zUII+T2zpTMx6vX0No58j4w6XhpWlLVl1ul775889bo661AmjIQEWC4gzY1D+HMY3tdRCZkBnL83dvDe+DUy3jQPqpAre2nE4zDyAdJZLjEjDWNTMK/j3coeWKlBkRw+oqM8WswQXne9QOat//2TlpLRLFnwa4Q7HIQNQthjhy+HFVtj5tAretgybAX5e6ptzb6L9KrzP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2018 11:46:38.9118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8fc6fa9-3fc8-4235-ddbe-08d5e723f6e7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4675 Subject: Re: [dpdk-dev] [PATCH v10 01/27] devargs: add non-variadic parsing function 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: , X-List-Received-Date: Wed, 11 Jul 2018 11:46:46 -0000 On Thursday 05 July 2018 05:18 PM, Gaetan Rivet wrote: > rte_devargs_parse becomes non-variadic, > rte_devargs_parsef becomes the variadic version, to be used to compose > device strings. > > Signed-off-by: Gaetan Rivet > --- > drivers/net/failsafe/failsafe_args.c | 2 +- > drivers/net/failsafe/failsafe_eal.c | 2 +- > lib/librte_eal/common/eal_common_dev.c | 4 +- > lib/librte_eal/common/eal_common_devargs.c | 42 ++++++++++++++++----- > lib/librte_eal/common/include/rte_devargs.h | 40 +++++++++++++++++++- > lib/librte_eal/rte_eal_version.map | 1 + > lib/librte_ethdev/rte_ethdev.c | 2 +- > 7 files changed, 76 insertions(+), 17 deletions(-) > [...] > +__rte_experimental > +int > +rte_devargs_parsef(struct rte_devargs *da, const char *format, ...) > +{ > + va_list ap; > + size_t len; > + char *dev; > + > + if (da == NULL) > + return -EINVAL; > + > + va_start(ap, format); > + len = vsnprintf(NULL, 0, format, ap); > + va_end(ap); > + > + dev = calloc(1, len + 1); > + if (dev == NULL) { > + fprintf(stderr, "ERROR: not enough memory to parse device\n"); Should RTE_LOG be used here? > + return -ENOMEM; > + } > + > + va_start(ap, format); > + vsnprintf(dev, len, format, ap); > + va_end(ap); > + > + return rte_devargs_parse(da, dev); > +} > + > int __rte_experimental > rte_devargs_insert(struct rte_devargs *da) > { [...] Except the comment above: Acked-by: Shreyansh Jain