> -----Original Message-----
> From: Thomas Monjalon [mailto:tho...@monjalon.net]
> Sent: Wednesday, September 26, 2018 9:51 PM
> To: Zhang, Qi Z <qi.z.zh...@intel.com>
> Cc: dev@dpdk.org; Burakov, Anatoly <anatoly.bura...@intel.com>; Yigit,
> Ferruh <ferruh.yi...@intel.com>; geoffrey...@gmail.com;
> ajit.khapa...@broadcom.com; sta...@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix unexpected resource mapping
> override
> 
> Hi,
> 
> 03/09/2018 10:40, Qi Zhang:
> > When scanning an already plugged device, the virtual address of mapped
> > PCI resource in rte_pci_device will be overridden with 0, that may
> > cause driver does not work correctly.
> 
> Why is it overridden with 0?
> Can we try to fix the root cause?

>From my view this is place to fix the issue: "scan an already probed device 
>will corrupt the PCI resource map"
Another option is "to prevent scan an already probed device", this can be 
implemented by adding some check before bus->scan in rte_dev_hotplug_add but 
I'm not prefer for this solution, because it's better to keep bus->scan's 
independency.

> 
> > The fix is not to update any rte_pci_device's field if the being
> > scanned device's driver is already probed.
> 
> I am going to send a patch to have a safer way of checking whether a device is
> probed or not.
> If this change is really needed, I suggest to rebase it on top my patch.

OK, I will rebase on it by using rte_dev_is_probed.

Regards
Qi
> 

Reply via email to