On 2015/10/13 0:26, Bernard Iremonger wrote: > add dev_flags to rte_eth_dev_data, add macros for dev_flags. > add kdrv to rte_eth_dev_data. > add numa_node to rte_eth_dev_data. > add drv_name to rte_eth_dev_data. > use dev_type to distinguish between vdev's and pdev's. > remove pci_dev branches. > > Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com> > ---
[../..] > /* attach the new physical device, then store port_id of the device */ > @@ -1143,14 +1141,11 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t > nb_rx_q, uint16_t nb_tx_q, > * If link state interrupt is enabled, check that the > * device supports it. > */ > - if (dev_conf->intr_conf.lsc == 1) { > - const struct rte_pci_driver *pci_drv = &dev->driver->pci_drv; > - > - if (!(pci_drv->drv_flags & RTE_PCI_DRV_INTR_LSC)) { > + if ((dev_conf->intr_conf.lsc == 1) && > + (!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC))) { > PMD_DEBUG_TRACE("driver %s does not support lsc\n", > - pci_drv->name); > + dev->data->drv_name); > return -EINVAL; > - } > } > > /* > @@ -1795,8 +1790,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct > rte_eth_dev_info *dev_info) > FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get); > (*dev->dev_ops->dev_infos_get)(dev, dev_info); > dev_info->pci_dev = dev->pci_dev; Here also pci_dev, I think after you remove pci_dev from vdevs, and this field could be remove I think, as I don't see any use of this field in dev_info, it should be more general and not only PCI. Thanks, Michael > - if (dev->driver) > - dev_info->driver_name = dev->driver->pci_drv.name; > + dev_info->driver_name = dev->data->drv_name; > } > >