1b8cfe2c9SAmr Mokhtar.. SPDX-License-Identifier: BSD-3-Clause 2b8cfe2c9SAmr Mokhtar Copyright(c) 2017 Intel Corporation 3b8cfe2c9SAmr Mokhtar 4b8cfe2c9SAmr MokhtarSW Turbo Poll Mode Driver 5b8cfe2c9SAmr Mokhtar========================= 6b8cfe2c9SAmr Mokhtar 7848bf218SNicolas ChautruThe SW Turbo PMD (**baseband_turbo_sw**) provides a software only poll mode bbdev 8bc2254d3SNicolas Chautrudriver that can optionally utilize Intel optimized libraries for LTE and 5GNR 9bc2254d3SNicolas ChautruLayer 1 workloads acceleration. 10848bf218SNicolas Chautru 11848bf218SNicolas ChautruNote that the driver can also be built without any dependency with reduced 12848bf218SNicolas Chautrufunctionality for maintenance purpose. 13848bf218SNicolas Chautru 14848bf218SNicolas ChautruTo enable linking to the SDK libraries see detailed installation section below. 15848bf218SNicolas Chautru 16848bf218SNicolas ChautruThis PMD supports the functions: FEC, Rate Matching and CRC functions detailed 17848bf218SNicolas Chautruin the Features section. 18b8cfe2c9SAmr Mokhtar 19b8cfe2c9SAmr MokhtarFeatures 20b8cfe2c9SAmr Mokhtar-------- 21b8cfe2c9SAmr Mokhtar 22848bf218SNicolas ChautruSW Turbo PMD can support for the following capabilities when the SDK libraries 23848bf218SNicolas Chautruare used: 24b8cfe2c9SAmr Mokhtar 25848bf218SNicolas ChautruFor the LTE encode operation: 26b8cfe2c9SAmr Mokhtar 27b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` 28b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` 29b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_RATE_MATCH`` 30b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS`` 31b8cfe2c9SAmr Mokhtar 32848bf218SNicolas ChautruFor the LTE decode operation: 33b8cfe2c9SAmr Mokhtar 34b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE`` 35b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_CRC_TYPE_24B`` 36b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN`` 37b8cfe2c9SAmr Mokhtar* ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN`` 38795ae2dfSKamil Chalupnik* ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP`` 39795ae2dfSKamil Chalupnik* ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` 40b8cfe2c9SAmr Mokhtar 41bc2254d3SNicolas ChautruFor the 5G NR LDPC encode operation: 42bc2254d3SNicolas Chautru 43bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_RATE_MATCH`` 44bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_CRC_24A_ATTACH`` 45bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_CRC_24B_ATTACH`` 46bc2254d3SNicolas Chautru 47bc2254d3SNicolas ChautruFor the 5G NR LDPC decode operation: 48bc2254d3SNicolas Chautru 49bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK`` 50bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_CRC_TYPE_24A_CHECK`` 51bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_CRC_TYPE_24B_DROP`` 52bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_HQ_COMBINE_IN_ENABLE`` 53bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_HQ_COMBINE_OUT_ENABLE`` 54bc2254d3SNicolas Chautru* ``RTE_BBDEV_LDPC_ITERATION_STOP_ENABLE`` 55b8cfe2c9SAmr Mokhtar 56b8cfe2c9SAmr MokhtarLimitations 57b8cfe2c9SAmr Mokhtar----------- 58b8cfe2c9SAmr Mokhtar 59bc2254d3SNicolas Chautru* In-place operations for encode and decode are not supported 60b8cfe2c9SAmr Mokhtar 61b8cfe2c9SAmr MokhtarInstallation 62b8cfe2c9SAmr Mokhtar------------ 63b8cfe2c9SAmr Mokhtar 64b8cfe2c9SAmr MokhtarFlexRAN SDK Download 65b8cfe2c9SAmr Mokhtar~~~~~~~~~~~~~~~~~~~~ 66b8cfe2c9SAmr Mokhtar 67848bf218SNicolas ChautruAs an option it is possible to link this driver with FleXRAN SDK libraries 68848bf218SNicolas Chautruwhich can enable real time signal processing using AVX instructions. 69b8cfe2c9SAmr Mokhtar 70*1e0c6ba6SHernan VargasThese libraries are available through this `link 71*1e0c6ba6SHernan Vargas<https://github.com/intel/FlexRAN-FEC-SDK-Modules/tree/Branch_FEC_SDK_23.07>`_. 72b8cfe2c9SAmr Mokhtar 73b8cfe2c9SAmr MokhtarAfter download is complete, the user needs to unpack and compile on their 74b8cfe2c9SAmr Mokhtarsystem before building DPDK. 75b8cfe2c9SAmr Mokhtar 76*1e0c6ba6SHernan VargasTo get the FlexRAN FEC SDK user manual, extract this `doxygen 77*1e0c6ba6SHernan Vargas<https://github.com/intel/FlexRAN-FEC-SDK-Modules/blob/Branch_FEC_SDK_23.07/doc/doxygen/html.zip>`_. 78*1e0c6ba6SHernan Vargas 79b15a4548SKamil ChalupnikThe following table maps DPDK versions with past FlexRAN SDK releases: 80b15a4548SKamil Chalupnik 81b15a4548SKamil Chalupnik.. _table_flexran_releases: 82b15a4548SKamil Chalupnik 83848bf218SNicolas Chautru.. table:: DPDK and FlexRAN FEC SDK releases compliance 84b15a4548SKamil Chalupnik 85b15a4548SKamil Chalupnik ===================== ============================ 86848bf218SNicolas Chautru DPDK version FlexRAN FEC SDK release 87b15a4548SKamil Chalupnik ===================== ============================ 883b5b854bSNicolas Chautru 19.08 to 22.07 19.04 893b5b854bSNicolas Chautru 22.11+ 22.11 90*1e0c6ba6SHernan Vargas 23.11+ FEC_SDK_23.07 91b15a4548SKamil Chalupnik ===================== ============================ 92b15a4548SKamil Chalupnik 93b8cfe2c9SAmr MokhtarFlexRAN SDK Installation 94b8cfe2c9SAmr Mokhtar~~~~~~~~~~~~~~~~~~~~~~~~ 95b8cfe2c9SAmr Mokhtar 96848bf218SNicolas ChautruNote that the installation of these libraries is optional. 97848bf218SNicolas Chautru 98b8cfe2c9SAmr MokhtarThe following are pre-requisites for building FlexRAN SDK Libraries: 99*1e0c6ba6SHernan Vargas (a) An AVX512 supporting machine. 100*1e0c6ba6SHernan Vargas (b) Ubuntu Linux release 22.04 operating system is advised. 101*1e0c6ba6SHernan Vargas (c) Intel ICX 2023.0.0 compiler or more recent and related libraries. 102*1e0c6ba6SHernan Vargas ICX is available `here <https://docs.o-ran-sc.org/projects/o-ran-sc-o-du-phy/en/latest/build_prerequisite.html#download-and-install-oneapi>`_. 103*1e0c6ba6SHernan Vargas (d) `FlexRAN SDK Modules <https://github.com/intel/FlexRAN-FEC-SDK-Modules/tree/Branch_FEC_SDK_23.07>`_. 104*1e0c6ba6SHernan Vargas (e) CMake 3.9.2 (Minimum 2.8.12) 105*1e0c6ba6SHernan Vargas (f) Google Test 1.7.0 (Required to run the verification and compute performance tests) 106*1e0c6ba6SHernan Vargas (g) Math Kernel Library 18.0 (Required by some functions in SDK) 107b8cfe2c9SAmr Mokhtar 108b8cfe2c9SAmr MokhtarThe following instructions should be followed in this exact order: 109b8cfe2c9SAmr Mokhtar 110*1e0c6ba6SHernan Vargas#. Clone the SDK (folder name needs to end in 'sdk') 111*1e0c6ba6SHernan Vargas 112*1e0c6ba6SHernan Vargas .. code-block:: console 113*1e0c6ba6SHernan Vargas 114*1e0c6ba6SHernan Vargas git clone -b Branch_FEC_SDK_23.07 https://github.com/intel/FlexRAN-FEC-SDK-Modules.git flexran_sdk 115*1e0c6ba6SHernan Vargas 116b8cfe2c9SAmr Mokhtar#. Set the environment variables: 117b8cfe2c9SAmr Mokhtar 118b8cfe2c9SAmr Mokhtar .. code-block:: console 119b8cfe2c9SAmr Mokhtar 120*1e0c6ba6SHernan Vargas source <path-to-workspace>/export_settings.sh -o -avx512 121b8cfe2c9SAmr Mokhtar 122b8cfe2c9SAmr Mokhtar#. Generate makefiles based on system configuration: 123b8cfe2c9SAmr Mokhtar 124b8cfe2c9SAmr Mokhtar .. code-block:: console 125b8cfe2c9SAmr Mokhtar 126*1e0c6ba6SHernan Vargas cd <path-to-workspace> 127b8cfe2c9SAmr Mokhtar ./create-makefiles-linux.sh 128b8cfe2c9SAmr Mokhtar 129b8cfe2c9SAmr Mokhtar#. A build folder is generated in this form ``build-<ISA>-<CC>``, enter that 130b8cfe2c9SAmr Mokhtar folder and install: 131b8cfe2c9SAmr Mokhtar 132b8cfe2c9SAmr Mokhtar .. code-block:: console 133b8cfe2c9SAmr Mokhtar 134*1e0c6ba6SHernan Vargas cd <path-to-workspace>/build-${WIRELESS_SDK_TARGET_ISA}-${WIRELESS_SDK_TOOLCHAIN}/ 135*1e0c6ba6SHernan Vargas make -j$(nproc) && make install 136b8cfe2c9SAmr Mokhtar 137*1e0c6ba6SHernan VargasDPDK Initialization 138*1e0c6ba6SHernan Vargas~~~~~~~~~~~~~~~~~~~ 139b8cfe2c9SAmr Mokhtar 140bc2254d3SNicolas ChautruIn order to enable this virtual bbdev PMD, the user may: 141b8cfe2c9SAmr Mokhtar 142b8cfe2c9SAmr Mokhtar* Build the ``FLEXRAN SDK`` libraries (explained in Installation section). 143b8cfe2c9SAmr Mokhtar 144b8cfe2c9SAmr Mokhtar* Export the environmental variables ``FLEXRAN_SDK`` to the path where the 145b8cfe2c9SAmr Mokhtar FlexRAN SDK libraries were installed. And ``DIR_WIRELESS_SDK`` to the path 146b8cfe2c9SAmr Mokhtar where the libraries were extracted. 147b8cfe2c9SAmr Mokhtar 1483b5b854bSNicolas Chautru* Point pkgconfig towards these libraries so that they can be automatically found by meson. 1493b5b854bSNicolas Chautru If not, DPDK will still compile but the related functionality would be stubbed out. 15007a2a572SCiara Power 151b8cfe2c9SAmr MokhtarExample: 152b8cfe2c9SAmr Mokhtar 153b8cfe2c9SAmr Mokhtar.. code-block:: console 154b8cfe2c9SAmr Mokhtar 155*1e0c6ba6SHernan Vargas export FLEXRAN_SDK=<path-to-workspace>/build-${WIRELESS_SDK_TARGET_ISA}-${WIRELESS_SDK_TOOLCHAIN}/install 156*1e0c6ba6SHernan Vargas export DIR_WIRELESS_SDK=<path-to-workspace>/build-${WIRELESS_SDK_TARGET_ISA}-${WIRELESS_SDK_TOOLCHAIN} 157*1e0c6ba6SHernan Vargas export PKG_CONFIG_PATH=${DIR_WIRELESS_SDK}/pkgcfg:${PKG_CONFIG_PATH} 15807a2a572SCiara Power cd build 1593b5b854bSNicolas Chautru meson configure 160b8cfe2c9SAmr Mokhtar 16107a2a572SCiara Power* For AVX512 machines with SDK libraries installed then both 4G and 5G can be enabled for full real time FEC capability. 16207a2a572SCiara Power For AVX2 machines it is possible to only enable the 4G libraries and the PMD capabilities will be limited to 4G FEC. 163f8dbaebbSSean Morrissey If no library is present then the PMD will still build but its capabilities will be limited accordingly. 16407a2a572SCiara Power 165*1e0c6ba6SHernan VargasSW Turbo PMD Usage 166*1e0c6ba6SHernan Vargas~~~~~~~~~~~~~~~~~~ 167b8cfe2c9SAmr Mokhtar 168b8cfe2c9SAmr MokhtarTo use the PMD in an application, user must: 169b8cfe2c9SAmr Mokhtar 1707ce00bf3SKamil Chalupnik- Call ``rte_vdev_init("baseband_turbo_sw")`` within the application. 171b8cfe2c9SAmr Mokhtar 1727ce00bf3SKamil Chalupnik- Use ``--vdev="baseband_turbo_sw"`` in the EAL options, which will call ``rte_vdev_init()`` internally. 173b8cfe2c9SAmr Mokhtar 174b8cfe2c9SAmr MokhtarThe following parameters (all optional) can be provided in the previous two calls: 175b8cfe2c9SAmr Mokhtar 176b8cfe2c9SAmr Mokhtar* ``socket_id``: Specify the socket where the memory for the device is going to be allocated 177b8cfe2c9SAmr Mokhtar (by default, *socket_id* will be the socket where the core that is creating the PMD is running on). 178b8cfe2c9SAmr Mokhtar 179b8cfe2c9SAmr Mokhtar* ``max_nb_queues``: Specify the maximum number of queues in the device (default is ``RTE_MAX_LCORE``). 180b8cfe2c9SAmr Mokhtar 181b8cfe2c9SAmr MokhtarExample: 182b8cfe2c9SAmr Mokhtar 183b8cfe2c9SAmr Mokhtar.. code-block:: console 184b8cfe2c9SAmr Mokhtar 1857ce00bf3SKamil Chalupnik ./test-bbdev.py -e="--vdev=baseband_turbo_sw,socket_id=0,max_nb_queues=8" \ 186b9cf7fe6SAmr Mokhtar -c validation -v ./turbo_*_default.data 187