[dpdk-dev] [PATCH 1/6] build: fix for FREEBSD build via meson

Agalya Babu RadhaKrishnan agalyax.babu.radhakrishnan at intel.com
Thu Sep 27 15:24:07 CEST 2018


FreeBSD compilation was failing through meson build.
RTE_EAL_VFIO is not supported in FreeBSD.
But RTE_EAL_VFIO was enabled for both linux and freebsd.
So RTE_EAL_VFIO is removed from config/rte_config.h and
based on the platform RTE_EAL_VFIO flag is enabled/disabled appropriately.

Fixes: 6e8a721044 ("vfio: export functions even when disabled")

Signed-off-by: Agalya Babu RadhaKrishnan <agalyax.babu.radhakrishnan at intel.com>
---
 config/rte_config.h | 1 -
 lib/meson.build     | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/config/rte_config.h b/config/rte_config.h
index 567051b9c..53c568929 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -34,7 +34,6 @@
 #define RTE_MAX_TAILQ 32
 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
 #define RTE_BACKTRACE 1
-#define RTE_EAL_VFIO 1
 #define RTE_MAX_VFIO_CONTAINERS 64
 
 /* bsd module defines */
diff --git a/lib/meson.build b/lib/meson.build
index 3acc67e6e..1b20027a5 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -31,6 +31,12 @@ if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
 
+if host_machine.system() == 'linux'
+	dpdk_conf.set('RTE_EAL_VFIO', true)
+else
+	dpdk_conf.set('RTE_EAL_VFIO', false)
+endif
+
 enabled_libs = [] # used to print summary at the end
 foreach l:libraries
 	build = true
-- 
2.13.6



More information about the dev mailing list