[dpdk-dev] [PATCH 3/7] eal: move virtual device probing into a bus

Shreyansh Jain shreyansh.jain at nxp.com
Wed Feb 15 15:11:25 CET 2017


On Wednesday 15 February 2017 03:32 PM, Jan Blunck wrote:
> This is a refactoring of the virtual device probing which moves into into
> a proper bus structure.
>
> Signed-off-by: Jan Blunck <jblunck at infradead.org>
> ---
>  lib/librte_eal/common/eal_common_dev.c  | 22 -----------------
>  lib/librte_eal/common/eal_common_vdev.c | 44 +++++++++++++++++++++++++++++++++
>  2 files changed, 44 insertions(+), 22 deletions(-)
>

[...]

>
> diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
> index 7d6e54f..523a3d6 100644
> --- a/lib/librte_eal/common/eal_common_vdev.c
> +++ b/lib/librte_eal/common/eal_common_vdev.c
> @@ -37,8 +37,10 @@
>  #include <stdint.h>
>  #include <sys/queue.h>
>
[...]

> +
> +static struct rte_bus rte_vdev_bus = {
> +	.scan = vdev_scan,
> +	.probe = vdev_probe,
> +};
> +
> +RTE_REGISTER_BUS_LATE(virtual, rte_vdev_bus);
>

Does it matter if VDEV buses are registered before or after other
buses? Either way, the callbacks would be called in the order specified
in EAL.



More information about the dev mailing list