29f7ec9576f76c1fd65081ecf4e27ec79931b29a
[dpdk.git] / doc / guides / bbdevs / turbo_sw.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2017 Intel Corporation
3
4 SW Turbo Poll Mode Driver
5 =========================
6
7 The SW Turbo PMD (**baseband_turbo_sw**) provides a poll mode bbdev driver that utilizes
8 Intel optimized libraries for LTE Layer 1 workloads acceleration. This PMD
9 supports the functions: Turbo FEC, Rate Matching and CRC functions.
10
11 Features
12 --------
13
14 SW Turbo PMD has support for the following capabilities:
15
16 For the encode operation:
17
18 * ``RTE_BBDEV_TURBO_CRC_24A_ATTACH``
19 * ``RTE_BBDEV_TURBO_CRC_24B_ATTACH``
20 * ``RTE_BBDEV_TURBO_RATE_MATCH``
21 * ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS``
22
23 For the decode operation:
24
25 * ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE``
26 * ``RTE_BBDEV_TURBO_CRC_TYPE_24B``
27 * ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN``
28 * ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN``
29 * ``RTE_BBDEV_TURBO_DEC_TB_CRC_24B_KEEP``
30 * ``RTE_BBDEV_TURBO_EARLY_TERMINATION``
31
32
33 Limitations
34 -----------
35
36 * In-place operations for Turbo encode and decode are not supported
37
38 Installation
39 ------------
40
41 FlexRAN SDK Download
42 ~~~~~~~~~~~~~~~~~~~~
43
44 To build DPDK with the *baseband_turbo_sw* PMD the user is required to download
45 the export controlled ``FlexRAN SDK`` Libraries. An account at `Intel Resource
46 Design Center <https://www.intel.com/content/www/us/en/design/resource-design-center.html>`_
47 needs to be registered.
48
49 Once registered, the user needs to log in, and look for
50 *Intel FlexRAN Software Release Package -18-09* to download or directly through
51 this `link <https://cdrdv2.intel.com/v1/dl/getContent/605167>`_.
52
53 After download is complete, the user needs to unpack and compile on their
54 system before building DPDK.
55
56 The following table maps DPDK versions with past FlexRAN SDK releases:
57
58 .. _table_flexran_releases:
59
60 .. table:: DPDK and FlexRAN SDK releases compliance
61
62    =====================  ============================
63    DPDK version           FlexRAN SDK release
64    =====================  ============================
65    18.02                  1.3.0
66    18.05                  1.4.0
67    18.08                  1.6.0
68    19.02                  18.09
69    =====================  ============================
70
71 FlexRAN SDK Installation
72 ~~~~~~~~~~~~~~~~~~~~~~~~
73
74 The following are pre-requisites for building FlexRAN SDK Libraries:
75  (a) An AVX2 supporting machine
76  (b) CentOS Linux release 7.2.1511 (Core) operating system
77  (c) Intel ICC 18.0.1 20171018 compiler installed
78
79 The following instructions should be followed in this exact order:
80
81 #. Set the environment variables:
82
83     .. code-block:: console
84
85         source <path-to-icc-compiler-install-folder>/linux/bin/compilervars.sh intel64 -platform linux
86
87 #. Extract the ``605167-flexran-18-09-tar.gz`` package:
88
89     .. code-block:: console
90
91         mkdir FlexRAN-18.09
92         tar xvzf 605167-flexran-18-09-tar.gz -C FlexRAN-18.09/
93
94 #. Run the SDK extractor script and accept the license:
95
96     .. code-block:: console
97
98         cd <path-to-workspace>/FlexRAN-18.09/
99         ./SDK-18.09.sh
100
101 #. Generate makefiles based on system configuration:
102
103     .. code-block:: console
104
105         cd <path-to-workspace>/FlexRAN-18.09/SDK-18.09/sdk/
106         ./create-makefiles-linux.sh
107
108 #. A build folder is generated in this form ``build-<ISA>-<CC>``, enter that
109    folder and install:
110
111     .. code-block:: console
112
113         cd build-avx2-icc/
114         make && make install
115
116
117 Initialization
118 --------------
119
120 In order to enable this virtual bbdev PMD, the user must:
121
122 * Build the ``FLEXRAN SDK`` libraries (explained in Installation section).
123
124 * Export the environmental variables ``FLEXRAN_SDK`` to the path where the
125   FlexRAN SDK libraries were installed. And ``DIR_WIRELESS_SDK`` to the path
126   where the libraries were extracted.
127
128 Example:
129
130 .. code-block:: console
131
132     export FLEXRAN_SDK=<path-to-workspace>/FlexRAN-18.09/SDK-18.09/sdk/build-avx2-icc/install
133     export DIR_WIRELESS_SDK=<path-to-workspace>/FlexRAN-18.09/SDK-18.09/sdk/
134
135
136 * Set ``CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y`` in DPDK common configuration
137   file ``config/common_base``.
138
139 To use the PMD in an application, user must:
140
141 - Call ``rte_vdev_init("baseband_turbo_sw")`` within the application.
142
143 - Use ``--vdev="baseband_turbo_sw"`` in the EAL options, which will call ``rte_vdev_init()`` internally.
144
145 The following parameters (all optional) can be provided in the previous two calls:
146
147 * ``socket_id``: Specify the socket where the memory for the device is going to be allocated
148   (by default, *socket_id* will be the socket where the core that is creating the PMD is running on).
149
150 * ``max_nb_queues``: Specify the maximum number of queues in the device (default is ``RTE_MAX_LCORE``).
151
152 Example:
153 ~~~~~~~~
154
155 .. code-block:: console
156
157     ./test-bbdev.py -e="--vdev=baseband_turbo_sw,socket_id=0,max_nb_queues=8" \
158     -c validation -v ./turbo_*_default.data