105. CompressDev ZLIB PMD Tests¶
105.1. Description¶
The ZLIB PMD (librte_pmd_zlib) provides poll mode compression & decompression driver based on SW zlib library.
The supported Compression/Decompression algorithm:
DEFLATE - using Fixed and Dynamic Huffman encoding
For more details, please reference to dpdk online programming guide.
105.2. Prerequisites¶
In order to enable this virtual compression PMD, user must:
Set CONFIG_RTE_LIBRTE_PMD_ZLIB=y in config/common_base.
A compress performance test app is added into DPDK to test CompressDev.
Calgary corpus is a collection of text and binary data files, commonly used for comparing data compression algorithms.
105.3. Test Case: Compressdev ZLIB PMD Unit test¶
Start test application and run zlib pmd unit test:
./app/test -l1 -n1 -w vdev_bus_id --vdev=compress_zlib
RTE>>compressdev_autotest
Verify all test cases passed in the test.
105.4. Test Case: Compressdev ZLIB PMD fixed function test¶
Run Compressdev zlib pmd test with below sample commands:
./app/dpdk-test-compress-perf -w vdev_bus_id -l 4 \
--vdev=compress_zlib -- --driver-name compress_zlib --input-file file_name \
--compress-level level --num-iter number --huffman-enc fixed
Perform the test with fixed huffman-enc.
Test all the file types in calgary corpus, all files should pass the test.
105.5. Test Case: Compressdev ZLIB PMD dynamic function test¶
Run Compressdev zlib pmd test with below sample commands:
./app/dpdk-test-compress-perf -w vdev_bus_id -l 4 \
--vdev=compress_zlib -- --driver-name compress_zlib --input-file file_name \
--compress-level level --num-iter number --huffman-enc dynamic
Perform the test with dynamic huffman-enc.
Test all the file types in calgary corpus, all files should pass the test.
105.6. Test Case: Compressdev ZLIB PMD fixed performance test¶
Run Compressdev zlib pmd performance test with below sample commands:
./app/dpdk-test-compress-perf -w vdev_bus_id -l 4 \
--vdev=compress_zlib -- --driver-name compress_zlib --input-file file_name \
--compress-level level --seg-sz size --num-iter number --huffman-enc fixed
Perform the test with fixed huffman-enc and calgary file.
Run the test with seg-sz 1k, 2k, 4k, 8k, 16k and 32k respectively.
105.7. Test Case: Compressdev ZLIB PMD dynamic performance test¶
Run Compressdev zlib pmd performance test with below sample commands:
./app/dpdk-test-compress-perf -w vdev_bus_id -l 4 \
--vdev=compress_zlib -- --driver-name compress_zlib --input-file file_name \
--compress-level level --seg-sz size --num-iter number --huffman-enc dynamic
Perform the test with dynamic huffman-enc and calgary file.
Run the test with seg-sz 1k, 2k, 4k, 8k, 16k and 32k respectively.