[dpdk-dev] [PATCH v7 02/28] librte_ether: add fields from rte_pci_driver to rte_eth_dev_data

Thomas Monjalon thomas.monjalon at 6wind.com
Sun Nov 1 22:41:01 CET 2015


2015-10-30 15:08, Bernard Iremonger:
> +/** Device needs PCI BAR mapping (done with either IGB_UIO or VFIO) */
> +#define RTE_ETH_DEV_DRV_NEED_MAPPING   RTE_PCI_DRV_NEED_MAPPING
> +/** Device needs to be unbound even if no module is provided */
> +#define RTE_ETH_DEV_DRV_FORCE_UNBIND   RTE_PCI_DRV_FORCE_UNBIND
> +/** Device supports link state interrupt */
> +#define RTE_ETH_DEV_INTR_LSC   RTE_PCI_DRV_INTR_LSC
> +/** Device  supports detaching capability */
> +#define RTE_ETH_DEV_DETACHABLE RTE_PCI_DRV_DETACHABLE

Please, use an enum which has a name and can be referenced in the API,
e.g. the variable X contains some X_flags.
You should not try to re-use the same values as the PCI layer since it
will not be possible to map it forever when new buses will enter in the game.

> +/** Device  is a bonded device */
> +#define RTE_ETH_DEV_BONDED 0x0020

Why not having RTE_ETH_DEV_PCAPED? ;)
Please try to remove this flag.


More information about the dev mailing list