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 35 #define RTE_PCI_COMMAND 0x04 38 #define RTE_PCI_COMMAND_MASTER 0x4 41 #define RTE_PCI_EXP_DEVCTL 8 44 #define RTE_PCI_EXT_CAP_ID(header) (header & 0x0000ffff) 45 #define RTE_PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc) 47 #define RTE_PCI_EXT_CAP_ID_ERR 0x01 48 #define RTE_PCI_EXT_CAP_ID_DSN 0x03 49 #define RTE_PCI_EXT_CAP_ID_SRIOV 0x10 52 #define RTE_PCI_SRIOV_CAP 0x04 53 #define RTE_PCI_SRIOV_CTRL 0x08 54 #define RTE_PCI_SRIOV_INITIAL_VF 0x0c 55 #define RTE_PCI_SRIOV_TOTAL_VF 0x0e 56 #define RTE_PCI_SRIOV_NUM_VF 0x10 57 #define RTE_PCI_SRIOV_FUNC_LINK 0x12 58 #define RTE_PCI_SRIOV_VF_OFFSET 0x14 59 #define RTE_PCI_SRIOV_VF_STRIDE 0x16 60 #define RTE_PCI_SRIOV_VF_DID 0x1a 61 #define RTE_PCI_SRIOV_SUP_PGSIZE 0x1c 64 #define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 65 #define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X") 68 #define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 71 #define PCI_FMT_NVAL 4 74 #define PCI_RESOURCE_FMT_NVAL 3 77 #define PCI_MAX_RESOURCE 6 102 #define RTE_PCI_ANY_ID (0xffff) 104 #define PCI_ANY_ID RTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_ID 105 #define RTE_CLASS_ANY_ID (0xffffff) 120 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)