1f714a188SAmr Mokhtar.. SPDX-License-Identifier: BSD-3-Clause 2f714a188SAmr Mokhtar Copyright(c) 2017 Intel Corporation 3f714a188SAmr Mokhtar 4f714a188SAmr Mokhtardpdk-test-bbdev Application 5f714a188SAmr Mokhtar=========================== 6f714a188SAmr Mokhtar 7f714a188SAmr MokhtarThe ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that 8f714a188SAmr Mokhtarallows measuring performance parameters of PMDs available in the bbdev framework. 9f714a188SAmr MokhtarAvailable tests available for execution are: latency, throughput, validation and 10f714a188SAmr Mokhtarsanity tests. Execution of tests can be customized using various parameters 11f714a188SAmr Mokhtarpassed to a python running script. 12f714a188SAmr Mokhtar 13f714a188SAmr MokhtarCompiling the Application 14f714a188SAmr Mokhtar------------------------- 15f714a188SAmr Mokhtar 16f714a188SAmr Mokhtar**Step 1: PMD setting** 17f714a188SAmr Mokhtar 18f714a188SAmr MokhtarThe ``dpdk-test-bbdev`` tool depends on crypto device drivers PMD which 19f714a188SAmr Mokhtarare disabled by default in the build configuration file ``common_base``. 20f714a188SAmr MokhtarThe bbdevice drivers PMD which should be tested can be enabled by setting 21f714a188SAmr Mokhtar 22f714a188SAmr Mokhtar ``CONFIG_RTE_LIBRTE_PMD_<name>=y`` 23f714a188SAmr Mokhtar 247ce00bf3SKamil ChalupnikSetting example for (*baseband_turbo_sw*) PMD 25f714a188SAmr Mokhtar 26f714a188SAmr Mokhtar ``CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y`` 27f714a188SAmr Mokhtar 28f714a188SAmr Mokhtar**Step 2: Build the application** 29f714a188SAmr Mokhtar 30f714a188SAmr MokhtarExecute the ``dpdk-setup.sh`` script to build the DPDK library together with the 31f714a188SAmr Mokhtar``dpdk-test-bbdev`` application. 32f714a188SAmr Mokhtar 33f714a188SAmr MokhtarInitially, the user must select a DPDK target to choose the correct target type 34f714a188SAmr Mokhtarand compiler options to use when building the libraries. 35f714a188SAmr MokhtarThe user must have all libraries, modules, updates and compilers installed 36f714a188SAmr Mokhtarin the system prior to this, as described in the earlier chapters in this 37f714a188SAmr MokhtarGetting Started Guide. 38f714a188SAmr Mokhtar 39f714a188SAmr MokhtarRunning the Application 40f714a188SAmr Mokhtar----------------------- 41f714a188SAmr Mokhtar 42f714a188SAmr MokhtarThe tool application has a number of command line options: 43f714a188SAmr Mokhtar 44f714a188SAmr Mokhtar.. code-block:: console 45f714a188SAmr Mokhtar 46f714a188SAmr Mokhtar python test-bbdev.py [-h] [-p TESTAPP_PATH] [-e EAL_PARAMS] [-t TIMEOUT] 47f714a188SAmr Mokhtar [-c TEST_CASE [TEST_CASE ...]] 48f714a188SAmr Mokhtar [-v TEST_VECTOR [TEST_VECTOR...]] [-n NUM_OPS] 49f714a188SAmr Mokhtar [-b BURST_SIZE [BURST_SIZE ...]] [-l NUM_LCORES] 50f714a188SAmr Mokhtar 51f714a188SAmr Mokhtarcommand-line Options 52f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~~~~ 53f714a188SAmr Mokhtar 54f714a188SAmr MokhtarThe following are the command-line options: 55f714a188SAmr Mokhtar 56f714a188SAmr Mokhtar``-h, --help`` 57f714a188SAmr Mokhtar Shows help message and exit. 58f714a188SAmr Mokhtar 59f714a188SAmr Mokhtar``-p TESTAPP_PATH, --testapp_path TESTAPP_PATH`` 60f714a188SAmr Mokhtar Indicates the path to the bbdev test app. If not specified path is set based 61f714a188SAmr Mokhtar on *$RTE_SDK* environment variable concatenated with "*/build/app/testbbdev*". 62f714a188SAmr Mokhtar 63f714a188SAmr Mokhtar``-e EAL_PARAMS, --eal_params EAL_PARAMS`` 64f714a188SAmr Mokhtar Specifies EAL arguments which are passed to the test app. For more details, 65*43628b3dSDavid Marchand refer to DPDK documentation at :doc:`../linux_gsg/linux_eal_parameters`. 66f714a188SAmr Mokhtar 67f714a188SAmr Mokhtar``-t TIMEOUT, --timeout TIMEOUT`` 68f714a188SAmr Mokhtar Specifies timeout in seconds. If not specified timeout is set to 300 seconds. 69f714a188SAmr Mokhtar 70f714a188SAmr Mokhtar``-c TEST_CASE [TEST_CASE ...], --test_cases TEST_CASE [TEST_CASE ...]`` 71f714a188SAmr Mokhtar Defines test cases to run. If not specified all available tests are run. 72f714a188SAmr Mokhtar 73f714a188SAmr Mokhtar **Example usage:** 74f714a188SAmr Mokhtar 75f714a188SAmr Mokhtar ``./test-bbdev.py -c validation`` 76f714a188SAmr Mokhtar Runs validation test suite 77f714a188SAmr Mokhtar 78f714a188SAmr Mokhtar ``./test-bbdev.py -c latency throughput`` 79f714a188SAmr Mokhtar Runs latency and throughput test suites 80f714a188SAmr Mokhtar 81f714a188SAmr Mokhtar``-v TEST_VECTOR [TEST_VECTOR ...], --test_vector TEST_VECTOR [TEST_VECTOR ...]`` 82f714a188SAmr Mokhtar Specifies paths to the test vector files. If not specified path is set based 83f714a188SAmr Mokhtar on *$RTE_SDK* environment variable concatenated with 84ae828b8cSKamil Chalupnik "*/app/test-bbdev/test_vectors/bbdev_null.data*" and indicates default 85f714a188SAmr Mokhtar data file. 86f714a188SAmr Mokhtar 87f714a188SAmr Mokhtar **Example usage:** 88f714a188SAmr Mokhtar 89ae828b8cSKamil Chalupnik ``./test-bbdev.py -v app/test-bbdev/test_vectors/turbo_dec_test1.data`` 90ae828b8cSKamil Chalupnik Fills vector based on turbo_dec_test1.data file and runs all tests 91f714a188SAmr Mokhtar 92ae828b8cSKamil Chalupnik ``./test-bbdev.py -v turbo_dec_test1.data turbo_enc_test2.data`` 93f714a188SAmr Mokhtar The bbdev test app is executed twice. First time vector is filled based on 94ae828b8cSKamil Chalupnik *turbo_dec_test1.data* file and second time based on 95ae828b8cSKamil Chalupnik *turb_enc_test2.data* file. For both executions all tests are run. 96f714a188SAmr Mokhtar 97f714a188SAmr Mokhtar``-n NUM_OPS, --num_ops NUM_OPS`` 98f714a188SAmr Mokhtar Specifies number of operations to process on device. If not specified num_ops 99f714a188SAmr Mokhtar is set to 32 operations. 100f714a188SAmr Mokhtar 101f714a188SAmr Mokhtar``-l NUM_LCORES, --num_lcores NUM_LCORES`` 102f714a188SAmr Mokhtar Specifies number of lcores to run. If not specified num_lcores is set 103f714a188SAmr Mokhtar according to value from RTE configuration (EAL coremask) 104f714a188SAmr Mokhtar 105f714a188SAmr Mokhtar``-b BURST_SIZE [BURST_SIZE ...], --burst-size BURST_SIZE [BURST_SIZE ...]`` 106f714a188SAmr Mokhtar Specifies operations enqueue/dequeue burst size. If not specified burst_size is 107f714a188SAmr Mokhtar set to 32. Maximum is 512. 108f714a188SAmr Mokhtar 1098723590eSKamil ChalupnikTest Cases 1108723590eSKamil Chalupnik~~~~~~~~~~ 111f714a188SAmr Mokhtar 1128723590eSKamil ChalupnikThere are 6 main test cases that can be executed using testbbdev tool: 1138723590eSKamil Chalupnik 1148723590eSKamil Chalupnik* Sanity checks [-c unittest] 1158723590eSKamil Chalupnik - Performs sanity checks on BBDEV interface, validating basic functionality 1168723590eSKamil Chalupnik 1178723590eSKamil Chalupnik* Validation tests [-c validation] 1188723590eSKamil Chalupnik - Performs full operation of enqueue and dequeue 1198723590eSKamil Chalupnik - Compares the dequeued data buffer with a expected values in the test 1208723590eSKamil Chalupnik vector (TV) being used 1218723590eSKamil Chalupnik - Fails if any dequeued value does not match the data in the TV 1228723590eSKamil Chalupnik 1238723590eSKamil Chalupnik* Offload Cost measurement [-c offload] 1248723590eSKamil Chalupnik - Measures the CPU cycles consumed from the receipt of a user enqueue 1258723590eSKamil Chalupnik until it is put on the device queue 1268723590eSKamil Chalupnik - The test measures 4 metrics 1278723590eSKamil Chalupnik (a) *SW Enq Offload Cost*: Software only enqueue offload cost, the cycle 1288723590eSKamil Chalupnik counts and time (us) from the point the enqueue API is called until 1298723590eSKamil Chalupnik the point the operation is put on the accelerator queue. 1308723590eSKamil Chalupnik (b) *Acc Enq Offload Cost*: The cycle count and time (us) from the 1318723590eSKamil Chalupnik point the operation is put on the accelerator queue until the return 1328723590eSKamil Chalupnik from enqueue. 1338723590eSKamil Chalupnik (c) *SW Deq Offload Cost*: Software dequeue cost, the cycle counts and 1348723590eSKamil Chalupnik time (us) consumed to dequeue one operation. 1358723590eSKamil Chalupnik (d) *Empty Queue Enq Offload Cost*: The cycle count and time (us) 1368723590eSKamil Chalupnik consumed to dequeue from an empty queue. 1378723590eSKamil Chalupnik 1388723590eSKamil Chalupnik* Latency measurement [-c latency] 1398723590eSKamil Chalupnik - Measures the time consumed from the first enqueue until the first 1408723590eSKamil Chalupnik appearance of a dequeued result 141d629b7b5SJohn McNamara - This measurement represents the full latency of a bbdev operation 1428723590eSKamil Chalupnik (encode or decode) to execute 1438723590eSKamil Chalupnik 1448723590eSKamil Chalupnik* Poll-mode Throughput measurement [-c throughput] 1458723590eSKamil Chalupnik - Performs full operation of enqueue and dequeue 1468723590eSKamil Chalupnik - Executes in poll mode 1478723590eSKamil Chalupnik - Measures the achieved throughput on a subset or all available CPU cores 1488723590eSKamil Chalupnik - Dequeued data is not validated against expected values stored in TV 1498723590eSKamil Chalupnik - Results are printed in million operations per second and million bits 1508723590eSKamil Chalupnik per second 1518723590eSKamil Chalupnik 1528723590eSKamil Chalupnik* Interrupt-mode Throughput [-c interrupt] 1538723590eSKamil Chalupnik - Similar to Throughput test case, but using interrupts. No polling. 1548723590eSKamil Chalupnik 1558723590eSKamil Chalupnik 1568723590eSKamil ChalupnikParameter Globbing 157f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~~ 158f714a188SAmr Mokhtar 159f714a188SAmr MokhtarThanks to the globbing functionality in python test-bbdev.py script allows to 160f714a188SAmr Mokhtarrun tests with different set of vector files without giving all of them explicitly. 161f714a188SAmr Mokhtar 162f714a188SAmr Mokhtar**Example usage:** 163f714a188SAmr Mokhtar 164f714a188SAmr Mokhtar.. code-block:: console 165f714a188SAmr Mokhtar 166ae828b8cSKamil Chalupnik ./test-bbdev.py -v app/test-bbdev/test_vectors/turbo_<enc/dec>_c<c>_k<k>_r<r>_e<e>_<extra-info>.data 167f714a188SAmr Mokhtar 168f714a188SAmr MokhtarIt runs all tests with following vectors: 169f714a188SAmr Mokhtar 170ae828b8cSKamil Chalupnik- ``bbdev_null.data`` 171f714a188SAmr Mokhtar 17243b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data`` 17347d5a049SKamil Chalupnik 17447d5a049SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1196_rm.data`` 17547d5a049SKamil Chalupnik 17643b767f6SKamil Chalupnik- ``turbo_enc_c2_k5952_r0_e17868_crc24b.data`` 17743b767f6SKamil Chalupnik 17843b767f6SKamil Chalupnik- ``turbo_dec_c1_k40_r0_e17280_sbd_negllr.data`` 17943b767f6SKamil Chalupnik 18043b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data`` 18143b767f6SKamil Chalupnik 18247d5a049SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e272_rm.data`` 183f714a188SAmr Mokhtar 18443b767f6SKamil Chalupnik- ``turbo_enc_c3_k4800_r2_e14412_crc24b.data`` 18543b767f6SKamil Chalupnik 18643b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data`` 18743b767f6SKamil Chalupnik 18843b767f6SKamil Chalupnik- ``turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data`` 18943b767f6SKamil Chalupnik 19043b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e120_rm_rvidx.data`` 19143b767f6SKamil Chalupnik 19243b767f6SKamil Chalupnik- ``turbo_enc_c4_k4800_r2_e14412_crc24b.data`` 19343b767f6SKamil Chalupnik 19443b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data`` 19543b767f6SKamil Chalupnik 19643b767f6SKamil Chalupnik- ``turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data`` 19743b767f6SKamil Chalupnik 19843b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e18444.data`` 19943b767f6SKamil Chalupnik 20043b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_negllr.data`` 20143b767f6SKamil Chalupnik 20243b767f6SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1190_rm.data`` 20343b767f6SKamil Chalupnik 20443b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e18448_crc24a.data`` 20543b767f6SKamil Chalupnik 20643b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_posllr.data`` 20743b767f6SKamil Chalupnik 20843b767f6SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1194_rm.data`` 20943b767f6SKamil Chalupnik 210ae828b8cSKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data`` 211ae828b8cSKamil Chalupnik 212f714a188SAmr Mokhtar.. code-block:: console 213f714a188SAmr Mokhtar 214ae828b8cSKamil Chalupnik ./test-bbdev.py -v app/test-bbdev/turbo_*_default.data 215f714a188SAmr Mokhtar 216ae828b8cSKamil ChalupnikIt runs all tests with "default" vectors. 217f714a188SAmr Mokhtar 218ae828b8cSKamil Chalupnik* ``turbo_dec_default.data`` is a soft link to 219ae828b8cSKamil Chalupnik ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data`` 220f714a188SAmr Mokhtar 221ae828b8cSKamil Chalupnik* ``turbo_enc_default.data`` is a soft link to 222ae828b8cSKamil Chalupnik ``turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data`` 223f714a188SAmr Mokhtar 224f714a188SAmr Mokhtar 225f714a188SAmr MokhtarRunning Tests 226f714a188SAmr Mokhtar------------- 227f714a188SAmr Mokhtar 228f714a188SAmr MokhtarShortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled for 229218c4e68SBruce Richardsonx86_64-native-linux-icc target: 230f714a188SAmr Mokhtar 231f714a188SAmr Mokhtar:: 232f714a188SAmr Mokhtar 233f714a188SAmr Mokhtar |-- app 234f714a188SAmr Mokhtar |-- test-bbdev 235f714a188SAmr Mokhtar |-- test_vectors 236ae828b8cSKamil Chalupnik |-- bbdev_null.data 23743b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data 238ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1196_rm.data 23943b767f6SKamil Chalupnik |-- turbo_enc_c2_k5952_r0_e17868_crc24b.data 24043b767f6SKamil Chalupnik |-- turbo_dec_c1_k40_r0_e17280_sbd_negllr.data 24143b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data 242ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k40_r0_e272_rm.data 24343b767f6SKamil Chalupnik |-- turbo_enc_c3_k4800_r2_e14412_crc24b.data 24443b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data 24543b767f6SKamil Chalupnik |-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data 24643b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e120_rm_rvidx.data 24743b767f6SKamil Chalupnik |-- turbo_enc_c4_k4800_r2_e14412_crc24b.data 24843b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data 24943b767f6SKamil Chalupnik |-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data 25043b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e18444.data 25143b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_negllr.data 25243b767f6SKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1190_rm.data 25343b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e18448_crc24a.data 25443b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_posllr.data 25543b767f6SKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1194_rm.data 256ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data 257f714a188SAmr Mokhtar 258218c4e68SBruce Richardson |-- x86_64-native-linux-icc 259f714a188SAmr Mokhtar |-- app 260f714a188SAmr Mokhtar |-- testbbdev 261f714a188SAmr Mokhtar 262f714a188SAmr MokhtarAll bbdev devices 263f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~ 264f714a188SAmr Mokhtar 265f714a188SAmr Mokhtar.. code-block:: console 266f714a188SAmr Mokhtar 267218c4e68SBruce Richardson ./test-bbdev.py -p ../../x86_64-native-linux-icc/app/testbbdev 268ae828b8cSKamil Chalupnik -v turbo_dec_default.data 269f714a188SAmr Mokhtar 270f714a188SAmr MokhtarIt runs all available tests using the test vector filled based on 271ae828b8cSKamil Chalupnik*turbo_dec_default.data* file. 272f714a188SAmr MokhtarBy default number of operations to process on device is set to 32, timeout is 273f714a188SAmr Mokhtarset to 300s and operations enqueue/dequeue burst size is set to 32. 2747ce00bf3SKamil ChalupnikMoreover a bbdev (*baseband_null*) device will be created. 275f714a188SAmr Mokhtar 2767ce00bf3SKamil Chalupnikbaseband turbo_sw device 2777ce00bf3SKamil Chalupnik~~~~~~~~~~~~~~~~~~~~~~~~ 278f714a188SAmr Mokhtar 279f714a188SAmr Mokhtar.. code-block:: console 280f714a188SAmr Mokhtar 281218c4e68SBruce Richardson ./test-bbdev.py -p ../../x86_64-native-linux-icc/app/testbbdev 2827ce00bf3SKamil Chalupnik -e="--vdev=baseband_turbo_sw" -t 120 -c validation 283ae828b8cSKamil Chalupnik -v ./test_vectors/turbo_* -n 64 -b 8 32 284f714a188SAmr Mokhtar 285f714a188SAmr MokhtarIt runs **validation** test for each vector file that matches the given pattern. 286f714a188SAmr MokhtarNumber of operations to process on device is set to 64 and operations timeout is 287f714a188SAmr Mokhtarset to 120s and enqueue/dequeue burst size is set to 8 and to 32. 2887ce00bf3SKamil ChalupnikMoreover a bbdev (*baseband_turbo_sw*) device will be created. 289f714a188SAmr Mokhtar 290f714a188SAmr Mokhtar 291f714a188SAmr Mokhtarbbdev null device 292f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~ 293f714a188SAmr Mokhtar 294ae828b8cSKamil ChalupnikExecuting bbdev null device with *bbdev_null.data* helps in measuring the 295f714a188SAmr Mokhtaroverhead introduced by the bbdev framework. 296f714a188SAmr Mokhtar 297f714a188SAmr Mokhtar.. code-block:: console 298f714a188SAmr Mokhtar 2997ce00bf3SKamil Chalupnik ./test-bbdev.py -e="--vdev=baseband_null0" 300ae828b8cSKamil Chalupnik -v ./test_vectors/bbdev_null.data 301f714a188SAmr Mokhtar 302f714a188SAmr Mokhtar**Note:** 303f714a188SAmr Mokhtar 3047ce00bf3SKamil Chalupnikbaseband_null device does not have to be defined explicitly as it is created by default. 305f714a188SAmr Mokhtar 306f714a188SAmr Mokhtar 307f714a188SAmr Mokhtar 308f714a188SAmr MokhtarTest Vector files 309c5e2e085SThomas Monjalon----------------- 310f714a188SAmr Mokhtar 311f714a188SAmr MokhtarTest Vector files contain the data which is used to set turbo decoder/encoder 312f714a188SAmr Mokhtarparameters and buffers for validation purpose. New test vector files should be 313f714a188SAmr Mokhtarstored in ``app/test-bbdev/test_vectors/`` directory. Detailed description of 314f714a188SAmr Mokhtarthe syntax of the test vector files is in the following section. 315f714a188SAmr Mokhtar 316f714a188SAmr Mokhtar 317f714a188SAmr MokhtarBasic principles for test vector files 318c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 319f714a188SAmr MokhtarLine started with ``#`` is treated as a comment and is ignored. 320f714a188SAmr Mokhtar 321f714a188SAmr MokhtarIf variable is a chain of values, values should be separated by a comma. If 322f714a188SAmr Mokhtarassignment is split into several lines, each line (except the last one) has to 323f714a188SAmr Mokhtarbe ended with a comma. 324f714a188SAmr MokhtarThere is no comma after last value in last line. Correct assignment should 325f714a188SAmr Mokhtarlook like the following: 326f714a188SAmr Mokhtar 327f714a188SAmr Mokhtar.. parsed-literal:: 328f714a188SAmr Mokhtar 329f714a188SAmr Mokhtar variable = 330f714a188SAmr Mokhtar value, value, value, value, 331f714a188SAmr Mokhtar value, value 332f714a188SAmr Mokhtar 333f714a188SAmr MokhtarIn case where variable is a single value correct assignment looks like the 334f714a188SAmr Mokhtarfollowing: 335f714a188SAmr Mokhtar 336f714a188SAmr Mokhtar.. parsed-literal:: 337f714a188SAmr Mokhtar 338f714a188SAmr Mokhtar variable = 339f714a188SAmr Mokhtar value 340f714a188SAmr Mokhtar 341f714a188SAmr MokhtarLength of chain variable is calculated by parser. Can not be defined 342f714a188SAmr Mokhtarexplicitly. 343f714a188SAmr Mokhtar 344f714a188SAmr MokhtarVariable op_type has to be defined as a first variable in file. It specifies 345f714a188SAmr Mokhtarwhat type of operations will be executed. For decoder op_type has to be set to 346f714a188SAmr Mokhtar``RTE_BBDEV_OP_TURBO_DEC`` and for encoder to ``RTE_BBDEV_OP_TURBO_ENC``. 347f714a188SAmr Mokhtar 348f714a188SAmr MokhtarFull details of the meaning and valid values for the below fields are 349f714a188SAmr Mokhtardocumented in *rte_bbdev_op.h* 350f714a188SAmr Mokhtar 351f714a188SAmr Mokhtar 352f714a188SAmr MokhtarTurbo decoder test vectors template 353c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 354f714a188SAmr Mokhtar 355f714a188SAmr MokhtarFor turbo decoder it has to be always set to ``RTE_BBDEV_OP_TURBO_DEC`` 356f714a188SAmr Mokhtar 357f714a188SAmr Mokhtar.. parsed-literal:: 358f714a188SAmr Mokhtar 359f714a188SAmr Mokhtar op_type = 360f714a188SAmr Mokhtar RTE_BBDEV_OP_TURBO_DEC 361f714a188SAmr Mokhtar 362f714a188SAmr MokhtarChain of uint32_t values. Note that it is possible to define more than one 363f714a188SAmr Mokhtarinput/output entries which will result in chaining two or more data structures 364f714a188SAmr Mokhtarfor *segmented Transport Blocks* 365f714a188SAmr Mokhtar 366f714a188SAmr Mokhtar.. parsed-literal:: 367f714a188SAmr Mokhtar 368f714a188SAmr Mokhtar input0 = 369f714a188SAmr Mokhtar 0x00000000, 0x7f817f00, 0x7f7f8100, 0x817f8100, 0x81008100, 0x7f818100, 0x81817f00, 0x7f818100, 370f714a188SAmr Mokhtar 0x81007f00, 0x7f818100, 0x817f8100, 0x81817f00, 0x81008100, 0x817f7f00, 0x7f7f8100, 0x81817f00 371f714a188SAmr Mokhtar 372f714a188SAmr MokhtarChain of uint32_t values 373f714a188SAmr Mokhtar 374f714a188SAmr Mokhtar.. parsed-literal:: 375f714a188SAmr Mokhtar 376f714a188SAmr Mokhtar input1 = 377f714a188SAmr Mokhtar 0x7f7f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 378f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 379f714a188SAmr Mokhtar 380f714a188SAmr MokhtarChain of uint32_t values 381f714a188SAmr Mokhtar 382f714a188SAmr Mokhtar.. parsed-literal:: 383f714a188SAmr Mokhtar 384f714a188SAmr Mokhtar input2 = 385f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 386f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 387f714a188SAmr Mokhtar 388f714a188SAmr MokhtarChain of uint32_t values 389f714a188SAmr Mokhtar 390f714a188SAmr Mokhtar.. parsed-literal:: 391f714a188SAmr Mokhtar 392f714a188SAmr Mokhtar hard_output0 = 393f714a188SAmr Mokhtar 0xa7d6732e 394f714a188SAmr Mokhtar 395f714a188SAmr MokhtarChain of uint32_t values 396f714a188SAmr Mokhtar 397f714a188SAmr Mokhtar.. parsed-literal:: 398f714a188SAmr Mokhtar 399f714a188SAmr Mokhtar hard_output1 = 400f714a188SAmr Mokhtar 0xa61 401f714a188SAmr Mokhtar 402f714a188SAmr MokhtarChain of uint32_t values 403f714a188SAmr Mokhtar 404f714a188SAmr Mokhtar.. parsed-literal:: 405f714a188SAmr Mokhtar 406f714a188SAmr Mokhtar soft_output0 = 407f714a188SAmr Mokhtar 0x817f817f, 0x7f817f7f, 0x81818181, 0x817f7f81, 0x7f818181, 0x8181817f, 0x817f817f, 0x8181817f 408f714a188SAmr Mokhtar 409f714a188SAmr MokhtarChain of uint32_t values 410f714a188SAmr Mokhtar 411f714a188SAmr Mokhtar.. parsed-literal:: 412f714a188SAmr Mokhtar 413f714a188SAmr Mokhtar soft_output1 = 414f714a188SAmr Mokhtar 0x817f7f81, 0x7f7f7f81, 0x7f7f8181 415f714a188SAmr Mokhtar 416f714a188SAmr Mokhtaruint32_t value 417f714a188SAmr Mokhtar 418f714a188SAmr Mokhtar.. parsed-literal:: 419f714a188SAmr Mokhtar 420f714a188SAmr Mokhtar e = 421f714a188SAmr Mokhtar 44 422f714a188SAmr Mokhtar 423f714a188SAmr Mokhtaruint16_t value 424f714a188SAmr Mokhtar 425f714a188SAmr Mokhtar.. parsed-literal:: 426f714a188SAmr Mokhtar 427f714a188SAmr Mokhtar k = 428f714a188SAmr Mokhtar 40 429f714a188SAmr Mokhtar 430f714a188SAmr Mokhtaruint8_t value 431f714a188SAmr Mokhtar 432f714a188SAmr Mokhtar.. parsed-literal:: 433f714a188SAmr Mokhtar 434f714a188SAmr Mokhtar rv_index = 435f714a188SAmr Mokhtar 0 436f714a188SAmr Mokhtar 437f714a188SAmr Mokhtaruint8_t value 438f714a188SAmr Mokhtar 439f714a188SAmr Mokhtar.. parsed-literal:: 440f714a188SAmr Mokhtar 441f714a188SAmr Mokhtar iter_max = 442f714a188SAmr Mokhtar 8 443f714a188SAmr Mokhtar 444f714a188SAmr Mokhtaruint8_t value 445f714a188SAmr Mokhtar 446f714a188SAmr Mokhtar.. parsed-literal:: 447f714a188SAmr Mokhtar 448f714a188SAmr Mokhtar iter_min = 449f714a188SAmr Mokhtar 4 450f714a188SAmr Mokhtar 451f714a188SAmr Mokhtaruint8_t value 452f714a188SAmr Mokhtar 453f714a188SAmr Mokhtar.. parsed-literal:: 454f714a188SAmr Mokhtar 455f714a188SAmr Mokhtar expected_iter_count = 456f714a188SAmr Mokhtar 8 457f714a188SAmr Mokhtar 458f714a188SAmr Mokhtaruint8_t value 459f714a188SAmr Mokhtar 460f714a188SAmr Mokhtar.. parsed-literal:: 461f714a188SAmr Mokhtar 462f714a188SAmr Mokhtar ext_scale = 463f714a188SAmr Mokhtar 15 464f714a188SAmr Mokhtar 465f714a188SAmr Mokhtaruint8_t value 466f714a188SAmr Mokhtar 467f714a188SAmr Mokhtar.. parsed-literal:: 468f714a188SAmr Mokhtar 469f714a188SAmr Mokhtar num_maps = 470f714a188SAmr Mokhtar 0 471f714a188SAmr Mokhtar 472f714a188SAmr MokhtarChain of flags for turbo decoder operation. Following flags can be used: 473f714a188SAmr Mokhtar 474f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE`` 475f714a188SAmr Mokhtar 476f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_TYPE_24B`` 477f714a188SAmr Mokhtar 478f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_EQUALIZER`` 479f714a188SAmr Mokhtar 480f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE`` 481f714a188SAmr Mokhtar 482f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN`` 483f714a188SAmr Mokhtar 484f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH`` 485f714a188SAmr Mokhtar 486f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SOFT_OUTPUT`` 487f714a188SAmr Mokhtar 488f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` 489f714a188SAmr Mokhtar 490f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_DEC_INTERRUPTS`` 491f714a188SAmr Mokhtar 492f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN`` 493f714a188SAmr Mokhtar 494f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN`` 495f714a188SAmr Mokhtar 496f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_SOFT_OUT`` 497f714a188SAmr Mokhtar 498f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT`` 499f714a188SAmr Mokhtar 500f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_MAP_DEC`` 501f714a188SAmr Mokhtar 502f714a188SAmr MokhtarExample: 503f714a188SAmr Mokhtar 504f714a188SAmr Mokhtar .. parsed-literal:: 505f714a188SAmr Mokhtar 506f714a188SAmr Mokhtar op_flags = 507f714a188SAmr Mokhtar RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE, RTE_BBDEV_TURBO_EQUALIZER, 508f714a188SAmr Mokhtar RTE_BBDEV_TURBO_SOFT_OUTPUT 509f714a188SAmr Mokhtar 510f714a188SAmr MokhtarChain of operation statuses that are expected after operation is performed. 511f714a188SAmr MokhtarFollowing statuses can be used: 512f714a188SAmr Mokhtar 513f714a188SAmr Mokhtar- ``DMA`` 514f714a188SAmr Mokhtar 515f714a188SAmr Mokhtar- ``FCW`` 516f714a188SAmr Mokhtar 517f714a188SAmr Mokhtar- ``CRC`` 518f714a188SAmr Mokhtar 519f714a188SAmr Mokhtar- ``OK`` 520f714a188SAmr Mokhtar 521f714a188SAmr Mokhtar``OK`` means no errors are expected. Cannot be used with other values. 522f714a188SAmr Mokhtar 523f714a188SAmr Mokhtar.. parsed-literal:: 524f714a188SAmr Mokhtar 525f714a188SAmr Mokhtar expected_status = 526f714a188SAmr Mokhtar FCW, CRC 527f714a188SAmr Mokhtar 528f714a188SAmr Mokhtar 529f714a188SAmr MokhtarTurbo encoder test vectors template 530c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 531f714a188SAmr Mokhtar 532f714a188SAmr MokhtarFor turbo encoder it has to be always set to ``RTE_BBDEV_OP_TURBO_ENC`` 533f714a188SAmr Mokhtar 534f714a188SAmr Mokhtar.. parsed-literal:: 535f714a188SAmr Mokhtar 536f714a188SAmr Mokhtar op_type = 537f714a188SAmr Mokhtar RTE_BBDEV_OP_TURBO_ENC 538f714a188SAmr Mokhtar 539f714a188SAmr MokhtarChain of uint32_t values 540f714a188SAmr Mokhtar 541f714a188SAmr Mokhtar.. parsed-literal:: 542f714a188SAmr Mokhtar 543f714a188SAmr Mokhtar input0 = 544f714a188SAmr Mokhtar 0x11d2bcac, 0x4d 545f714a188SAmr Mokhtar 546f714a188SAmr MokhtarChain of uint32_t values 547f714a188SAmr Mokhtar 548f714a188SAmr Mokhtar.. parsed-literal:: 549f714a188SAmr Mokhtar 550f714a188SAmr Mokhtar output0 = 551f714a188SAmr Mokhtar 0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29, 552f714a188SAmr Mokhtar 0xa25b7f47, 0x2aa224ce, 0x79f2 553f714a188SAmr Mokhtar 554f714a188SAmr Mokhtaruint32_t value 555f714a188SAmr Mokhtar 556f714a188SAmr Mokhtar.. parsed-literal:: 557f714a188SAmr Mokhtar 558f714a188SAmr Mokhtar e = 559f714a188SAmr Mokhtar 272 560f714a188SAmr Mokhtar 561f714a188SAmr Mokhtaruint16_t value 562f714a188SAmr Mokhtar 563f714a188SAmr Mokhtar.. parsed-literal:: 564f714a188SAmr Mokhtar 565f714a188SAmr Mokhtar k = 566f714a188SAmr Mokhtar 40 567f714a188SAmr Mokhtar 568f714a188SAmr Mokhtaruint16_t value 569f714a188SAmr Mokhtar 570f714a188SAmr Mokhtar.. parsed-literal:: 571f714a188SAmr Mokhtar 572f714a188SAmr Mokhtar ncb = 573f714a188SAmr Mokhtar 192 574f714a188SAmr Mokhtar 575f714a188SAmr Mokhtaruint8_t value 576f714a188SAmr Mokhtar 577f714a188SAmr Mokhtar.. parsed-literal:: 578f714a188SAmr Mokhtar 579f714a188SAmr Mokhtar rv_index = 580f714a188SAmr Mokhtar 0 581f714a188SAmr Mokhtar 582f714a188SAmr MokhtarChain of flags for turbo encoder operation. Following flags can be used: 583f714a188SAmr Mokhtar 584f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS`` 585f714a188SAmr Mokhtar 586f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_RATE_MATCH`` 587f714a188SAmr Mokhtar 588f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` 589f714a188SAmr Mokhtar 590f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` 591f714a188SAmr Mokhtar 592f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER`` 593f714a188SAmr Mokhtar 594f714a188SAmr Mokhtar``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER`` is used to indicate the parser to 595f714a188SAmr Mokhtarforce the input data to be memory split and formed as a segmented mbuf. 596f714a188SAmr Mokhtar 597f714a188SAmr Mokhtar 598f714a188SAmr Mokhtar.. parsed-literal:: 599f714a188SAmr Mokhtar 600f714a188SAmr Mokhtar op_flags = 601f714a188SAmr Mokhtar RTE_BBDEV_TURBO_RATE_MATCH 602f714a188SAmr Mokhtar 603f714a188SAmr MokhtarChain of operation statuses that are expected after operation is performed. 604f714a188SAmr MokhtarFollowing statuses can be used: 605f714a188SAmr Mokhtar 606f714a188SAmr Mokhtar- ``DMA`` 607f714a188SAmr Mokhtar 608f714a188SAmr Mokhtar- ``FCW`` 609f714a188SAmr Mokhtar 610f714a188SAmr Mokhtar- ``OK`` 611f714a188SAmr Mokhtar 612f714a188SAmr Mokhtar``OK`` means no errors are expected. Cannot be used with other values. 613f714a188SAmr Mokhtar 614f714a188SAmr Mokhtar.. parsed-literal:: 615f714a188SAmr Mokhtar 616f714a188SAmr Mokhtar expected_status = 617f714a188SAmr Mokhtar OK 618