From patchwork Wed Jun 19 17:11:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 55082 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4D3B1D0AF; Wed, 19 Jun 2019 19:12:05 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0CF0B1C432 for ; Wed, 19 Jun 2019 19:12:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 10:11:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,393,1557212400"; d="scan'208";a="150665853" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga007.jf.intel.com with ESMTP; 19 Jun 2019 10:11:59 -0700 From: Nicolas Chautru To: akhil.goyal@nxp.com, dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, amr.mokhtar@intel.com, kamilx.chalupnik@intel.com, Nicolas Chautru Date: Wed, 19 Jun 2019 10:11:12 -0700 Message-Id: <1560964274-83070-2-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> References: <1560444716-18594-2-git-send-email-nicolas.chautru@intel.com> <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v6 1/3] baseband/turbo_sw: option to build turbosw PMD without SDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adding compile flag to allow to build the turbo_sw PMD without dependency to have the SDK libraries installed. Acked-by: Kamil Chalupnik Acked-by: Nicolas Chautru Signed-off-by: Nicolas Chautru --- config/common_base | 3 +- drivers/baseband/turbo_sw/Makefile | 13 +++---- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 45 +++++++++++++++++++++++- mk/rte.app.mk | 3 ++ 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/config/common_base b/config/common_base index 6b96e0e..bc80209 100644 --- a/config/common_base +++ b/config/common_base @@ -523,6 +523,7 @@ CONFIG_RTE_PMD_PACKET_PREFETCH=y CONFIG_RTE_LIBRTE_BBDEV=y CONFIG_RTE_BBDEV_MAX_DEVS=128 CONFIG_RTE_BBDEV_OFFLOAD_COST=y +CONFIG_RTE_BBDEV_SDK_AVX2=n # # Compile PMD for NULL bbdev device @@ -532,7 +533,7 @@ CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL=y # # Compile PMD for turbo software bbdev device # -CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=n +CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y # # Compile generic crypto device library diff --git a/drivers/baseband/turbo_sw/Makefile b/drivers/baseband/turbo_sw/Makefile index d364677..414d0d9 100644 --- a/drivers/baseband/turbo_sw/Makefile +++ b/drivers/baseband/turbo_sw/Makefile @@ -3,9 +3,6 @@ include $(RTE_SDK)/mk/rte.vars.mk -ifeq ($(FLEXRAN_SDK),) -$(error "Please define FLEXRAN_SDK environment variable") -endif # library name LIB = librte_pmd_bbdev_turbo_sw.a @@ -21,17 +18,21 @@ LDLIBS += -lrte_bus_vdev # versioning export map EXPORT_MAP := rte_pmd_bbdev_turbo_sw_version.map -# external library dependencies +# external library dependencies if available +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +ifeq ($(FLEXRAN_SDK),) +$(error "Please define FLEXRAN_SDK environment variable") +endif CFLAGS += -I$(FLEXRAN_SDK)/lib_common CFLAGS += -I$(FLEXRAN_SDK)/lib_turbo CFLAGS += -I$(FLEXRAN_SDK)/lib_crc CFLAGS += -I$(FLEXRAN_SDK)/lib_rate_matching - LDLIBS += -L$(FLEXRAN_SDK)/lib_turbo -lturbo LDLIBS += -L$(FLEXRAN_SDK)/lib_crc -lcrc LDLIBS += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching LDLIBS += -L$(FLEXRAN_SDK)/lib_common -lcommon -LDLIBS += -lstdc++ -lirc -limf -lipps +LDLIBS += -lstdc++ -lirc -limf -lipps -lsvml +endif # library version LIBABIVER := 1 diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c index 5204a77..cac8920 100644 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c @@ -14,10 +14,11 @@ #include #include +#ifdef RTE_BBDEV_SDK_AVX2 #include #include #include -#include +#endif #define DRIVER_NAME baseband_turbo_sw @@ -83,6 +84,7 @@ struct turbo_sw_queue { enum rte_bbdev_op_type type; } __rte_cache_aligned; +#ifdef RTE_BBDEV_SDK_AVX2 static inline char * mbuf_append(struct rte_mbuf *m_head, struct rte_mbuf *m, uint16_t len) { @@ -128,6 +130,7 @@ struct turbo_sw_queue { return result; } +#endif /* Read flag value 0/1 from bitmap */ static inline bool @@ -143,6 +146,7 @@ struct turbo_sw_queue { struct bbdev_private *internals = dev->data->dev_private; static const struct rte_bbdev_op_cap bbdev_capabilities[] = { +#ifdef RTE_BBDEV_SDK_AVX2 { .type = RTE_BBDEV_OP_TURBO_DEC, .cap.turbo_dec = { @@ -172,6 +176,7 @@ struct turbo_sw_queue { .num_buffers_dst = RTE_BBDEV_MAX_CODE_BLOCKS, } }, +#endif RTE_BBDEV_END_OF_CAPABILITIES_LIST() }; @@ -410,6 +415,7 @@ struct turbo_sw_queue { .queue_release = q_release }; +#ifdef RTE_BBDEV_SDK_AVX2 /* Checks if the encoder input buffer is correct. * Returns 0 if it's valid, -1 otherwise. */ @@ -464,6 +470,7 @@ struct turbo_sw_queue { return 0; } +#endif static inline void process_enc_cb(struct turbo_sw_queue *q, struct rte_bbdev_enc_op *op, @@ -472,6 +479,7 @@ struct turbo_sw_queue { struct rte_mbuf *m_out, uint16_t in_offset, uint16_t out_offset, uint16_t in_length, struct rte_bbdev_stats *q_stats) { +#ifdef RTE_BBDEV_SDK_AVX2 int ret; int16_t k_idx; uint16_t m; @@ -724,6 +732,22 @@ struct turbo_sw_queue { } *tmp_out = 0; } +#else + RTE_SET_USED(q); + RTE_SET_USED(op); + RTE_SET_USED(r); + RTE_SET_USED(c); + RTE_SET_USED(k); + RTE_SET_USED(ncb); + RTE_SET_USED(e); + RTE_SET_USED(m_in); + RTE_SET_USED(m_out_head); + RTE_SET_USED(m_out); + RTE_SET_USED(in_offset); + RTE_SET_USED(out_offset); + RTE_SET_USED(in_length); + RTE_SET_USED(q_stats); +#endif } static inline void @@ -835,6 +859,7 @@ struct turbo_sw_queue { NULL); } +#ifdef RTE_BBDEV_SDK_AVX2 static inline void move_padding_bytes(const uint8_t *in, uint8_t *out, uint16_t k, uint16_t ncb) @@ -847,6 +872,7 @@ struct turbo_sw_queue { rte_memcpy(&out[nd + kpi + 64], &in[kpi], d); rte_memcpy(&out[(nd - 1) + 2 * (kpi + 64)], &in[2 * kpi], d); } +#endif static inline void process_dec_cb(struct turbo_sw_queue *q, struct rte_bbdev_dec_op *op, @@ -856,6 +882,7 @@ struct turbo_sw_queue { uint16_t crc24_overlap, uint16_t in_length, struct rte_bbdev_stats *q_stats) { +#ifdef RTE_BBDEV_SDK_AVX2 int ret; int32_t k_idx; int32_t iter_cnt; @@ -972,6 +999,22 @@ struct turbo_sw_queue { rte_bbdev_log(ERR, "Turbo Decoder failed"); return; } +#else + RTE_SET_USED(q); + RTE_SET_USED(op); + RTE_SET_USED(c); + RTE_SET_USED(k); + RTE_SET_USED(kw); + RTE_SET_USED(m_in); + RTE_SET_USED(m_out_head); + RTE_SET_USED(m_out); + RTE_SET_USED(in_offset); + RTE_SET_USED(out_offset); + RTE_SET_USED(check_crc_24b); + RTE_SET_USED(crc24_overlap); + RTE_SET_USED(in_length); + RTE_SET_USED(q_stats); +#endif } static inline void diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 7c9b4b5..878cc31 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -221,11 +221,14 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_NULL) += -lrte_pmd_bbdev_null # TURBO SOFTWARE PMD is dependent on the FLEXRAN library _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lrte_pmd_bbdev_turbo_sw +ifeq ($(CONFIG_RTE_BBDEV_SDK_AVX2),y) +# Dependency on the FLEXRAN SDK library if available _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_crc -lcrc _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_turbo -lturbo _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_rate_matching -lrate_matching _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -L$(FLEXRAN_SDK)/lib_common -lcommon _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW) += -lirc -limf -lstdc++ -lipps +endif # CONFIG_RTE_BBDEV_SDK_AVX2 endif # CONFIG_RTE_LIBRTE_BBDEV ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) From patchwork Wed Jun 19 17:11:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 55083 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F2861D0DC; Wed, 19 Jun 2019 19:12:08 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 71CEB1C47D for ; Wed, 19 Jun 2019 19:12:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 10:12:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,393,1557212400"; d="scan'208";a="150665859" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga007.jf.intel.com with ESMTP; 19 Jun 2019 10:11:59 -0700 From: Nicolas Chautru To: akhil.goyal@nxp.com, dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, amr.mokhtar@intel.com, kamilx.chalupnik@intel.com, Nicolas Chautru Date: Wed, 19 Jun 2019 10:11:13 -0700 Message-Id: <1560964274-83070-3-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> References: <1560444716-18594-2-git-send-email-nicolas.chautru@intel.com> <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v6 2/3] docs/guides: updating turbo_sw building steps X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The documentation is clarified to point to steps on building the SDK libraries which are now publicly available: https://software.intel.com/en-us/articles/flexran-lte-and-5g-nr-fec-software-development-kit-modules Acked-by: Kamil Chalupnik Acked-by: Nicolas Chautru Signed-off-by: Nicolas Chautru --- doc/guides/bbdevs/turbo_sw.rst | 81 +++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/doc/guides/bbdevs/turbo_sw.rst b/doc/guides/bbdevs/turbo_sw.rst index 29f7ec9..455fa1d 100644 --- a/doc/guides/bbdevs/turbo_sw.rst +++ b/doc/guides/bbdevs/turbo_sw.rst @@ -4,23 +4,39 @@ SW Turbo Poll Mode Driver ========================= -The SW Turbo PMD (**baseband_turbo_sw**) provides a poll mode bbdev driver that utilizes -Intel optimized libraries for LTE Layer 1 workloads acceleration. This PMD -supports the functions: Turbo FEC, Rate Matching and CRC functions. +The SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev +driver that can optionally utilize Intel optimized libraries for LTE Layer 1 +workloads acceleration. + +Note that the driver can also be built without any dependency with reduced +functionality for maintenance purpose. + +To enable linking to the SDK libraries see detailed installation section below. +One flag can be enabled depending on whether the target machine can support +AVX2 instructions sets and the related SDK libraries for vectorized +signal processing functions are installed : +- CONFIG_RTE_BBDEV_SDK_AVX2 + +By default this flag is disabled. For AVX2 machine and SDK +library installed then this flag can be enabled. + +This PMD supports the functions: FEC, Rate Matching and CRC functions detailed +in the Features section. Features -------- -SW Turbo PMD has support for the following capabilities: +SW Turbo PMD can support for the following capabilities when the SDK libraries +are used: -For the encode operation: +For the LTE encode operation: * ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` * ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` * ``RTE_BBDEV_TURBO_RATE_MATCH`` * ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS`` -For the decode operation: +For the LTE decode operation: * ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE`` * ``RTE_BBDEV_TURBO_CRC_TYPE_24B`` @@ -41,14 +57,10 @@ Installation FlexRAN SDK Download ~~~~~~~~~~~~~~~~~~~~ -To build DPDK with the *baseband_turbo_sw* PMD the user is required to download -the export controlled ``FlexRAN SDK`` Libraries. An account at `Intel Resource -Design Center `_ -needs to be registered. +As an option it is possible to link this driver with FleXRAN SDK libraries +which can enable real time signal processing using AVX instructions. -Once registered, the user needs to log in, and look for -*Intel FlexRAN Software Release Package -18-09* to download or directly through -this `link `_. +These libraries are available through this link `link `_. After download is complete, the user needs to unpack and compile on their system before building DPDK. @@ -57,24 +69,24 @@ The following table maps DPDK versions with past FlexRAN SDK releases: .. _table_flexran_releases: -.. table:: DPDK and FlexRAN SDK releases compliance +.. table:: DPDK and FlexRAN FEC SDK releases compliance ===================== ============================ - DPDK version FlexRAN SDK release + DPDK version FlexRAN FEC SDK release ===================== ============================ - 18.02 1.3.0 - 18.05 1.4.0 - 18.08 1.6.0 - 19.02 18.09 + 19.08 19.04 ===================== ============================ FlexRAN SDK Installation ~~~~~~~~~~~~~~~~~~~~~~~~ +Note that the installation of these libraries is optional. + The following are pre-requisites for building FlexRAN SDK Libraries: - (a) An AVX2 supporting machine - (b) CentOS Linux release 7.2.1511 (Core) operating system - (c) Intel ICC 18.0.1 20171018 compiler installed + (a) An AVX2 or AVX512 supporting machine + (b) CentOS Linux release 7.2.1511 (Core) operating system is advised + (c) Intel ICC 18.0.1 20171018 compiler or more recent and related libraries + ICC is available with a free community license `link `_. The following instructions should be followed in this exact order: @@ -84,25 +96,18 @@ The following instructions should be followed in this exact order: source /linux/bin/compilervars.sh intel64 -platform linux -#. Extract the ``605167-flexran-18-09-tar.gz`` package: - - .. code-block:: console - - mkdir FlexRAN-18.09 - tar xvzf 605167-flexran-18-09-tar.gz -C FlexRAN-18.09/ - #. Run the SDK extractor script and accept the license: .. code-block:: console - cd /FlexRAN-18.09/ - ./SDK-18.09.sh + cd + ./FlexRAN-FEC-SDK-19-04.sh #. Generate makefiles based on system configuration: .. code-block:: console - cd /FlexRAN-18.09/SDK-18.09/sdk/ + cd /FlexRAN-FEC-SDK-19-04/sdk/ ./create-makefiles-linux.sh #. A build folder is generated in this form ``build--``, enter that @@ -129,12 +134,14 @@ Example: .. code-block:: console - export FLEXRAN_SDK=/FlexRAN-18.09/SDK-18.09/sdk/build-avx2-icc/install - export DIR_WIRELESS_SDK=/FlexRAN-18.09/SDK-18.09/sdk/ - + 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/ -* Set ``CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y`` in DPDK common configuration - file ``config/common_base``. +* Set ``CONFIG_RTE_BBDEV_SDK_AVX2=y`` + in DPDK common configuration file ``config/common_base`` to be able to use + the SDK libraries as mentioned above. + If no flag are set the PMD driver will still build but its capabilities + will be limited accordingly. To use the PMD in an application, user must: From patchwork Wed Jun 19 17:11:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 55084 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 939C21D0F8; Wed, 19 Jun 2019 19:12:11 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C9F161C5A2 for ; Wed, 19 Jun 2019 19:12:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2019 10:12:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,393,1557212400"; d="scan'208";a="150665865" Received: from skx-5gnr-sc12-4.sc.intel.com ([172.25.69.210]) by orsmga007.jf.intel.com with ESMTP; 19 Jun 2019 10:12:00 -0700 From: Nicolas Chautru To: akhil.goyal@nxp.com, dev@dpdk.org Cc: ferruh.yigit@intel.com, thomas@monjalon.net, amr.mokhtar@intel.com, kamilx.chalupnik@intel.com, Nicolas Chautru Date: Wed, 19 Jun 2019 10:11:14 -0700 Message-Id: <1560964274-83070-4-git-send-email-nicolas.chautru@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> References: <1560444716-18594-2-git-send-email-nicolas.chautru@intel.com> <1560964274-83070-1-git-send-email-nicolas.chautru@intel.com> Subject: [dpdk-dev] [PATCH v6 3/3] baseband/turbo_sw: meson build support for PMD driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Turbo_sw PMD driver now building with meson/ninja with or without SDK libraries. Acked-by: Kamil Chalupnik Acked-by: Nicolas Chautru Signed-off-by: Nicolas Chautru --- drivers/baseband/meson.build | 2 +- drivers/baseband/turbo_sw/meson.build | 30 ++++++++++++++++++++++++++++++ meson_options.txt | 2 ++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 drivers/baseband/turbo_sw/meson.build diff --git a/drivers/baseband/meson.build b/drivers/baseband/meson.build index 52489df..40a87d2 100644 --- a/drivers/baseband/meson.build +++ b/drivers/baseband/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi -drivers = ['null'] +drivers = ['null', 'turbo_sw'] config_flag_fmt = 'RTE_LIBRTE_@0@_PMD' driver_name_fmt = 'rte_pmd_@0@' diff --git a/drivers/baseband/turbo_sw/meson.build b/drivers/baseband/turbo_sw/meson.build new file mode 100644 index 0000000..9b4fe34 --- /dev/null +++ b/drivers/baseband/turbo_sw/meson.build @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2019 Intel Corporation + +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 + 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 +endif + +deps += ['bbdev', 'bus_vdev', 'ring'] +name = 'bbdev_turbo_sw' +allow_experimental_apis = true +sources = files('bbdev_turbo_software.c') diff --git a/meson_options.txt b/meson_options.txt index 16d9f92..92d3e97 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -10,6 +10,8 @@ option('enable_kmods', type: 'boolean', value: true, 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 : ['shared', 'dlopen'], value: 'shared', description: 'Linkage method (shared/dlopen) for Mellanox PMDs with ibverbs dependencies.') option('include_subdir_arch', type: 'string', value: '',