All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option
@ 2022-06-27 20:29 Nicolas Chautru
  2022-06-27 20:29 ` [PATCH v2] baseband/turbo_sw: remove Flexran SDK " Nicolas Chautru
  2022-06-28 10:07 ` [PATCH v2] baseband/turbo_sw: Remove flexran_sdk " Thomas Monjalon
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Chautru @ 2022-06-27 20:29 UTC (permalink / raw)
  To: dev, thomas; +Cc: Nicolas Chautru

v2: typo in documentation

Hi Thomas,
This is change you requested earlier this year. This is targeting 22.11.
Basically we no longer pass a specific option but rely on pkgconfig.
There is small change to generate the .pc files that Intel will make available by end of year. Still the related change in DPDK is available now.

Thanks
Nic



Nicolas Chautru (1):
  baseband/turbo_sw: remove Flexran SDK meson option

 doc/guides/bbdevs/turbo_sw.rst        |  6 ++++--
 drivers/baseband/turbo_sw/meson.build | 36 +++++++++++++----------------------
 meson_options.txt                     |  2 --
 3 files changed, 17 insertions(+), 27 deletions(-)

-- 
1.8.3.1


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

* [PATCH v2] baseband/turbo_sw: remove Flexran SDK meson option
  2022-06-27 20:29 [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option Nicolas Chautru
@ 2022-06-27 20:29 ` Nicolas Chautru
  2022-06-28 10:07 ` [PATCH v2] baseband/turbo_sw: Remove flexran_sdk " Thomas Monjalon
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Chautru @ 2022-06-27 20:29 UTC (permalink / raw)
  To: dev, thomas; +Cc: Nicolas Chautru

The related dependency to build the PMD based on the
SDK libraries is now enabled through pkfconfig.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 doc/guides/bbdevs/turbo_sw.rst        |  6 ++++--
 drivers/baseband/turbo_sw/meson.build | 36 +++++++++++++----------------------
 meson_options.txt                     |  2 --
 3 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/doc/guides/bbdevs/turbo_sw.rst b/doc/guides/bbdevs/turbo_sw.rst
index 1e23e37..24a9621 100644
--- a/doc/guides/bbdevs/turbo_sw.rst
+++ b/doc/guides/bbdevs/turbo_sw.rst
@@ -136,7 +136,8 @@ In order to enable this virtual bbdev PMD, the user may:
   FlexRAN SDK libraries were installed. And ``DIR_WIRELESS_SDK`` to the path
   where the libraries were extracted.
 
-* Tune the meson build option pointing the location of the FlexRAN SDK libraries ``flexran_sdk``
+* Point pkgconfig towards these libraries so that they can be automatically found by meson.
+  If not DPDK will still compile but the related functionality would be stubbed out.
 
 Example:
 
@@ -144,8 +145,9 @@ Example:
 
     export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install
     export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/
+    export PKG_CONFIG_PATH=$DIR_WIRELESS_SDK/pkgcfg:$PKG_CONFIG_PATH
     cd build
-    meson configure -Dflexran_sdk=<path-to-workspace>/FlexRAN-FEC-SDK-19-04/sdk/build-avx512-icc/install
+    meson configure
 
 * For AVX512 machines with SDK libraries installed then both 4G and 5G can be enabled for full real time FEC capability.
   For AVX2 machines it is possible to only enable the 4G libraries and the PMD capabilities will be limited to 4G FEC.
diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build
index 477b8b3..9e35156 100644
--- a/drivers/baseband/turbo_sw/meson.build
+++ b/drivers/baseband/turbo_sw/meson.build
@@ -1,38 +1,28 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
-path = get_option('flexran_sdk')
+# check for FlexRAN SDK libraries
+dep_turbo = dependency('flexran_sdk_turbo', required: false)
+dep_dec5g = dependency('flexran_sdk_ldpc_decoder_5gnr', required: false)
 
-# 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)
+if dep_turbo.found()
     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')
+	ext_deps += dep_turbo
+	ext_deps += dependency('flexran_sdk_crc', required: true)
+	ext_deps += dependency('flexran_sdk_rate_matching', required: true)
+	ext_deps += dependency('flexran_sdk_common', required: true)
     cflags += ['-DRTE_BBDEV_SDK_AVX2']
 endif
 
-# 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)
-    ext_deps += cc.find_library('librate_dematching_5gnr', dirs: [path + '/lib_rate_dematching_5gnr'], required: true)
-    includes += include_directories(path + '/lib_ldpc_encoder_5gnr')
-    includes += include_directories(path + '/lib_ldpc_decoder_5gnr')
-    includes += include_directories(path + '/lib_LDPC_ratematch_5gnr')
-    includes += include_directories(path + '/lib_rate_dematching_5gnr')
+if dep_dec5g.found()
+	ext_deps += dep_dec5g
+	ext_deps += dependency('flexran_sdk_ldpc_encoder_5gnr', required: true)
+	ext_deps += dependency('flexran_sdk_LDPC_ratematch_5gnr', required: true)
+	ext_deps += dependency('flexran_sdk_rate_dematching_5gnr', required: true)
     cflags += ['-DRTE_BBDEV_SDK_AVX512']
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 7c220ad..abaa304 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -22,8 +22,6 @@ option('enable_kmods', type: 'boolean', value: false, description:
        'build kernel modules')
 option('examples', type: 'string', value: '', description:
        'Comma-separated list of examples to build by default')
-option('flexran_sdk', type: 'string', value: '', description:
-       'Path to FlexRAN SDK optional Libraries for BBDEV device')
 option('ibverbs_link', type: 'combo', choices : ['static', 'shared', 'dlopen'], value: 'shared', description:
        'Linkage method (static/shared/dlopen) for Mellanox PMDs with ibverbs dependencies.')
 option('include_subdir_arch', type: 'string', value: '', description:
-- 
1.8.3.1


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

* Re: [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option
  2022-06-27 20:29 [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option Nicolas Chautru
  2022-06-27 20:29 ` [PATCH v2] baseband/turbo_sw: remove Flexran SDK " Nicolas Chautru
@ 2022-06-28 10:07 ` Thomas Monjalon
  2022-06-29  0:16   ` Chautru, Nicolas
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2022-06-28 10:07 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: dev

27/06/2022 22:29, Nicolas Chautru:
> Hi Thomas,
> This is change you requested earlier this year. This is targeting 22.11.

OK thanks.

> Basically we no longer pass a specific option but rely on pkgconfig.
> There is small change to generate the .pc files that Intel will make available by end of year. Still the related change in DPDK is available now.

It means we depend on a future version of Flexran?
Please could you document the minimum version?

Note: I think you messed tab indents in the meson file.



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

* RE: [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option
  2022-06-28 10:07 ` [PATCH v2] baseband/turbo_sw: Remove flexran_sdk " Thomas Monjalon
@ 2022-06-29  0:16   ` Chautru, Nicolas
  2022-06-29  7:10     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Chautru, Nicolas @ 2022-06-29  0:16 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

> From: Thomas Monjalon <thomas@monjalon.net>
> 
> 27/06/2022 22:29, Nicolas Chautru:
> > Hi Thomas,
> > This is change you requested earlier this year. This is targeting 22.11.
> 
> OK thanks.
> 
> > Basically we no longer pass a specific option but rely on pkgconfig.
> > There is small change to generate the .pc files that Intel will make available
> by end of year. Still the related change in DPDK is available now.
> 
> It means we depend on a future version of Flexran?
> Please could you document the minimum version?

I expect the new version to be available in FlexRAN 22.11 (hence in November as well). Is that a concern?

> 
> Note: I think you messed tab indents in the meson file.
> 

Thanks. Will fix now and send a v3

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

* Re: [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option
  2022-06-29  0:16   ` Chautru, Nicolas
@ 2022-06-29  7:10     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2022-06-29  7:10 UTC (permalink / raw)
  To: Chautru, Nicolas; +Cc: dev

29/06/2022 02:16, Chautru, Nicolas:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > 
> > 27/06/2022 22:29, Nicolas Chautru:
> > > Hi Thomas,
> > > This is change you requested earlier this year. This is targeting 22.11.
> > 
> > OK thanks.
> > 
> > > Basically we no longer pass a specific option but rely on pkgconfig.
> > > There is small change to generate the .pc files that Intel will make available
> > by end of year. Still the related change in DPDK is available now.
> > 
> > It means we depend on a future version of Flexran?
> > Please could you document the minimum version?
> 
> I expect the new version to be available in FlexRAN 22.11 (hence in November as well). Is that a concern?

One concern is to be able to test.
I guess it won't be an issue for you.

The other concern is to mandate the new version to the users.
I am fine with that as long as it is documented.



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

end of thread, other threads:[~2022-06-29  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 20:29 [PATCH v2] baseband/turbo_sw: Remove flexran_sdk meson option Nicolas Chautru
2022-06-27 20:29 ` [PATCH v2] baseband/turbo_sw: remove Flexran SDK " Nicolas Chautru
2022-06-28 10:07 ` [PATCH v2] baseband/turbo_sw: Remove flexran_sdk " Thomas Monjalon
2022-06-29  0:16   ` Chautru, Nicolas
2022-06-29  7:10     ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.