[dpdk-dev] [PATCH v5 05/12] eal: add probe and remove support for rte_driver

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Jan 3 23:05:50 CET 2017


2016-12-26 18:53, Shreyansh Jain:
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -152,6 +162,8 @@ struct rte_driver {
>  	struct rte_bus *bus;           /**< Bus serviced by this driver */
>  	const char *name;                   /**< Driver name. */
>  	const char *alias;              /**< Driver alias. */
> +	driver_probe_t *probe;         /**< Probe the device */
> +	driver_remove_t *remove;       /**< Remove/hotplugging the device */
>  };

If I understand well, this probe function does neither scan nor match.
So it could be named init.

I think the probe (init) and remove ops must be specific to the bus.
We can have them in rte_bus, and as an example, the pci implementation
would call the pci probe and remove ops of rte_pci_driver.

Please use rte_ prefix in public headers.


More information about the dev mailing list