From: Anatoly Burakov Date: Mon, 3 Apr 2017 12:58:05 +0000 (+0100) Subject: vfio: fix build X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9fa5993f103712d10be0f0b111a3a9afc92cd9e6;p=dpdk.git vfio: fix build Some compilers require definition of vfio_iommu_spapr_tce_ddw_info before its use in vfio_iommu_spapr_tce_info, so move tce_info definition below tce_ddw_info. Fixes: 468f42cc2645 ("vfio: fix build on old kernel") Signed-off-by: Anatoly Burakov --- diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h index b7ca3a7924..239ac4d8d6 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h @@ -60,19 +60,6 @@ #define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19) #define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20) -/* SPAPR_v2 is not present, but SPAPR might be */ -#ifndef VFIO_SPAPR_TCE_IOMMU -#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) - -struct vfio_iommu_spapr_tce_info { - uint32_t argsz; - uint32_t flags; - uint32_t dma32_window_start; - uint32_t dma32_window_size; - struct vfio_iommu_spapr_tce_ddw_info ddw; -}; -#endif - struct vfio_iommu_spapr_register_memory { uint32_t argsz; uint32_t flags; @@ -97,7 +84,21 @@ struct vfio_iommu_spapr_tce_ddw_info { uint32_t max_dynamic_windows_supported; uint32_t levels; }; -#else + +/* SPAPR_v2 is not present, but SPAPR might be */ +#ifndef VFIO_SPAPR_TCE_IOMMU +#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) + +struct vfio_iommu_spapr_tce_info { + uint32_t argsz; + uint32_t flags; + uint32_t dma32_window_start; + uint32_t dma32_window_size; + struct vfio_iommu_spapr_tce_ddw_info ddw; +}; +#endif /* VFIO_SPAPR_TCE_IOMMU */ + +#else /* VFIO_SPAPR_TCE_v2_IOMMU */ #define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU #endif