From: Luca Boccassi <bluca@debian.org>
To: stable@dpdk.org
Cc: anatoly.burakov@intel.com
Subject: [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build
Date: Wed, 21 Nov 2018 16:48:02 +0000 [thread overview]
Message-ID: <20181121164802.8186-2-bluca@debian.org> (raw)
In-Reply-To: <20181121164802.8186-1-bluca@debian.org>
From: Anatoly Burakov <anatoly.burakov@intel.com>
[ backported from upstream commit 9fa5993f103712d10be0f0b111a3a9afc92cd9e6 ]
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 <anatoly.burakov@intel.com>
---
lib/librte_eal/linuxapp/eal/eal_vfio.h | 29 +++++++++++++-------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 0bf85bb59..72f1f7572 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
--
2.19.1
next prev parent reply other threads:[~2018-11-21 16:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 16:48 [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Luca Boccassi
2018-11-21 16:48 ` Luca Boccassi [this message]
2018-11-23 9:29 ` [dpdk-stable] [PATCH 16.11 2/2] vfio: fix build Burakov, Anatoly
2018-11-23 9:26 ` [dpdk-stable] [PATCH 16.11 1/2] vfio: fix build on old kernel Burakov, Anatoly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121164802.8186-2-bluca@debian.org \
--to=bluca@debian.org \
--cc=anatoly.burakov@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).