[dpdk-dev] [PATCH v8 7/7] igb_uio: fix uio release issue for hotplug

Stephen Hemminger stephen at networkplumber.org
Tue Jul 10 23:48:13 CEST 2018


On Tue, 10 Jul 2018 19:03:27 +0800
Jeff Guo <jia.guo at intel.com> wrote:

>  
> +/* uio pci device state */
> +enum rte_udev_state {
> +	RTE_UDEV_PROBED,
> +	RTE_UDEV_OPENNED,
> +	RTE_UDEV_RELEASED,
> +	RTE_UDEV_REMOVED,
> +};
> +

The states here are a little confusing. especially since pci_release
seems to take different actions based on the state. And there is nothing
preventing races between unexpected removal (PCI), and removing the
device from being used by igb_uio.

Would it be possible to only use state variable from the kernel PCI
layer where the value is consistent?

Also there is refcounting in PCI layer (and locking). Could that
be used instead?


More information about the dev mailing list