[dpdk-dev] [dpdk-stable] [PATCH 1/2] bus/pci: fix driver detach clear

Thomas Monjalon thomas at monjalon.net
Tue Nov 19 23:40:21 CET 2019


12/11/2019 09:47, Matan Azrad:
> When a rte_device is unplugged, the driver should be detached from the
> device.

Yes

> The PCI detach driver operation wrongly didn't clear the driver from the
> device structure what remain the device in probe state from the EAL
> point of view.

Are you aware of an use case which is broken because of that?


> --- a/drivers/bus/pci/pci_common.c
> +++ b/drivers/bus/pci/pci_common.c
> @@ -247,6 +247,7 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)

The git context above is wrong, it should show the function rte_pci_detach_dev.

>  	/* clear driver structure */
>  	dev->driver = NULL;
> +	dev->device.driver = NULL;

It looks a good fix.
Acked-by: Thomas Monjalon <thomas at monjalon.net>

I am wondering if there could be a risk for any test application
if applied in 19.11-rc3.
I think we should try to get it and revert if a side effect is discovered.




More information about the dev mailing list