21 #include <sys/queue.h> 23 #include <sys/types.h> 30 #define RTE_PCI_CFG_SPACE_SIZE 256 31 #define RTE_PCI_CFG_SPACE_EXP_SIZE 4096 33 #define RTE_PCI_VENDOR_ID 0x00 34 #define RTE_PCI_DEVICE_ID 0x02 37 #define RTE_PCI_EXP_DEVCTL 8 40 #define RTE_PCI_EXT_CAP_ID(header) (header & 0x0000ffff) 41 #define RTE_PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc) 43 #define RTE_PCI_EXT_CAP_ID_ERR 0x01 44 #define RTE_PCI_EXT_CAP_ID_DSN 0x03 45 #define RTE_PCI_EXT_CAP_ID_SRIOV 0x10 48 #define RTE_PCI_SRIOV_CAP 0x04 49 #define RTE_PCI_SRIOV_CTRL 0x08 50 #define RTE_PCI_SRIOV_INITIAL_VF 0x0c 51 #define RTE_PCI_SRIOV_TOTAL_VF 0x0e 52 #define RTE_PCI_SRIOV_NUM_VF 0x10 53 #define RTE_PCI_SRIOV_FUNC_LINK 0x12 54 #define RTE_PCI_SRIOV_VF_OFFSET 0x14 55 #define RTE_PCI_SRIOV_VF_STRIDE 0x16 56 #define RTE_PCI_SRIOV_VF_DID 0x1a 57 #define RTE_PCI_SRIOV_SUP_PGSIZE 0x1c 60 #define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 61 #define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X") 64 #define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 67 #define PCI_FMT_NVAL 4 70 #define PCI_RESOURCE_FMT_NVAL 3 73 #define PCI_MAX_RESOURCE 6 98 #define PCI_ANY_ID (0xffff) 99 #define RTE_CLASS_ANY_ID (0xffffff) 113 char *output,
size_t size);
int rte_pci_addr_parse(const char *str, struct rte_pci_addr *addr)
uint16_t subsystem_device_id
void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size)
uint16_t subsystem_vendor_id
int rte_pci_addr_cmp(const struct rte_pci_addr *addr, const struct rte_pci_addr *addr2)