X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest%2Ftest_compressdev.c;h=5d5e5190b15d94e56c88317f4a9c290ef6801fb8;hb=219737bfb6f9200e4c9189ab1668029c76a9be62;hp=86453882afed008712779aa948e825d45a2a74d8;hpb=8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82;p=deb_dpdk.git diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c index 86453882..5d5e5190 100644 --- a/test/test/test_compressdev.c +++ b/test/test/test_compressdev.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "test_compressdev_test_buffer.h" #include "test.h" @@ -856,13 +857,20 @@ test_deflate_comp_decomp(const char * const test_bufs[], &compress_xforms[xform_idx]->compress; enum rte_comp_huffman huffman_type = compress_xform->deflate.huffman; - RTE_LOG(DEBUG, USER1, "Buffer %u compressed from %u to %u bytes " - "(level = %d, huffman = %s)\n", - buf_idx[priv_data->orig_idx], + char engine[22]; + if (zlib_dir == ZLIB_COMPRESS || zlib_dir == ZLIB_ALL) + strlcpy(engine, "zlib (direct, no pmd)", 22); + else + strlcpy(engine, "pmd", 22); + + RTE_LOG(DEBUG, USER1, "Buffer %u compressed by %s from %u to" + " %u bytes (level = %d, huffman = %s)\n", + buf_idx[priv_data->orig_idx], engine, ops_processed[i]->consumed, ops_processed[i]->produced, compress_xform->level, huffman_type_strings[huffman_type]); - RTE_LOG(DEBUG, USER1, "Compression ratio = %.2f", + RTE_LOG(DEBUG, USER1, "Compression ratio = %.2f\n", + ops_processed[i]->consumed == 0 ? 0 : (float)ops_processed[i]->produced / ops_processed[i]->consumed * 100); ops[i] = NULL; @@ -1058,8 +1066,14 @@ test_deflate_comp_decomp(const char * const test_bufs[], for (i = 0; i < num_bufs; i++) { priv_data = (struct priv_op_data *)(ops_processed[i] + 1); - RTE_LOG(DEBUG, USER1, "Buffer %u decompressed from %u to %u bytes\n", - buf_idx[priv_data->orig_idx], + char engine[22]; + if (zlib_dir == ZLIB_DECOMPRESS || zlib_dir == ZLIB_ALL) + strlcpy(engine, "zlib (direct, no pmd)", 22); + else + strlcpy(engine, "pmd", 22); + RTE_LOG(DEBUG, USER1, + "Buffer %u decompressed by %s from %u to %u bytes\n", + buf_idx[priv_data->orig_idx], engine, ops_processed[i]->consumed, ops_processed[i]->produced); ops[i] = NULL; }