From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2 13/15] devargs: pass busname argument when parsing Date: Mon, 4 Sep 2017 17:28:54 +0100 Message-ID: <982bf0ae-5f5f-27e5-833c-e15c89e2fc0f@intel.com> References: <20170711232512.54641-1-jblunck@infradead.org> <20170714211213.34436-1-jblunck@infradead.org> <20170714211213.34436-14-jblunck@infradead.org> <20170715144837.GN11154@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org To: =?UTF-8?Q?Ga=c3=abtan_Rivet?= , Jan Blunck Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EC8B07D36 for ; Mon, 4 Sep 2017 18:28:58 +0200 (CEST) In-Reply-To: <20170715144837.GN11154@bidouze.vm.6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 7/15/2017 3:48 PM, Gaƫtan Rivet wrote: > On Fri, Jul 14, 2017 at 05:12:11PM -0400, Jan Blunck wrote: >> Let the rte_eal_devargs_parse() function explicitly take a "busname" >> argument that is validated. >> >> Now that the busname is known and validated at parse time the validity of >> the device name is checked for all device types when they get probed. >> > > What use is there for a parsing API if the fields have already been > recognized? Why would someone need to parse an rte_devargs if they already > know the busname from the devname? This function becomes useless. rte_eal_devargs_parse() converts devargs_string to the devargs struct, this usage is still valid. Getting busname as argument to this function looks good simplification to me, I didn't get the problem here. > > You are applying here the same logic you used with the rte_dev API, > where you divided the fields because it made no sense to have them > merged. > > However, the rte_dev API is not in contact with users / applications, it > is not the interface with the outside world where it must take in external > inputs and format them for subsequent systems to use. > >> Signed-off-by: Jan Blunck <...>