From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id EC8B07D36
 for <dev@dpdk.org>; Mon,  4 Sep 2017 18:28:58 +0200 (CEST)
Received: from orsmga004.jf.intel.com ([10.7.209.38])
 by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 04 Sep 2017 09:28:57 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.41,475,1498546800"; d="scan'208";a="125450676"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57])
 ([10.237.220.57])
 by orsmga004.jf.intel.com with ESMTP; 04 Sep 2017 09:28:55 -0700
To: =?UTF-8?Q?Ga=c3=abtan_Rivet?= <gaetan.rivet@6wind.com>,
 Jan Blunck <jblunck@infradead.org>
Cc: dev@dpdk.org
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>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <982bf0ae-5f5f-27e5-833c-e15c89e2fc0f@intel.com>
Date: Mon, 4 Sep 2017 17:28:54 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170715144837.GN11154@bidouze.vm.6wind.com>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] [PATCH v2 13/15] devargs: pass busname argument when
 parsing
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Sep 2017 16:28:59 -0000

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 <jblunck@infradead.org>

<...>