From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D3793A0553; Wed, 29 Jun 2022 02:25:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A433941138; Wed, 29 Jun 2022 02:25:50 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 6A96A40042 for ; Wed, 29 Jun 2022 02:25:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656462348; x=1687998348; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=2bSy7pw8PntIoJF3cUnJup483C1oTJcBU2UQe1vQfRk=; b=B3SbZr/lZ+V4j80XFvX3ExJTp6qXiYMPrKnwBYa55OOvGYRgoNe51JXp CoIEJmynPqMlV+r8t6rLpK+hZk/It8fS91mywpuETg3dUT3i055cokhDU RqnuC0A3YtxIKaHVP6Dl/WhsEy6wGJY7SrKjR/cx5bT5HfrhcTQocf/kx y1f5DSAA8uF2oA2XvJtkQgJFWgBdep8G+26CUum+7C9VZd1ubhjBf5aGV nMq63YTl/+dslw9My2l97w75qck0zZ74rH9/FU4suxmTrxHfZAgEnbVjT Y0lI6EPUtU4g4vQUw2Dj90rxaL8plGUKFeGqIZ7R/jJ9bQRgmogYvBWXF A==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="264922033" X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="264922033" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 17:25:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="917385274" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by fmsmga005.fm.intel.com with ESMTP; 28 Jun 2022 17:25:46 -0700 From: Nicolas Chautru To: dev@dpdk.org, thomas@monjalon.net Cc: Nicolas Chautru Subject: [PATCH v3] baseband/turbo_sw: remove Flexran SDK meson option Date: Tue, 28 Jun 2022 17:12:36 -0700 Message-Id: <1656461556-130563-2-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1656461556-130563-1-git-send-email-nicolas.chautru@intel.com> References: <1656461556-130563-1-git-send-email-nicolas.chautru@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The related dependency to build the PMD based on the SDK libraries is now enabled through pkfconfig. Signed-off-by: Nicolas Chautru --- 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=/FlexRAN-FEC-SDK-19-04/sdk/build-avx2-icc/install export DIR_WIRELESS_SDK=/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=/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..417ec63 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