[dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all whitelisted devices fail.
nitin.katiyar at ericsson.com
Thu Aug 29 05:47:02 CEST 2019
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Wednesday, August 28, 2019 1:43 AM
> To: Nitin Katiyar <nitin.katiyar at ericsson.com>
> Cc: dev at dpdk.org; Venkatesan Pradeep
> <venkatesan.pradeep at ericsson.com>
> Subject: Re: [dpdk-dev] [PATCH 1/2] bus/pci: Fail rte_pci_probe if probing all
> whitelisted devices fail.
> On Wed, 28 Aug 2019 01:00:16 +0530
> Nitin Katiyar <nitin.katiyar at ericsson.com> wrote:
> > Even if whitelist of devices is provided, rte_pci_probe() increments
> > the probed counter for all the devices present in the system. If probe
> > fails for all the whitelisted devices it still return success because
> > failed and probed counts don't match.
> > This patch increments probed count only when devices are actually
> > probed.
> > Signed-off-by: Nitin Katiyar <nitin.katiyar at ericsson.com>
> > Signed-off-by: Venkatesan Pradeep <venkatesan.pradeep at ericsson.com>
> There are two differing interpretations of this.
> The simple case which is what your patch fixes is where user gives bad
> arguments and no devices are present.
> But the more complex case is where the devices show up later via hotplug or
> other discovery mechanism. For example, on Hyper-V/Azure SRIOV PCI
> devices can show up after application is started. Your patch might break the
> use case of where an application is started before the VF is available.
> More detailed example:
> 1. VM is started.
> 2. VF is take offline for maintenance or migration.
> 3. DPDK application is started with whitelist option (no usable PCI found).
> 4. VF becomes available after maintenance.
> Yes, this a somewhat made up order which is unlikely to happen in real life.
> But there is nothing stopping it from happening.
> I often recommend to customers using whitelist because the typical appliance
> scenario has a management interface, and you don't want the DPDK
> interacting with the VF of the management interface.
> Therefore, from my point of view, this patch is a NO.
Thanks for your comments. I am sorry I couldn't understand the scenario you mentioned.
If we are not probing the device then why should we be incrementing the probed counter. If current implementation doesn't handle the scenario where all the devices in concern failed in probe (as per the whitelist) and code fails to catch that case. Application like OVS using DPDK comes up successfully although it doesn't have any physical device in usable state.
More information about the dev