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] 50*f41c6e4dSNicolas Chautru [-t MAX_ITERS [MAX_ITERS ...]] 51*f41c6e4dSNicolas Chautru [-s SNR [SNR ...]] 52f714a188SAmr Mokhtar 53f714a188SAmr Mokhtarcommand-line Options 54f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~~~~ 55f714a188SAmr Mokhtar 56f714a188SAmr MokhtarThe following are the command-line options: 57f714a188SAmr Mokhtar 58f714a188SAmr Mokhtar``-h, --help`` 59f714a188SAmr Mokhtar Shows help message and exit. 60f714a188SAmr Mokhtar 61f714a188SAmr Mokhtar``-p TESTAPP_PATH, --testapp_path TESTAPP_PATH`` 62f714a188SAmr Mokhtar Indicates the path to the bbdev test app. If not specified path is set based 63f714a188SAmr Mokhtar on *$RTE_SDK* environment variable concatenated with "*/build/app/testbbdev*". 64f714a188SAmr Mokhtar 65f714a188SAmr Mokhtar``-e EAL_PARAMS, --eal_params EAL_PARAMS`` 66f714a188SAmr Mokhtar Specifies EAL arguments which are passed to the test app. For more details, 6743628b3dSDavid Marchand refer to DPDK documentation at :doc:`../linux_gsg/linux_eal_parameters`. 68f714a188SAmr Mokhtar 69f714a188SAmr Mokhtar``-t TIMEOUT, --timeout TIMEOUT`` 70f714a188SAmr Mokhtar Specifies timeout in seconds. If not specified timeout is set to 300 seconds. 71f714a188SAmr Mokhtar 72f714a188SAmr Mokhtar``-c TEST_CASE [TEST_CASE ...], --test_cases TEST_CASE [TEST_CASE ...]`` 73f714a188SAmr Mokhtar Defines test cases to run. If not specified all available tests are run. 74f714a188SAmr Mokhtar 75f714a188SAmr Mokhtar **Example usage:** 76f714a188SAmr Mokhtar 77f714a188SAmr Mokhtar ``./test-bbdev.py -c validation`` 78f714a188SAmr Mokhtar Runs validation test suite 79f714a188SAmr Mokhtar 80f714a188SAmr Mokhtar ``./test-bbdev.py -c latency throughput`` 81f714a188SAmr Mokhtar Runs latency and throughput test suites 82f714a188SAmr Mokhtar 83f714a188SAmr Mokhtar``-v TEST_VECTOR [TEST_VECTOR ...], --test_vector TEST_VECTOR [TEST_VECTOR ...]`` 84f714a188SAmr Mokhtar Specifies paths to the test vector files. If not specified path is set based 85f714a188SAmr Mokhtar on *$RTE_SDK* environment variable concatenated with 86ae828b8cSKamil Chalupnik "*/app/test-bbdev/test_vectors/bbdev_null.data*" and indicates default 87f714a188SAmr Mokhtar data file. 88f714a188SAmr Mokhtar 89f714a188SAmr Mokhtar **Example usage:** 90f714a188SAmr Mokhtar 91ae828b8cSKamil Chalupnik ``./test-bbdev.py -v app/test-bbdev/test_vectors/turbo_dec_test1.data`` 92ae828b8cSKamil Chalupnik Fills vector based on turbo_dec_test1.data file and runs all tests 93f714a188SAmr Mokhtar 94ae828b8cSKamil Chalupnik ``./test-bbdev.py -v turbo_dec_test1.data turbo_enc_test2.data`` 95f714a188SAmr Mokhtar The bbdev test app is executed twice. First time vector is filled based on 96ae828b8cSKamil Chalupnik *turbo_dec_test1.data* file and second time based on 97ae828b8cSKamil Chalupnik *turb_enc_test2.data* file. For both executions all tests are run. 98f714a188SAmr Mokhtar 99f714a188SAmr Mokhtar``-n NUM_OPS, --num_ops NUM_OPS`` 100f714a188SAmr Mokhtar Specifies number of operations to process on device. If not specified num_ops 101f714a188SAmr Mokhtar is set to 32 operations. 102f714a188SAmr Mokhtar 103f714a188SAmr Mokhtar``-l NUM_LCORES, --num_lcores NUM_LCORES`` 104f714a188SAmr Mokhtar Specifies number of lcores to run. If not specified num_lcores is set 105f714a188SAmr Mokhtar according to value from RTE configuration (EAL coremask) 106f714a188SAmr Mokhtar 107f714a188SAmr Mokhtar``-b BURST_SIZE [BURST_SIZE ...], --burst-size BURST_SIZE [BURST_SIZE ...]`` 108f714a188SAmr Mokhtar Specifies operations enqueue/dequeue burst size. If not specified burst_size is 109f714a188SAmr Mokhtar set to 32. Maximum is 512. 110f714a188SAmr Mokhtar 111*f41c6e4dSNicolas Chautru``-t MAX_ITERS [MAX_ITERS ...], --iter_max MAX_ITERS [MAX_ITERS ...]`` 112*f41c6e4dSNicolas Chautru Specifies LDPC decoder operations maximum number of iterations for throughput 113*f41c6e4dSNicolas Chautru and bler tests. If not specified iter_max is set to 6. 114*f41c6e4dSNicolas Chautru 115*f41c6e4dSNicolas Chautru``-s SNR [SNR ...], --snr SNR [SNR ...]`` 116*f41c6e4dSNicolas Chautru Specifies for LDPC decoder operations the SNR in dB used when generating LLRs 117*f41c6e4dSNicolas Chautru for bler tests. If not specified snr is set to 0 dB. 118*f41c6e4dSNicolas Chautru 1198723590eSKamil ChalupnikTest Cases 1208723590eSKamil Chalupnik~~~~~~~~~~ 121f714a188SAmr Mokhtar 1228723590eSKamil ChalupnikThere are 6 main test cases that can be executed using testbbdev tool: 1238723590eSKamil Chalupnik 1248723590eSKamil Chalupnik* Sanity checks [-c unittest] 1258723590eSKamil Chalupnik - Performs sanity checks on BBDEV interface, validating basic functionality 1268723590eSKamil Chalupnik 1278723590eSKamil Chalupnik* Validation tests [-c validation] 1288723590eSKamil Chalupnik - Performs full operation of enqueue and dequeue 1298723590eSKamil Chalupnik - Compares the dequeued data buffer with a expected values in the test 1308723590eSKamil Chalupnik vector (TV) being used 1318723590eSKamil Chalupnik - Fails if any dequeued value does not match the data in the TV 1328723590eSKamil Chalupnik 1338723590eSKamil Chalupnik* Offload Cost measurement [-c offload] 1348723590eSKamil Chalupnik - Measures the CPU cycles consumed from the receipt of a user enqueue 1358723590eSKamil Chalupnik until it is put on the device queue 1368723590eSKamil Chalupnik - The test measures 4 metrics 1378723590eSKamil Chalupnik (a) *SW Enq Offload Cost*: Software only enqueue offload cost, the cycle 1388723590eSKamil Chalupnik counts and time (us) from the point the enqueue API is called until 1398723590eSKamil Chalupnik the point the operation is put on the accelerator queue. 1408723590eSKamil Chalupnik (b) *Acc Enq Offload Cost*: The cycle count and time (us) from the 1418723590eSKamil Chalupnik point the operation is put on the accelerator queue until the return 1428723590eSKamil Chalupnik from enqueue. 1438723590eSKamil Chalupnik (c) *SW Deq Offload Cost*: Software dequeue cost, the cycle counts and 1448723590eSKamil Chalupnik time (us) consumed to dequeue one operation. 1458723590eSKamil Chalupnik (d) *Empty Queue Enq Offload Cost*: The cycle count and time (us) 1468723590eSKamil Chalupnik consumed to dequeue from an empty queue. 1478723590eSKamil Chalupnik 1488723590eSKamil Chalupnik* Latency measurement [-c latency] 1498723590eSKamil Chalupnik - Measures the time consumed from the first enqueue until the first 1508723590eSKamil Chalupnik appearance of a dequeued result 151d629b7b5SJohn McNamara - This measurement represents the full latency of a bbdev operation 1528723590eSKamil Chalupnik (encode or decode) to execute 1538723590eSKamil Chalupnik 1548723590eSKamil Chalupnik* Poll-mode Throughput measurement [-c throughput] 1558723590eSKamil Chalupnik - Performs full operation of enqueue and dequeue 1568723590eSKamil Chalupnik - Executes in poll mode 1578723590eSKamil Chalupnik - Measures the achieved throughput on a subset or all available CPU cores 1588723590eSKamil Chalupnik - Dequeued data is not validated against expected values stored in TV 1598723590eSKamil Chalupnik - Results are printed in million operations per second and million bits 1608723590eSKamil Chalupnik per second 1618723590eSKamil Chalupnik 162*f41c6e4dSNicolas Chautru* BLER measurement [-c bler] 163*f41c6e4dSNicolas Chautru - Performs full operation of enqueue and dequeue 164*f41c6e4dSNicolas Chautru - Measures the achieved throughput on a subset or all available CPU cores 165*f41c6e4dSNicolas Chautru - Computed BLER (Block Error Rate, ratio of blocks not decoded at a given 166*f41c6e4dSNicolas Chautru SNR) in % based on the total number of operations. 167*f41c6e4dSNicolas Chautru 1688723590eSKamil Chalupnik* Interrupt-mode Throughput [-c interrupt] 1698723590eSKamil Chalupnik - Similar to Throughput test case, but using interrupts. No polling. 1708723590eSKamil Chalupnik 1718723590eSKamil Chalupnik 1728723590eSKamil ChalupnikParameter Globbing 173f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~~ 174f714a188SAmr Mokhtar 175f714a188SAmr MokhtarThanks to the globbing functionality in python test-bbdev.py script allows to 176f714a188SAmr Mokhtarrun tests with different set of vector files without giving all of them explicitly. 177f714a188SAmr Mokhtar 178f714a188SAmr Mokhtar**Example usage:** 179f714a188SAmr Mokhtar 180f714a188SAmr Mokhtar.. code-block:: console 181f714a188SAmr Mokhtar 182ae828b8cSKamil Chalupnik ./test-bbdev.py -v app/test-bbdev/test_vectors/turbo_<enc/dec>_c<c>_k<k>_r<r>_e<e>_<extra-info>.data 183f714a188SAmr Mokhtar 184f714a188SAmr MokhtarIt runs all tests with following vectors: 185f714a188SAmr Mokhtar 186ae828b8cSKamil Chalupnik- ``bbdev_null.data`` 187f714a188SAmr Mokhtar 18843b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data`` 18947d5a049SKamil Chalupnik 19047d5a049SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1196_rm.data`` 19147d5a049SKamil Chalupnik 19243b767f6SKamil Chalupnik- ``turbo_enc_c2_k5952_r0_e17868_crc24b.data`` 19343b767f6SKamil Chalupnik 19443b767f6SKamil Chalupnik- ``turbo_dec_c1_k40_r0_e17280_sbd_negllr.data`` 19543b767f6SKamil Chalupnik 19643b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data`` 19743b767f6SKamil Chalupnik 19847d5a049SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e272_rm.data`` 199f714a188SAmr Mokhtar 20043b767f6SKamil Chalupnik- ``turbo_enc_c3_k4800_r2_e14412_crc24b.data`` 20143b767f6SKamil Chalupnik 20243b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data`` 20343b767f6SKamil Chalupnik 20443b767f6SKamil Chalupnik- ``turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data`` 20543b767f6SKamil Chalupnik 20643b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e120_rm_rvidx.data`` 20743b767f6SKamil Chalupnik 20843b767f6SKamil Chalupnik- ``turbo_enc_c4_k4800_r2_e14412_crc24b.data`` 20943b767f6SKamil Chalupnik 21043b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data`` 21143b767f6SKamil Chalupnik 21243b767f6SKamil Chalupnik- ``turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data`` 21343b767f6SKamil Chalupnik 21443b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e18444.data`` 21543b767f6SKamil Chalupnik 21643b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_negllr.data`` 21743b767f6SKamil Chalupnik 21843b767f6SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1190_rm.data`` 21943b767f6SKamil Chalupnik 22043b767f6SKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e18448_crc24a.data`` 22143b767f6SKamil Chalupnik 22243b767f6SKamil Chalupnik- ``turbo_dec_c1_k6144_r0_e34560_posllr.data`` 22343b767f6SKamil Chalupnik 22443b767f6SKamil Chalupnik- ``turbo_enc_c1_k40_r0_e1194_rm.data`` 22543b767f6SKamil Chalupnik 226ae828b8cSKamil Chalupnik- ``turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data`` 227ae828b8cSKamil Chalupnik 228f714a188SAmr Mokhtar.. code-block:: console 229f714a188SAmr Mokhtar 230ae828b8cSKamil Chalupnik ./test-bbdev.py -v app/test-bbdev/turbo_*_default.data 231f714a188SAmr Mokhtar 232ae828b8cSKamil ChalupnikIt runs all tests with "default" vectors. 233f714a188SAmr Mokhtar 234ae828b8cSKamil Chalupnik* ``turbo_dec_default.data`` is a soft link to 235ae828b8cSKamil Chalupnik ``turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data`` 236f714a188SAmr Mokhtar 237ae828b8cSKamil Chalupnik* ``turbo_enc_default.data`` is a soft link to 238ae828b8cSKamil Chalupnik ``turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data`` 239f714a188SAmr Mokhtar 240f714a188SAmr Mokhtar 241f714a188SAmr MokhtarRunning Tests 242f714a188SAmr Mokhtar------------- 243f714a188SAmr Mokhtar 244f714a188SAmr MokhtarShortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled for 245218c4e68SBruce Richardsonx86_64-native-linux-icc target: 246f714a188SAmr Mokhtar 247f714a188SAmr Mokhtar:: 248f714a188SAmr Mokhtar 249f714a188SAmr Mokhtar |-- app 250f714a188SAmr Mokhtar |-- test-bbdev 251f714a188SAmr Mokhtar |-- test_vectors 252ae828b8cSKamil Chalupnik |-- bbdev_null.data 25343b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data 254ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1196_rm.data 25543b767f6SKamil Chalupnik |-- turbo_enc_c2_k5952_r0_e17868_crc24b.data 25643b767f6SKamil Chalupnik |-- turbo_dec_c1_k40_r0_e17280_sbd_negllr.data 25743b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data 258ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k40_r0_e272_rm.data 25943b767f6SKamil Chalupnik |-- turbo_enc_c3_k4800_r2_e14412_crc24b.data 26043b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data 26143b767f6SKamil Chalupnik |-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data 26243b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e120_rm_rvidx.data 26343b767f6SKamil Chalupnik |-- turbo_enc_c4_k4800_r2_e14412_crc24b.data 26443b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data 26543b767f6SKamil Chalupnik |-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data 26643b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e18444.data 26743b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_negllr.data 26843b767f6SKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1190_rm.data 26943b767f6SKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e18448_crc24a.data 27043b767f6SKamil Chalupnik |-- turbo_dec_c1_k6144_r0_e34560_posllr.data 27143b767f6SKamil Chalupnik |-- turbo_enc_c1_k40_r0_e1194_rm.data 272ae828b8cSKamil Chalupnik |-- turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data 273f714a188SAmr Mokhtar 274218c4e68SBruce Richardson |-- x86_64-native-linux-icc 275f714a188SAmr Mokhtar |-- app 276f714a188SAmr Mokhtar |-- testbbdev 277f714a188SAmr Mokhtar 278f714a188SAmr MokhtarAll bbdev devices 279f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~ 280f714a188SAmr Mokhtar 281f714a188SAmr Mokhtar.. code-block:: console 282f714a188SAmr Mokhtar 283218c4e68SBruce Richardson ./test-bbdev.py -p ../../x86_64-native-linux-icc/app/testbbdev 284ae828b8cSKamil Chalupnik -v turbo_dec_default.data 285f714a188SAmr Mokhtar 286f714a188SAmr MokhtarIt runs all available tests using the test vector filled based on 287ae828b8cSKamil Chalupnik*turbo_dec_default.data* file. 288f714a188SAmr MokhtarBy default number of operations to process on device is set to 32, timeout is 289f714a188SAmr Mokhtarset to 300s and operations enqueue/dequeue burst size is set to 32. 2907ce00bf3SKamil ChalupnikMoreover a bbdev (*baseband_null*) device will be created. 291f714a188SAmr Mokhtar 2927ce00bf3SKamil Chalupnikbaseband turbo_sw device 2937ce00bf3SKamil Chalupnik~~~~~~~~~~~~~~~~~~~~~~~~ 294f714a188SAmr Mokhtar 295f714a188SAmr Mokhtar.. code-block:: console 296f714a188SAmr Mokhtar 297218c4e68SBruce Richardson ./test-bbdev.py -p ../../x86_64-native-linux-icc/app/testbbdev 2987ce00bf3SKamil Chalupnik -e="--vdev=baseband_turbo_sw" -t 120 -c validation 299ae828b8cSKamil Chalupnik -v ./test_vectors/turbo_* -n 64 -b 8 32 300f714a188SAmr Mokhtar 301f714a188SAmr MokhtarIt runs **validation** test for each vector file that matches the given pattern. 302f714a188SAmr MokhtarNumber of operations to process on device is set to 64 and operations timeout is 303f714a188SAmr Mokhtarset to 120s and enqueue/dequeue burst size is set to 8 and to 32. 3047ce00bf3SKamil ChalupnikMoreover a bbdev (*baseband_turbo_sw*) device will be created. 305f714a188SAmr Mokhtar 306f714a188SAmr Mokhtar 307f714a188SAmr Mokhtarbbdev null device 308f714a188SAmr Mokhtar~~~~~~~~~~~~~~~~~ 309f714a188SAmr Mokhtar 310ae828b8cSKamil ChalupnikExecuting bbdev null device with *bbdev_null.data* helps in measuring the 311f714a188SAmr Mokhtaroverhead introduced by the bbdev framework. 312f714a188SAmr Mokhtar 313f714a188SAmr Mokhtar.. code-block:: console 314f714a188SAmr Mokhtar 3157ce00bf3SKamil Chalupnik ./test-bbdev.py -e="--vdev=baseband_null0" 316ae828b8cSKamil Chalupnik -v ./test_vectors/bbdev_null.data 317f714a188SAmr Mokhtar 318f714a188SAmr Mokhtar**Note:** 319f714a188SAmr Mokhtar 3207ce00bf3SKamil Chalupnikbaseband_null device does not have to be defined explicitly as it is created by default. 321f714a188SAmr Mokhtar 322f714a188SAmr Mokhtar 323f714a188SAmr Mokhtar 324f714a188SAmr MokhtarTest Vector files 325c5e2e085SThomas Monjalon----------------- 326f714a188SAmr Mokhtar 327f714a188SAmr MokhtarTest Vector files contain the data which is used to set turbo decoder/encoder 328f714a188SAmr Mokhtarparameters and buffers for validation purpose. New test vector files should be 329f714a188SAmr Mokhtarstored in ``app/test-bbdev/test_vectors/`` directory. Detailed description of 330f714a188SAmr Mokhtarthe syntax of the test vector files is in the following section. 331f714a188SAmr Mokhtar 332f714a188SAmr Mokhtar 333f714a188SAmr MokhtarBasic principles for test vector files 334c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 335f714a188SAmr MokhtarLine started with ``#`` is treated as a comment and is ignored. 336f714a188SAmr Mokhtar 337f714a188SAmr MokhtarIf variable is a chain of values, values should be separated by a comma. If 338f714a188SAmr Mokhtarassignment is split into several lines, each line (except the last one) has to 339f714a188SAmr Mokhtarbe ended with a comma. 340f714a188SAmr MokhtarThere is no comma after last value in last line. Correct assignment should 341f714a188SAmr Mokhtarlook like the following: 342f714a188SAmr Mokhtar 343f714a188SAmr Mokhtar.. parsed-literal:: 344f714a188SAmr Mokhtar 345f714a188SAmr Mokhtar variable = 346f714a188SAmr Mokhtar value, value, value, value, 347f714a188SAmr Mokhtar value, value 348f714a188SAmr Mokhtar 349f714a188SAmr MokhtarIn case where variable is a single value correct assignment looks like the 350f714a188SAmr Mokhtarfollowing: 351f714a188SAmr Mokhtar 352f714a188SAmr Mokhtar.. parsed-literal:: 353f714a188SAmr Mokhtar 354f714a188SAmr Mokhtar variable = 355f714a188SAmr Mokhtar value 356f714a188SAmr Mokhtar 357f714a188SAmr MokhtarLength of chain variable is calculated by parser. Can not be defined 358f714a188SAmr Mokhtarexplicitly. 359f714a188SAmr Mokhtar 360f714a188SAmr MokhtarVariable op_type has to be defined as a first variable in file. It specifies 361f714a188SAmr Mokhtarwhat type of operations will be executed. For decoder op_type has to be set to 362f714a188SAmr Mokhtar``RTE_BBDEV_OP_TURBO_DEC`` and for encoder to ``RTE_BBDEV_OP_TURBO_ENC``. 363f714a188SAmr Mokhtar 364f714a188SAmr MokhtarFull details of the meaning and valid values for the below fields are 365f714a188SAmr Mokhtardocumented in *rte_bbdev_op.h* 366f714a188SAmr Mokhtar 367f714a188SAmr Mokhtar 368f714a188SAmr MokhtarTurbo decoder test vectors template 369c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 370f714a188SAmr Mokhtar 371f714a188SAmr MokhtarFor turbo decoder it has to be always set to ``RTE_BBDEV_OP_TURBO_DEC`` 372f714a188SAmr Mokhtar 373f714a188SAmr Mokhtar.. parsed-literal:: 374f714a188SAmr Mokhtar 375f714a188SAmr Mokhtar op_type = 376f714a188SAmr Mokhtar RTE_BBDEV_OP_TURBO_DEC 377f714a188SAmr Mokhtar 378f714a188SAmr MokhtarChain of uint32_t values. Note that it is possible to define more than one 379f714a188SAmr Mokhtarinput/output entries which will result in chaining two or more data structures 380f714a188SAmr Mokhtarfor *segmented Transport Blocks* 381f714a188SAmr Mokhtar 382f714a188SAmr Mokhtar.. parsed-literal:: 383f714a188SAmr Mokhtar 384f714a188SAmr Mokhtar input0 = 385f714a188SAmr Mokhtar 0x00000000, 0x7f817f00, 0x7f7f8100, 0x817f8100, 0x81008100, 0x7f818100, 0x81817f00, 0x7f818100, 386f714a188SAmr Mokhtar 0x81007f00, 0x7f818100, 0x817f8100, 0x81817f00, 0x81008100, 0x817f7f00, 0x7f7f8100, 0x81817f00 387f714a188SAmr Mokhtar 388f714a188SAmr MokhtarChain of uint32_t values 389f714a188SAmr Mokhtar 390f714a188SAmr Mokhtar.. parsed-literal:: 391f714a188SAmr Mokhtar 392f714a188SAmr Mokhtar input1 = 393f714a188SAmr Mokhtar 0x7f7f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 394f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 395f714a188SAmr Mokhtar 396f714a188SAmr MokhtarChain of uint32_t values 397f714a188SAmr Mokhtar 398f714a188SAmr Mokhtar.. parsed-literal:: 399f714a188SAmr Mokhtar 400f714a188SAmr Mokhtar input2 = 401f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 402f714a188SAmr Mokhtar 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 403f714a188SAmr Mokhtar 404f714a188SAmr MokhtarChain of uint32_t values 405f714a188SAmr Mokhtar 406f714a188SAmr Mokhtar.. parsed-literal:: 407f714a188SAmr Mokhtar 408f714a188SAmr Mokhtar hard_output0 = 409f714a188SAmr Mokhtar 0xa7d6732e 410f714a188SAmr Mokhtar 411f714a188SAmr MokhtarChain of uint32_t values 412f714a188SAmr Mokhtar 413f714a188SAmr Mokhtar.. parsed-literal:: 414f714a188SAmr Mokhtar 415f714a188SAmr Mokhtar hard_output1 = 416f714a188SAmr Mokhtar 0xa61 417f714a188SAmr Mokhtar 418f714a188SAmr MokhtarChain of uint32_t values 419f714a188SAmr Mokhtar 420f714a188SAmr Mokhtar.. parsed-literal:: 421f714a188SAmr Mokhtar 422f714a188SAmr Mokhtar soft_output0 = 423f714a188SAmr Mokhtar 0x817f817f, 0x7f817f7f, 0x81818181, 0x817f7f81, 0x7f818181, 0x8181817f, 0x817f817f, 0x8181817f 424f714a188SAmr Mokhtar 425f714a188SAmr MokhtarChain of uint32_t values 426f714a188SAmr Mokhtar 427f714a188SAmr Mokhtar.. parsed-literal:: 428f714a188SAmr Mokhtar 429f714a188SAmr Mokhtar soft_output1 = 430f714a188SAmr Mokhtar 0x817f7f81, 0x7f7f7f81, 0x7f7f8181 431f714a188SAmr Mokhtar 432f714a188SAmr Mokhtaruint32_t value 433f714a188SAmr Mokhtar 434f714a188SAmr Mokhtar.. parsed-literal:: 435f714a188SAmr Mokhtar 436f714a188SAmr Mokhtar e = 437f714a188SAmr Mokhtar 44 438f714a188SAmr Mokhtar 439f714a188SAmr Mokhtaruint16_t value 440f714a188SAmr Mokhtar 441f714a188SAmr Mokhtar.. parsed-literal:: 442f714a188SAmr Mokhtar 443f714a188SAmr Mokhtar k = 444f714a188SAmr Mokhtar 40 445f714a188SAmr Mokhtar 446f714a188SAmr Mokhtaruint8_t value 447f714a188SAmr Mokhtar 448f714a188SAmr Mokhtar.. parsed-literal:: 449f714a188SAmr Mokhtar 450f714a188SAmr Mokhtar rv_index = 451f714a188SAmr Mokhtar 0 452f714a188SAmr Mokhtar 453f714a188SAmr Mokhtaruint8_t value 454f714a188SAmr Mokhtar 455f714a188SAmr Mokhtar.. parsed-literal:: 456f714a188SAmr Mokhtar 457f714a188SAmr Mokhtar iter_max = 458f714a188SAmr Mokhtar 8 459f714a188SAmr Mokhtar 460f714a188SAmr Mokhtaruint8_t value 461f714a188SAmr Mokhtar 462f714a188SAmr Mokhtar.. parsed-literal:: 463f714a188SAmr Mokhtar 464f714a188SAmr Mokhtar iter_min = 465f714a188SAmr Mokhtar 4 466f714a188SAmr Mokhtar 467f714a188SAmr Mokhtaruint8_t value 468f714a188SAmr Mokhtar 469f714a188SAmr Mokhtar.. parsed-literal:: 470f714a188SAmr Mokhtar 471f714a188SAmr Mokhtar expected_iter_count = 472f714a188SAmr Mokhtar 8 473f714a188SAmr Mokhtar 474f714a188SAmr Mokhtaruint8_t value 475f714a188SAmr Mokhtar 476f714a188SAmr Mokhtar.. parsed-literal:: 477f714a188SAmr Mokhtar 478f714a188SAmr Mokhtar ext_scale = 479f714a188SAmr Mokhtar 15 480f714a188SAmr Mokhtar 481f714a188SAmr Mokhtaruint8_t value 482f714a188SAmr Mokhtar 483f714a188SAmr Mokhtar.. parsed-literal:: 484f714a188SAmr Mokhtar 485f714a188SAmr Mokhtar num_maps = 486f714a188SAmr Mokhtar 0 487f714a188SAmr Mokhtar 488f714a188SAmr MokhtarChain of flags for turbo decoder operation. Following flags can be used: 489f714a188SAmr Mokhtar 490f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE`` 491f714a188SAmr Mokhtar 492f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_TYPE_24B`` 493f714a188SAmr Mokhtar 494f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_EQUALIZER`` 495f714a188SAmr Mokhtar 496f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SOFT_OUT_SATURATE`` 497f714a188SAmr Mokhtar 498f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_HALF_ITERATION_EVEN`` 499f714a188SAmr Mokhtar 500f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CONTINUE_CRC_MATCH`` 501f714a188SAmr Mokhtar 502f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_SOFT_OUTPUT`` 503f714a188SAmr Mokhtar 504f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_EARLY_TERMINATION`` 505f714a188SAmr Mokhtar 506f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_DEC_INTERRUPTS`` 507f714a188SAmr Mokhtar 508f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_IN`` 509f714a188SAmr Mokhtar 510f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_IN`` 511f714a188SAmr Mokhtar 512f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_POS_LLR_1_BIT_SOFT_OUT`` 513f714a188SAmr Mokhtar 514f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_NEG_LLR_1_BIT_SOFT_OUT`` 515f714a188SAmr Mokhtar 516f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_MAP_DEC`` 517f714a188SAmr Mokhtar 518f714a188SAmr MokhtarExample: 519f714a188SAmr Mokhtar 520f714a188SAmr Mokhtar .. parsed-literal:: 521f714a188SAmr Mokhtar 522f714a188SAmr Mokhtar op_flags = 523f714a188SAmr Mokhtar RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE, RTE_BBDEV_TURBO_EQUALIZER, 524f714a188SAmr Mokhtar RTE_BBDEV_TURBO_SOFT_OUTPUT 525f714a188SAmr Mokhtar 526f714a188SAmr MokhtarChain of operation statuses that are expected after operation is performed. 527f714a188SAmr MokhtarFollowing statuses can be used: 528f714a188SAmr Mokhtar 529f714a188SAmr Mokhtar- ``DMA`` 530f714a188SAmr Mokhtar 531f714a188SAmr Mokhtar- ``FCW`` 532f714a188SAmr Mokhtar 533f714a188SAmr Mokhtar- ``CRC`` 534f714a188SAmr Mokhtar 535f714a188SAmr Mokhtar- ``OK`` 536f714a188SAmr Mokhtar 537f714a188SAmr Mokhtar``OK`` means no errors are expected. Cannot be used with other values. 538f714a188SAmr Mokhtar 539f714a188SAmr Mokhtar.. parsed-literal:: 540f714a188SAmr Mokhtar 541f714a188SAmr Mokhtar expected_status = 542f714a188SAmr Mokhtar FCW, CRC 543f714a188SAmr Mokhtar 544f714a188SAmr Mokhtar 545f714a188SAmr MokhtarTurbo encoder test vectors template 546c5e2e085SThomas Monjalon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 547f714a188SAmr Mokhtar 548f714a188SAmr MokhtarFor turbo encoder it has to be always set to ``RTE_BBDEV_OP_TURBO_ENC`` 549f714a188SAmr Mokhtar 550f714a188SAmr Mokhtar.. parsed-literal:: 551f714a188SAmr Mokhtar 552f714a188SAmr Mokhtar op_type = 553f714a188SAmr Mokhtar RTE_BBDEV_OP_TURBO_ENC 554f714a188SAmr Mokhtar 555f714a188SAmr MokhtarChain of uint32_t values 556f714a188SAmr Mokhtar 557f714a188SAmr Mokhtar.. parsed-literal:: 558f714a188SAmr Mokhtar 559f714a188SAmr Mokhtar input0 = 560f714a188SAmr Mokhtar 0x11d2bcac, 0x4d 561f714a188SAmr Mokhtar 562f714a188SAmr MokhtarChain of uint32_t values 563f714a188SAmr Mokhtar 564f714a188SAmr Mokhtar.. parsed-literal:: 565f714a188SAmr Mokhtar 566f714a188SAmr Mokhtar output0 = 567f714a188SAmr Mokhtar 0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29, 568f714a188SAmr Mokhtar 0xa25b7f47, 0x2aa224ce, 0x79f2 569f714a188SAmr Mokhtar 570f714a188SAmr Mokhtaruint32_t value 571f714a188SAmr Mokhtar 572f714a188SAmr Mokhtar.. parsed-literal:: 573f714a188SAmr Mokhtar 574f714a188SAmr Mokhtar e = 575f714a188SAmr Mokhtar 272 576f714a188SAmr Mokhtar 577f714a188SAmr Mokhtaruint16_t value 578f714a188SAmr Mokhtar 579f714a188SAmr Mokhtar.. parsed-literal:: 580f714a188SAmr Mokhtar 581f714a188SAmr Mokhtar k = 582f714a188SAmr Mokhtar 40 583f714a188SAmr Mokhtar 584f714a188SAmr Mokhtaruint16_t value 585f714a188SAmr Mokhtar 586f714a188SAmr Mokhtar.. parsed-literal:: 587f714a188SAmr Mokhtar 588f714a188SAmr Mokhtar ncb = 589f714a188SAmr Mokhtar 192 590f714a188SAmr Mokhtar 591f714a188SAmr Mokhtaruint8_t value 592f714a188SAmr Mokhtar 593f714a188SAmr Mokhtar.. parsed-literal:: 594f714a188SAmr Mokhtar 595f714a188SAmr Mokhtar rv_index = 596f714a188SAmr Mokhtar 0 597f714a188SAmr Mokhtar 598f714a188SAmr MokhtarChain of flags for turbo encoder operation. Following flags can be used: 599f714a188SAmr Mokhtar 600f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_RV_INDEX_BYPASS`` 601f714a188SAmr Mokhtar 602f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_RATE_MATCH`` 603f714a188SAmr Mokhtar 604f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_24B_ATTACH`` 605f714a188SAmr Mokhtar 606f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_CRC_24A_ATTACH`` 607f714a188SAmr Mokhtar 608f714a188SAmr Mokhtar- ``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER`` 609f714a188SAmr Mokhtar 610f714a188SAmr Mokhtar``RTE_BBDEV_TURBO_ENC_SCATTER_GATHER`` is used to indicate the parser to 611f714a188SAmr Mokhtarforce the input data to be memory split and formed as a segmented mbuf. 612f714a188SAmr Mokhtar 613f714a188SAmr Mokhtar 614f714a188SAmr Mokhtar.. parsed-literal:: 615f714a188SAmr Mokhtar 616f714a188SAmr Mokhtar op_flags = 617f714a188SAmr Mokhtar RTE_BBDEV_TURBO_RATE_MATCH 618f714a188SAmr Mokhtar 619f714a188SAmr MokhtarChain of operation statuses that are expected after operation is performed. 620f714a188SAmr MokhtarFollowing statuses can be used: 621f714a188SAmr Mokhtar 622f714a188SAmr Mokhtar- ``DMA`` 623f714a188SAmr Mokhtar 624f714a188SAmr Mokhtar- ``FCW`` 625f714a188SAmr Mokhtar 626f714a188SAmr Mokhtar- ``OK`` 627f714a188SAmr Mokhtar 628f714a188SAmr Mokhtar``OK`` means no errors are expected. Cannot be used with other values. 629f714a188SAmr Mokhtar 630f714a188SAmr Mokhtar.. parsed-literal:: 631f714a188SAmr Mokhtar 632f714a188SAmr Mokhtar expected_status = 633f714a188SAmr Mokhtar OK 634