DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation
@ 2020-09-04  1:05 Nicolas Chautru
  2020-09-04  1:05 ` Nicolas Chautru
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Chautru @ 2020-09-04  1:05 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: bruce.richardson, ciara.power, Nicolas Chautru

In parallel of moving to meson by default as part of this serie
https://patches.dpdk.org/project/dpdk/list/?series=11929,
updating the turbo_sw meson so that to no longer rely on toplevel device
specific flags, but purely dynamically within meson based on
autodetecting the optional libraries.

Nicolas Chautru (1):
  baseband/turbo_sw: update meson for more dynamic compilation

 drivers/baseband/turbo_sw/meson.build | 43 ++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 21 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation
  2020-09-04  1:05 [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation Nicolas Chautru
@ 2020-09-04  1:05 ` Nicolas Chautru
  2020-09-04  9:31   ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Chautru @ 2020-09-04  1:05 UTC (permalink / raw)
  To: dev, akhil.goyal; +Cc: bruce.richardson, ciara.power, Nicolas Chautru

The meson for the turbo_sw PMD is updated to prevent the
requirement for any device specific toplevel flags to be
passed down (unlike what used to be the case with make).
The linking to the optional libraries is purely auto
detected at build time and flags are then set appropriately.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/turbo_sw/meson.build | 43 ++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build
index f5a1ab3..55ef4e4 100644
--- a/drivers/baseband/turbo_sw/meson.build
+++ b/drivers/baseband/turbo_sw/meson.build
@@ -3,28 +3,28 @@
 
 path = get_option('flexran_sdk')
 
-if dpdk_conf.has('RTE_BBDEV_SDK_AVX2')
-	lib = cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: false)
-	if not lib.found()
-		build = false
-		reason = 'missing dependency, "libturbo"'
-	else
-		ext_deps += cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: true)
-		ext_deps += cc.find_library('libcrc', dirs: [path + '/lib_crc'], required: true)
-		ext_deps += cc.find_library('librate_matching', dirs: [path + '/lib_rate_matching'], required: true)
-		ext_deps += cc.find_library('libcommon', dirs: [path + '/lib_common'], required: true)
-		ext_deps += cc.find_library('libstdc++', required: true)
-		ext_deps += cc.find_library('libirc', required: true)
-		ext_deps += cc.find_library('libimf', required: true)
-		ext_deps += cc.find_library('libipps', required: true)
-		ext_deps += cc.find_library('libsvml', required: true)
-		includes += include_directories(path + '/lib_turbo')
-		includes += include_directories(path + '/lib_crc')
-		includes += include_directories(path + '/lib_rate_matching')
-		includes += include_directories(path + '/lib_common')
-	endif
+# check for FlexRAN SDK libraries for AVX2
+lib4g = cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: false)
+if lib4g.found()
+	ext_deps += cc.find_library('libturbo', dirs: [path + '/lib_turbo'], required: true)
+	ext_deps += cc.find_library('libcrc', dirs: [path + '/lib_crc'], required: true)
+	ext_deps += cc.find_library('librate_matching', dirs: [path + '/lib_rate_matching'], required: true)
+	ext_deps += cc.find_library('libcommon', dirs: [path + '/lib_common'], required: true)
+	ext_deps += cc.find_library('libstdc++', required: true)
+	ext_deps += cc.find_library('libirc', required: true)
+	ext_deps += cc.find_library('libimf', required: true)
+	ext_deps += cc.find_library('libipps', required: true)
+	ext_deps += cc.find_library('libsvml', required: true)
+	includes += include_directories(path + '/lib_turbo')
+	includes += include_directories(path + '/lib_crc')
+	includes += include_directories(path + '/lib_rate_matching')
+	includes += include_directories(path + '/lib_common')
+	cflags += ['-DRTE_BBDEV_SDK_AVX2']
 endif
-if dpdk_conf.has('RTE_BBDEV_SDK_AVX512')
+
+# check for FlexRAN SDK libraries for AVX512
+lib5g = cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: false)
+if lib5g.found()
 	ext_deps += cc.find_library('libldpc_encoder_5gnr', dirs: [path + '/lib_ldpc_encoder_5gnr'], required: true)
 	ext_deps += cc.find_library('libldpc_decoder_5gnr', dirs: [path + '/lib_ldpc_decoder_5gnr'], required: true)
 	ext_deps += cc.find_library('libLDPC_ratematch_5gnr', dirs: [path + '/lib_LDPC_ratematch_5gnr'], required: true)
@@ -33,6 +33,7 @@ if dpdk_conf.has('RTE_BBDEV_SDK_AVX512')
 	includes += include_directories(path + '/lib_ldpc_decoder_5gnr')
 	includes += include_directories(path + '/lib_LDPC_ratematch_5gnr')
 	includes += include_directories(path + '/lib_rate_dematching_5gnr')
+	cflags += ['-DRTE_BBDEV_SDK_AVX512']
 endif
 
 deps += ['bbdev', 'bus_vdev', 'ring']
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation
  2020-09-04  1:05 ` Nicolas Chautru
@ 2020-09-04  9:31   ` Bruce Richardson
  2020-10-06 21:18     ` Akhil Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2020-09-04  9:31 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: dev, akhil.goyal, ciara.power

On Thu, Sep 03, 2020 at 06:05:35PM -0700, Nicolas Chautru wrote:
> The meson for the turbo_sw PMD is updated to prevent the
> requirement for any device specific toplevel flags to be
> passed down (unlike what used to be the case with make).
> The linking to the optional libraries is purely auto
> detected at build time and flags are then set appropriately.
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>  drivers/baseband/turbo_sw/meson.build | 43 ++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 21 deletions(-)
>

From a meson viewpoint this all looks good, and glad to see the driver
taking advantage of the dynamic probing.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation
  2020-09-04  9:31   ` Bruce Richardson
@ 2020-10-06 21:18     ` Akhil Goyal
  0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2020-10-06 21:18 UTC (permalink / raw)
  To: Bruce Richardson, Nicolas Chautru; +Cc: dev, ciara.power

> 
> On Thu, Sep 03, 2020 at 06:05:35PM -0700, Nicolas Chautru wrote:
> > The meson for the turbo_sw PMD is updated to prevent the
> > requirement for any device specific toplevel flags to be
> > passed down (unlike what used to be the case with make).
> > The linking to the optional libraries is purely auto
> > detected at build time and flags are then set appropriately.
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > ---
> >  drivers/baseband/turbo_sw/meson.build | 43 ++++++++++++++++++------------
> -----
> >  1 file changed, 22 insertions(+), 21 deletions(-)
> >
> 
> From a meson viewpoint this all looks good, and glad to see the driver
> taking advantage of the dynamic probing.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
Applied to dpdk-next-crypto
Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-06 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04  1:05 [dpdk-dev] [PATCH v1] baseband/turbo_sw: update meson for more dynamic compilation Nicolas Chautru
2020-09-04  1:05 ` Nicolas Chautru
2020-09-04  9:31   ` Bruce Richardson
2020-10-06 21:18     ` Akhil Goyal

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