[dpdk-dev] [RFC PATCH 01/18] librte_eal: remove type field from rte_driver structure.

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Sep 4 15:08:14 CEST 2015


2015-09-04 12:01, Bernard Iremonger:
> Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com>

There is no explanation in this patch.

> -		if (driver->type != PMD_PDEV)
> -			continue;
> -		/* PDEV drivers don't get passed any parameters */
> -		driver->init(NULL, NULL);
> +
> +		/* PCI drivers don't get passed any parameters */
> +		/*
> +		 * Search a virtual driver prefix in device name.
> +		 * It should not be found for PCI devices.
> +		 * Use strncmp to compare.
> +		 */
> +
> +		if ((driver->name) &&
> +			(strncmp(driver->name, "eth_", strlen("eth_")) != 0)) {
> +			driver->init(NULL, NULL);
> +		}

You don't need to submit a full patchset with changes in every drivers
for a RFC. Having just this patch is enough to have an opinion.
Here it is a nack.
We need to have a common init path instead of the current VDEV/PDEV branches.
And instead of "pmd_type", a bus information would be more meaningful.
So just replacing a type by a magical string is worst.

Please don't try to fix wrong problems and focus on your goal.
We had some discussions about possible PCI EAL refactoring but
it probably needs to be done step by step with a clear cleaning motivation
at each step. I think other people involved in EAL will have other ideas.


More information about the dev mailing list