[dpdk-dev] [PATCH v4 02/10] eal: probe new virtual bus after other bus devices

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Mar 13 18:42:30 CET 2017


2017-03-06 11:56, Jan Blunck:
> @@ -86,9 +86,14 @@ int
>  rte_bus_probe(void)
>  {
>  	int ret;
> -	struct rte_bus *bus;
> +	struct rte_bus *bus, *vbus = NULL;
>  
>  	TAILQ_FOREACH(bus, &rte_bus_list, next) {
> +		if (!strcmp(bus->name, "virtual")) {
> +			vbus = bus;
> +			continue;
> +		}

Why this special handling?

[...]
> +	if (vbus) {
> +		ret = vbus->probe();
> +		if (ret) {
> +			RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
> +				vbus->name);
> +			return ret;
> +		}
> +	}

We should not have any special code in this function.


More information about the dev mailing list