Skip to contentSkip to conversation

build: fix for FREEBSD build via meson

PATCH Superseded Agalya Babu RadhaKrishnan 6 participants 13 messages Oct 3, 2018 2 messages not in the archive

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1538054652-20820-1

#1 lore raw

PATCH v2 1/6 build: fix for FREEBSD build via meson

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")
---
 config/meson.build  | 3 +++
 config/rte_config.h | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)
config/meson.build +3 -0
index 6f9228c87..b95bca018 100644
@@ -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')
config/rte_config.h +0 -1
index 567051b9c..53c568929 100644
@@ -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 */
Signature · 1 line
2.13.6
#2 lore raw
Quoted 8 lines · Agalya Babu RadhaKrishnan

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...

#3 lore raw

PATCH v2 2/6 net/nfp: disable nfp build in FREEBSD

In reply to a message not in the archive

Disabled nfp build in FreeBSD because it is not supported Added changes to enable NFP build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/nfp/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/nfp/meson.build +3 -0
index 3ba37e279..a8f29f986 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 sources = files('nfpcore/nfp_cpp_pcie_ops.c',
 	'nfpcore/nfp_nsp.c',
 	'nfpcore/nfp_cppcore.c',
Signature · 1 line
2.13.6
#4 lore raw

PATCH v2 3/6 net/avp: disable avp build in FREEBSD

In reply to a message not in the archive

Disabled avp build in FreeBSD because it is not supported. Added changes to enable avp build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/avp/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/avp/meson.build +3 -0
index 6076c31b9..b7ffdfc80 100644
@@ -1,5 +1,8 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 sources = files('avp_ethdev.c')
 install_headers('rte_avp_common.h', 'rte_avp_fifo.h')
Signature · 1 line
2.13.6
Acked-by on v2 3/6
#5 lore raw

Re: [PATCH v2 3/6] net/avp: disable avp build in FREEBSD

Quoted 11 lines

-----Original Message-----
From: Agalya Babu RadhaKrishnan [mailto:[email protected]]
Sent: Wednesday, October 03, 2018 10:00 AM
To: [email protected]
Cc: [email protected]; Legacy, Allain; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Agalya Babu RadhaKrishnan
Subject: [PATCH v2 3/6] net/avp: disable avp build in FREEBSD

Quoted 6 lines

Disabled avp build in FreeBSD because it is not supported. Added changes to enable avp build if it is Linux OS and disable in FreeBSD.

Signed-off-by: Agalya Babu RadhaKrishnan
<[email protected]>
---

For net/avp:

#6 lore raw

PATCH v2 4/6 net/softnic: disable softnic build in FREEBSD

In reply to a message not in the archive

Disabled softnic build in FreeBSD because it is not supported Added changes to enable softnic build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/softnic/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/softnic/meson.build +3 -0
index ff9822747..673d2cee8 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Intel Corporation
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 allow_experimental_apis = true
 install_headers('rte_eth_softnic.h')
 sources = files('rte_eth_softnic_tm.c',
Signature · 1 line
2.13.6
Acked-by on v2 4/6
#7 lore raw

Re: [PATCH v2 4/6] net/softnic: disable softnic build in FREEBSD

Quoted 36 lines

-----Original Message-----
From: Babu Radhakrishnan, AgalyaX
Sent: Wednesday, October 3, 2018 3:00 PM
To: [email protected]
Cc: [email protected]; [email protected]; Singh, Jasvinder <[email protected]>; Wiles, Keith <[email protected]>; [email protected]; Richardson, Bruce <[email protected]>; Pattan, Reshma <[email protected]>; Babu Radhakrishnan, AgalyaX <[email protected]>
Subject: [PATCH v2 4/6] net/softnic: disable softnic build in FREEBSD

Disabled softnic build in FreeBSD because it is not supported Added changes to enable softnic build if it is Linux OS and disable in FreeBSD.

Signed-off-by: Agalya Babu RadhaKrishnan
<[email protected]>

---
 drivers/net/softnic/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/softnic/meson.build +3 -1
index ff9822747..673d2cee8 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause  # Copyright(c) 2018 Intel Corporation
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 allow_experimental_apis = true
 install_headers('rte_eth_softnic.h')
 sources = files('rte_eth_softnic_tm.c',
--
Quoted 1 line

2.13.6

#8 lore raw

v2 cover fix for meson builds in freebsd

In reply to a message not in the archive

Compilation issues were observed in FreeBSD when built via meson. VFIO flags are enabled/disabled based on linux/freebsd. Changes are done in meson.build files to ensure
the build of drivers are enabled/disabled based on platform.

1/6: set/unset of vfio flags based on platforms
2/6: updated net/nfp meson build
3/6: updated net/avp meson build
4/6: updated net/softnic meson build
5/6: updated net/tap meson build
6/6: updated net/vdev_netvsc meson build

--
v2: Added fixes line for the appropriate file
Updated meson.build changes to config instead of lib
--

Agalya Babu RadhaKrishnan (6):
build: fix for FREEBSD build via meson net/nfp: disable nfp build in FREEBSD net/avp: disable avp build in FREEBSD net/softnic: disable softnic build in FREEBSD net/tap: disable tap build in FREEBSD net/vdev_netvsc: disable vdev netvsc build in FREEBSD

 config/meson.build                  | 3 +++
 config/rte_config.h                 | 1 -
 drivers/net/avp/meson.build         | 3 +++
 drivers/net/nfp/meson.build         | 3 +++
 drivers/net/softnic/meson.build     | 3 +++
 drivers/net/tap/meson.build         | 3 +++
 drivers/net/vdev_netvsc/meson.build | 3 +++
 7 files changed, 18 insertions(+), 1 deletion(-)
Signature · 1 line
2.13.6
#9 lore raw

PATCH v2 5/6 net/tap: disable tap build in FREEBSD

In reply to a message not in the archive

Disabled tap build in FreeBSD because it is not supported Added changes to enable tap build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/tap/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/tap/meson.build +3 -0
index 37f65b75c..5d30cd52d 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018 Luca Boccassi <[email protected]>
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 sources = files(
 	'rte_eth_tap.c',
 	'tap_bpf_api.c',
Signature · 1 line
2.13.6
Acked-by on v2 5/6
#10 lore raw

Re: [PATCH v2 5/6] net/tap: disable tap build in FREEBSD

Quoted 9 lines · AgalyaX

Disabled tap build in FreeBSD because it is not supported Added changes to enable tap build if it is Linux OS and disable in FreeBSD.

Thought I acked this one already.

Quoted 16 lines

---
drivers/net/tap/meson.build | 3 +++

1 file changed, 3 insertions(+)
drivers/net/tap/meson.build +3 -0
index 37f65b75c..5d30cd52d 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2018 Luca Boccassi <[email protected]>
 
+if host_machine.system() != 'linux'
+        build = false
+endif

sources = files(

Quoted 5 lines
	'rte_eth_tap.c',
	'tap_bpf_api.c',
Signature · 1 line
2.13.6

Regards,
Keith

#11 lore raw

PATCH v2 6/6 net/vdev_netvsc: disable vdev netvsc build in FREEBSD

In reply to a message not in the archive

Disabled vdev_netvsc build in FreeBSD because it is not supported Added changes to enable vdev_netvsc build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/vdev_netvsc/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/vdev_netvsc/meson.build +3 -0
index cc956e7b2..d3ada878a 100644
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 sources = files('vdev_netvsc.c')
 
 allow_experimental_apis = true
Signature · 1 line
2.13.6
Acked-by Stephen Hemmminger on v2 6/6
#12 lore raw

Re: [PATCH v2 6/6] net/vdev_netvsc: disable vdev netvsc build in FREEBSD

Quoted 14 lines · On Wed, 3 Oct 2018 15:00:21 +0100 Agalya Babu RadhaKrishnan…

Disabled vdev_netvsc build in FreeBSD because it is not supported Added changes to enable vdev_netvsc build if it is Linux OS and disable in FreeBSD.

---
 drivers/net/vdev_netvsc/meson.build | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/vdev_netvsc/meson.build +0 -0
index cc956e7b2..d3ada878a 100644

drivers/net/vdev_netvsc/meson.build line 9

Quoted 9 lines
drivers/net/vdev_netvsc/meson.build +3 -0
@@ -1,6 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
+if host_machine.system() != 'linux'
+        build = false
+endif
 sources = files('vdev_netvsc.c')
 
 allow_experimental_apis = true

A message that is not in the archive (sent off-list or not yet received): 1538574386-21771-2-git-send-email-agalyabx@wgcvswdev001.ir.intel.com

#14 lore raw
Quoted 10 lines · agalyax.babu.radhakrishnan

From: Agalya Babu RadhaKrishnan <[email protected]>

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")

The actual commit that introduced the offending line i.e. the RTE_EAL_VFIO one in rte_config.h was 844514c735, eal: build with meson.

With correct fixline: