28#define RTE_PCI_CFG_SPACE_SIZE 256
29#define RTE_PCI_CFG_SPACE_EXP_SIZE 4096
31#define RTE_PCI_VENDOR_ID 0x00
32#define RTE_PCI_DEVICE_ID 0x02
33#define RTE_PCI_COMMAND 0x04
36#define RTE_PCI_COMMAND_MASTER 0x4
39#define RTE_PCI_EXP_DEVCTL 8
42#define RTE_PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
43#define RTE_PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc)
45#define RTE_PCI_EXT_CAP_ID_ERR 0x01
46#define RTE_PCI_EXT_CAP_ID_DSN 0x03
47#define RTE_PCI_EXT_CAP_ID_SRIOV 0x10
48#define RTE_PCI_EXT_CAP_ID_PASID 0x1B
51#define RTE_PCI_SRIOV_CAP 0x04
52#define RTE_PCI_SRIOV_CTRL 0x08
53#define RTE_PCI_SRIOV_INITIAL_VF 0x0c
54#define RTE_PCI_SRIOV_TOTAL_VF 0x0e
55#define RTE_PCI_SRIOV_NUM_VF 0x10
56#define RTE_PCI_SRIOV_FUNC_LINK 0x12
57#define RTE_PCI_SRIOV_VF_OFFSET 0x14
58#define RTE_PCI_SRIOV_VF_STRIDE 0x16
59#define RTE_PCI_SRIOV_VF_DID 0x1a
60#define RTE_PCI_SRIOV_SUP_PGSIZE 0x1c
64#define RTE_PCI_PASID_CTRL 0x06
66#define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
67#define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X")
70#define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
76#define PCI_RESOURCE_FMT_NVAL 3
79#define PCI_MAX_RESOURCE 6
104#define RTE_PCI_ANY_ID (0xffff)
106#define PCI_ANY_ID RTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_ID
107#define RTE_CLASS_ANY_ID (0xffffff)
121 char *output,
size_t size);
void rte_pci_device_name(const struct rte_pci_addr *addr, char *output, size_t size)
int rte_pci_addr_cmp(const struct rte_pci_addr *addr, const struct rte_pci_addr *addr2)
int rte_pci_addr_parse(const char *str, struct rte_pci_addr *addr)
uint16_t subsystem_vendor_id
uint16_t subsystem_device_id