diff --git a/lib/env_dpdk/22.07/rte_bus_pci.h b/lib/env_dpdk/22.07/rte_bus_pci.h index 1c6a8fdd7..9a0b03617 100644 --- a/lib/env_dpdk/22.07/rte_bus_pci.h +++ b/lib/env_dpdk/22.07/rte_bus_pci.h @@ -69,7 +69,11 @@ struct rte_pci_device { struct rte_pci_id id; /**< PCI ID. */ struct rte_mem_resource mem_resource[PCI_MAX_RESOURCE]; /**< PCI Memory Resource */ +#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0) + struct rte_intr_handle intr_handle; /**< Interrupt handle */ +#else struct rte_intr_handle *intr_handle; /**< Interrupt handle */ +#endif struct rte_pci_driver *driver; /**< PCI driver used in probing */ uint16_t max_vfs; /**< sriov enable if not zero */ enum rte_pci_kernel_driver kdrv; /**< Kernel driver passthrough */ diff --git a/lib/env_dpdk/pci_dpdk.h b/lib/env_dpdk/pci_dpdk.h index ea52b8194..6f8564427 100644 --- a/lib/env_dpdk/pci_dpdk.h +++ b/lib/env_dpdk/pci_dpdk.h @@ -8,6 +8,12 @@ #include "spdk/env.h" +#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0) +#define RTE_TAILQ_HEAD(name, type) TAILQ_HEAD(name, type) +#define RTE_TAILQ_ENTRY(type) TAILQ_ENTRY(type) +#define RTE_TAILQ_FOREACH(var, head, field) TAILQ_FOREACH(var, head, field) +#endif + struct spdk_pci_driver { uint8_t driver_buf[256]; struct rte_pci_driver *driver;