[v2,1/6] build: fix for FREEBSD build via meson

Message ID 1538575221-23873-2-git-send-email-agalyax.babu.radhakrishnan@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/6] build: fix for FREEBSD build via meson |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Babu Radhakrishnan, AgalyaX Oct. 3, 2018, 2 p.m. UTC
  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@intel.com>
---
 config/meson.build  | 3 +++
 config/rte_config.h | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Comments

Bruce Richardson Oct. 3, 2018, 3:42 p.m. UTC | #1
On Wed, Oct 03, 2018 at 03:00:16PM +0100, Agalya Babu RadhaKrishnan wrote:
> 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")
> 

Wrong fixes line, see correction on other copy of V2...
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 6f9228c87..b95bca018 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -100,3 +100,6 @@  dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', ','.join(compile_time_cpuflags))
 dpdk_conf.set_quoted('RTE_EAL_PMD_PATH', eal_pmd_path)
 
 install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))
+
+# enable VFIO only if it is linux OS
+dpdk_conf.set('RTE_EAL_VFIO', host_machine.system() == 'linux')
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 */