X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fbus%2Fpci%2Frte_bus_pci.h;h=fdda0465157ab0407cc3619875bd96c54496d928;hb=a65a34a85ebf5ee6dda53d680393b0342ff7fdb9;hp=29bea6d70da47ecdb0669cbd1ef379608878833c;hpb=d622cad892a1fc715635d137d1598053fd0b8e3a;p=dpdk.git diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h index 29bea6d70d..fdda046515 100644 --- a/drivers/bus/pci/rte_bus_pci.h +++ b/drivers/bus/pci/rte_bus_pci.h @@ -51,6 +51,15 @@ TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver); struct rte_devargs; +enum rte_pci_kernel_driver { + RTE_PCI_KDRV_UNKNOWN = 0, + RTE_PCI_KDRV_IGB_UIO, + RTE_PCI_KDRV_VFIO, + RTE_PCI_KDRV_UIO_GENERIC, + RTE_PCI_KDRV_NIC_UIO, + RTE_PCI_KDRV_NONE, +}; + /** * A structure describing a PCI device. */ @@ -64,7 +73,7 @@ struct rte_pci_device { struct rte_intr_handle intr_handle; /**< Interrupt handle */ struct rte_pci_driver *driver; /**< PCI driver used in probing */ uint16_t max_vfs; /**< sriov enable if not zero */ - enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */ + enum rte_pci_kernel_driver kdrv; /**< Kernel driver passthrough */ char name[PCI_PRI_STR_SIZE+1]; /**< PCI location (ASCII) */ struct rte_intr_handle vfio_req_intr_handle; /**< Handler of VFIO request interrupt */ @@ -224,6 +233,25 @@ void rte_pci_unmap_device(struct rte_pci_device *dev); */ void rte_pci_dump(FILE *f); +/** + * Find device's extended PCI capability. + * + * @param dev + * A pointer to rte_pci_device structure. + * + * @param cap + * Extended capability to be found, which can be any from + * RTE_PCI_EXT_CAP_ID_*, defined in librte_pci. + * + * @return + * > 0: The offset of the next matching extended capability structure + * within the device's PCI configuration space. + * < 0: An error in PCI config space read. + * = 0: Device does not support it. + */ +__rte_experimental +off_t rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t cap); + /** * Register a PCI driver. *