The dpdk-test-bbdev tool is a Data Plane Development Kit (DPDK) utility that allows measuring performance parameters of PMDs available in the bbdev framework. Available tests available for execution are: latency, throughput, validation and sanity tests. Execution of tests can be customized using various parameters passed to a python running script.
Step 1: PMD setting
The dpdk-test-bbdev tool depends on crypto device drivers PMD which are disabled by default in the build configuration file common_base. The bbdevice drivers PMD which should be tested can be enabled by setting
CONFIG_RTE_LIBRTE_PMD_<name>=y
Setting example for (baseband_turbo_sw) PMD
CONFIG_RTE_LIBRTE_PMD_BBDEV_TURBO_SW=y
Step 2: Build the application
Execute the dpdk-setup.sh script to build the DPDK library together with the dpdk-test-bbdev application.
Initially, the user must select a DPDK target to choose the correct target type and compiler options to use when building the libraries. The user must have all libraries, modules, updates and compilers installed in the system prior to this, as described in the earlier chapters in this Getting Started Guide.
The tool application has a number of command line options:
python test-bbdev.py [-h] [-p TESTAPP_PATH] [-e EAL_PARAMS] [-t TIMEOUT]
[-c TEST_CASE [TEST_CASE ...]]
[-v TEST_VECTOR [TEST_VECTOR...]] [-n NUM_OPS]
[-b BURST_SIZE [BURST_SIZE ...]] [-l NUM_LCORES]
The following are the command-line options:
Defines test cases to run. If not specified all available tests are run.
Example usage:
Specifies paths to the test vector files. If not specified path is set based on $RTE_SDK environment variable concatenated with “/app/test-bbdev/test_vectors/bbdev_null.data” and indicates default data file.
Example usage:
There are 6 main test cases that can be executed using testbbdev tool:
Measures the CPU cycles consumed from the receipt of a user enqueue until it is put on the device queue
Thanks to the globbing functionality in python test-bbdev.py script allows to run tests with different set of vector files without giving all of them explicitly.
Example usage:
./test-bbdev.py -v app/test-bbdev/test_vectors/turbo_<enc/dec>_c<c>_k<k>_r<r>_e<e>_<extra-info>.data
It runs all tests with following vectors:
./test-bbdev.py -v app/test-bbdev/turbo_*_default.data
It runs all tests with “default” vectors.
Shortened tree of isg_cid-wireless_dpdk_ae with dpdk compiled for x86_64-native-linuxapp-icc target:
|-- app
|-- test-bbdev
|-- test_vectors
|-- bbdev_null.data
|-- turbo_dec_c1_k6144_r0_e34560_sbd_negllr.data
|-- turbo_enc_c1_k40_r0_e1196_rm.data
|-- turbo_enc_c2_k5952_r0_e17868_crc24b.data
|-- turbo_dec_c1_k40_r0_e17280_sbd_negllr.data
|-- turbo_dec_c1_k6144_r0_e34560_sbd_posllr.data
|-- turbo_enc_c1_k40_r0_e272_rm.data
|-- turbo_enc_c3_k4800_r2_e14412_crc24b.data
|-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
|-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr_crc24b.data
|-- turbo_enc_c1_k6144_r0_e120_rm_rvidx.data
|-- turbo_enc_c4_k4800_r2_e14412_crc24b.data
|-- turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_low_snr.data
|-- turbo_dec_c2_k3136_r0_e4920_sbd_negllr.data
|-- turbo_enc_c1_k6144_r0_e18444.data
|-- turbo_dec_c1_k6144_r0_e34560_negllr.data
|-- turbo_enc_c1_k40_r0_e1190_rm.data
|-- turbo_enc_c1_k6144_r0_e18448_crc24a.data
|-- turbo_dec_c1_k6144_r0_e34560_posllr.data
|-- turbo_enc_c1_k40_r0_e1194_rm.data
|-- turbo_enc_c1_k6144_r0_e32256_crc24b_rm.data
|-- x86_64-native-linuxapp-icc
|-- app
|-- testbbdev
./test-bbdev.py -p ../../x86_64-native-linuxapp-icc/app/testbbdev
-v turbo_dec_default.data
It runs all available tests using the test vector filled based on turbo_dec_default.data file. By default number of operations to process on device is set to 32, timeout is set to 300s and operations enqueue/dequeue burst size is set to 32. Moreover a bbdev (baseband_null) device will be created.
./test-bbdev.py -p ../../x86_64-native-linuxapp-icc/app/testbbdev
-e="--vdev=baseband_turbo_sw" -t 120 -c validation
-v ./test_vectors/turbo_* -n 64 -b 8 32
It runs validation test for each vector file that matches the given pattern. Number of operations to process on device is set to 64 and operations timeout is set to 120s and enqueue/dequeue burst size is set to 8 and to 32. Moreover a bbdev (baseband_turbo_sw) device will be created.
Executing bbdev null device with bbdev_null.data helps in measuring the overhead introduced by the bbdev framework.
./test-bbdev.py -e="--vdev=baseband_null0"
-v ./test_vectors/bbdev_null.data
Note:
baseband_null device does not have to be defined explicitly as it is created by default.
Test Vector files contain the data which is used to set turbo decoder/encoder parameters and buffers for validation purpose. New test vector files should be stored in app/test-bbdev/test_vectors/ directory. Detailed description of the syntax of the test vector files is in the following section.
Line started with # is treated as a comment and is ignored.
If variable is a chain of values, values should be separated by a comma. If assignment is split into several lines, each line (except the last one) has to be ended with a comma. There is no comma after last value in last line. Correct assignment should look like the following:
variable =
value, value, value, value,
value, value
In case where variable is a single value correct assignment looks like the following:
variable =
value
Length of chain variable is calculated by parser. Can not be defined explicitly.
Variable op_type has to be defined as a first variable in file. It specifies what type of operations will be executed. For decoder op_type has to be set to RTE_BBDEV_OP_TURBO_DEC and for encoder to RTE_BBDEV_OP_TURBO_ENC.
Full details of the meaning and valid values for the below fields are documented in rte_bbdev_op.h
For turbo decoder it has to be always set to RTE_BBDEV_OP_TURBO_DEC
op_type =
RTE_BBDEV_OP_TURBO_DEC
Chain of uint32_t values. Note that it is possible to define more than one input/output entries which will result in chaining two or more data structures for segmented Transport Blocks
input0 =
0x00000000, 0x7f817f00, 0x7f7f8100, 0x817f8100, 0x81008100, 0x7f818100, 0x81817f00, 0x7f818100,
0x81007f00, 0x7f818100, 0x817f8100, 0x81817f00, 0x81008100, 0x817f7f00, 0x7f7f8100, 0x81817f00
Chain of uint32_t values
input1 =
0x7f7f0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
Chain of uint32_t values
input2 =
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
Chain of uint32_t values
hard_output0 =
0xa7d6732e
Chain of uint32_t values
hard_output1 =
0xa61
Chain of uint32_t values
soft_output0 =
0x817f817f, 0x7f817f7f, 0x81818181, 0x817f7f81, 0x7f818181, 0x8181817f, 0x817f817f, 0x8181817f
Chain of uint32_t values
soft_output1 =
0x817f7f81, 0x7f7f7f81, 0x7f7f8181
uint32_t value
e =
44
uint16_t value
k =
40
uint8_t value
rv_index =
0
uint8_t value
iter_max =
8
uint8_t value
iter_min =
4
uint8_t value
expected_iter_count =
8
uint8_t value
ext_scale =
15
uint8_t value
num_maps =
0
Chain of flags for turbo decoder operation. Following flags can be used:
Example:
op_flags = RTE_BBDEV_TURBO_SUBBLOCK_DEINTERLEAVE, RTE_BBDEV_TURBO_EQUALIZER, RTE_BBDEV_TURBO_SOFT_OUTPUT
Chain of operation statuses that are expected after operation is performed. Following statuses can be used:
OK means no errors are expected. Cannot be used with other values.
expected_status =
FCW, CRC
For turbo encoder it has to be always set to RTE_BBDEV_OP_TURBO_ENC
op_type =
RTE_BBDEV_OP_TURBO_ENC
Chain of uint32_t values
input0 =
0x11d2bcac, 0x4d
Chain of uint32_t values
output0 =
0xd2399179, 0x640eb999, 0x2cbaf577, 0xaf224ae2, 0x9d139927, 0xe6909b29,
0xa25b7f47, 0x2aa224ce, 0x79f2
uint32_t value
e =
272
uint16_t value
k =
40
uint16_t value
ncb =
192
uint8_t value
rv_index =
0
Chain of flags for turbo encoder operation. Following flags can be used:
RTE_BBDEV_TURBO_ENC_SCATTER_GATHER is used to indicate the parser to force the input data to be memory split and formed as a segmented mbuf.
op_flags =
RTE_BBDEV_TURBO_RATE_MATCH
Chain of operation statuses that are expected after operation is performed. Following statuses can be used:
OK means no errors are expected. Cannot be used with other values.
expected_status =
OK