From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <declan.doherty@intel.com>
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by dpdk.org (Postfix) with ESMTP id CC69D1B138
 for <dev@dpdk.org>; Thu,  4 Oct 2018 11:44:48 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 04 Oct 2018 02:44:47 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.54,338,1534834800"; d="scan'208";a="89095945"
Received: from dwdohert-mobl.ger.corp.intel.com (HELO [10.252.24.253])
 ([10.252.24.253])
 by orsmga003.jf.intel.com with ESMTP; 04 Oct 2018 02:44:46 -0700
To: Thomas Monjalon <thomas@monjalon.net>, dev@dpdk.org
Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com, qi.z.zhang@intel.com,
 ferruh.yigit@intel.com
References: <20180907230958.21402-1-thomas@monjalon.net>
 <20180928164039.2380-1-thomas@monjalon.net>
 <20180928164039.2380-4-thomas@monjalon.net>
From: "Doherty, Declan" <declan.doherty@intel.com>
Message-ID: <283f0f5d-7ca1-6e8e-cccb-f922e175157a@intel.com>
Date: Thu, 4 Oct 2018 10:44:45 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <20180928164039.2380-4-thomas@monjalon.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH v2 3/3] eal: allow probing a device again
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Oct 2018 09:44:49 -0000

On 28/09/2018 5:40 PM, Thomas Monjalon wrote:
> In the devargs syntax for device representors, it is possible to add
> several devices at once: -w dbdf,representor=[0-3]
> It will become a more frequent case when introducing wildcards
> and ranges in the new devargs syntax.
> 
> If a devargs string is provided for probing, and updated with a bigger
> range for a new probing, then we do not want it to fail because
> part of this range was already probed previously.
> There can be new ports to create from an existing rte_device.
> 
> That's why the checks for an already probed device
> are moved as PMD responsibility.
> Only the PMD knows the ports attached to one rte_device.
> 
> In the case of vdev, a global check is kept in insert_vdev(),
> assuming that a vdev will always have only one port.
> In the case of NXP buses, the probing is done only once (no hotplug),
> though a check is added at bus level for consistency.
> 
> As another consequence of being able to probe in several steps,
> the field rte_device.devargs must not be considered as a full
> representation of the rte_device, but only the latest probing args.
> Anyway, the field rte_device.devargs is used only for probing.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
...
> 

Hey Thomas, did you consider of adding a driver flags to the rte_driver 
structure which has a driver re-probe flag. If this flag is disabled by 
default, current drivers could be left unmodified and any new driver 
which want to support re-probing enable this flag and then support the 
functionality in there probe function. Then we could check this flag in 
the bus driver on making a call on whether to re-probe.

Declan