env_dpdk: Include get_iommu_class after v17.08
the function pointer .get_iommu_class was not defined until v17.11 of dpdk so this function causes packaged versions of dpdk <17.11 to fail to compile with SPDK. Adding a couple preporocessor directives to avoid this problem. Change-Id: I70cf44877ddd712d42d117e6fa5f82494675d603 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/424609 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
8b45e46698
commit
c8337cb68a
@ -654,6 +654,7 @@ spdk_bus_find_device(const struct rte_device *start,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
|
||||||
static enum rte_iova_mode
|
static enum rte_iova_mode
|
||||||
spdk_bus_get_iommu_class(void) {
|
spdk_bus_get_iommu_class(void) {
|
||||||
/* Since we register our PCI drivers after EAL init, we have no chance
|
/* Since we register our PCI drivers after EAL init, we have no chance
|
||||||
@ -667,12 +668,15 @@ spdk_bus_get_iommu_class(void) {
|
|||||||
*/
|
*/
|
||||||
return RTE_IOVA_VA;
|
return RTE_IOVA_VA;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct rte_bus spdk_bus = {
|
struct rte_bus spdk_bus = {
|
||||||
.scan = spdk_bus_scan,
|
.scan = spdk_bus_scan,
|
||||||
.probe = spdk_bus_probe,
|
.probe = spdk_bus_probe,
|
||||||
.find_device = spdk_bus_find_device,
|
.find_device = spdk_bus_find_device,
|
||||||
|
#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 3)
|
||||||
.get_iommu_class = spdk_bus_get_iommu_class,
|
.get_iommu_class = spdk_bus_get_iommu_class,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
RTE_REGISTER_BUS(spdk, spdk_bus);
|
RTE_REGISTER_BUS(spdk, spdk_bus);
|
||||||
|
Loading…
Reference in New Issue
Block a user