env/pci: fix compilation with DPDK < 16.07

Change-Id: Ibac6d3132ad7cfa66b9ad3d3a933492acfa1b25e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-11-30 15:56:58 -07:00
parent 06c6d16cf8
commit 8a6b62c9ec

View File

@ -182,6 +182,7 @@ static struct spdk_pci_enum_ctx g_nvme_pci_drv = {
#else #else
.devinit = spdk_pci_device_init, .devinit = spdk_pci_device_init,
.devuninit = spdk_pci_device_fini, .devuninit = spdk_pci_device_fini,
.name = "spdk_nvme",
#endif #endif
}, },
@ -206,7 +207,11 @@ static struct rte_driver g_nvme_drv = {
.init = spdk_nvme_drv_register, .init = spdk_nvme_drv_register,
}; };
#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0)
PMD_REGISTER_DRIVER(g_nvme_drv, spdk_nvme); PMD_REGISTER_DRIVER(g_nvme_drv, spdk_nvme);
#else
PMD_REGISTER_DRIVER(g_nvme_drv);
#endif
#endif #endif
static struct spdk_pci_enum_ctx g_ioat_pci_drv = { static struct spdk_pci_enum_ctx g_ioat_pci_drv = {
@ -219,6 +224,7 @@ static struct spdk_pci_enum_ctx g_ioat_pci_drv = {
#else #else
.devinit = spdk_pci_device_init, .devinit = spdk_pci_device_init,
.devuninit = spdk_pci_device_fini, .devuninit = spdk_pci_device_fini,
.name = "spdk_ioat",
#endif #endif
}, },
@ -243,7 +249,11 @@ static struct rte_driver g_ioat_drv = {
.init = spdk_ioat_drv_register, .init = spdk_ioat_drv_register,
}; };
#if RTE_VERSION >= RTE_VERSION_NUM(16, 7, 0, 0)
PMD_REGISTER_DRIVER(g_ioat_drv, spdk_ioat); PMD_REGISTER_DRIVER(g_ioat_drv, spdk_ioat);
#else
PMD_REGISTER_DRIVER(g_ioat_drv);
#endif
#endif #endif
static struct spdk_pci_enum_ctx * static struct spdk_pci_enum_ctx *