* [PATCH] test/compress: improve trace
@ 2018-10-31 0:42 Fiona Trahe
2018-10-31 10:22 ` Daly, Lee
2018-11-01 21:31 ` Jozwiak, TomaszX
0 siblings, 2 replies; 4+ messages in thread
From: Fiona Trahe @ 2018-10-31 0:42 UTC (permalink / raw)
To: dev; +Cc: thomas, akhil.goyal, tomaszx.jozwiak, lee.daly, Fiona Trahe
Make clear which engine is compressing and which is decompressing
in debug output. Also add newline and print ratio = 0 if test fails.
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
test/test/test_compressdev.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
index 8645388..5d5e519 100644
--- a/test/test/test_compressdev.c
+++ b/test/test/test_compressdev.c
@@ -10,6 +10,7 @@
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_compressdev.h>
+#include <rte_string_fns.h>
#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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test/compress: improve trace
2018-10-31 0:42 [PATCH] test/compress: improve trace Fiona Trahe
@ 2018-10-31 10:22 ` Daly, Lee
2018-11-01 21:31 ` Jozwiak, TomaszX
1 sibling, 0 replies; 4+ messages in thread
From: Daly, Lee @ 2018-10-31 10:22 UTC (permalink / raw)
To: Trahe, Fiona, dev; +Cc: thomas, akhil.goyal, Jozwiak, TomaszX
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, October 31, 2018 12:42 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; akhil.goyal@nxp.com; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>; Daly, Lee <lee.daly@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>
> Subject: [PATCH] test/compress: improve trace
>
> Make clear which engine is compressing and which is decompressing in
> debug output. Also add newline and print ratio = 0 if test fails.
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
> test/test/test_compressdev.c | 26 ++++++++++++++++++++------
> 1 file changed, 20 insertions(+), 6 deletions(-)
>
> diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
> index 8645388..5d5e519 100644
> --- a/test/test/test_compressdev.c
> +++ b/test/test/test_compressdev.c
<...>
Acked-by: Lee Daly <lee.daly@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test/compress: improve trace
2018-10-31 0:42 [PATCH] test/compress: improve trace Fiona Trahe
2018-10-31 10:22 ` Daly, Lee
@ 2018-11-01 21:31 ` Jozwiak, TomaszX
2018-11-02 11:38 ` Akhil Goyal
1 sibling, 1 reply; 4+ messages in thread
From: Jozwiak, TomaszX @ 2018-11-01 21:31 UTC (permalink / raw)
To: Trahe, Fiona, dev; +Cc: thomas, akhil.goyal, Daly, Lee
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, October 31, 2018 1:42 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; akhil.goyal@nxp.com; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>; Daly, Lee <lee.daly@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>
> Subject: [PATCH] test/compress: improve trace
>
> Make clear which engine is compressing and which is decompressing in
> debug output. Also add newline and print ratio = 0 if test fails.
>
> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> ---
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test/compress: improve trace
2018-11-01 21:31 ` Jozwiak, TomaszX
@ 2018-11-02 11:38 ` Akhil Goyal
0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2018-11-02 11:38 UTC (permalink / raw)
To: Jozwiak, TomaszX, Trahe, Fiona, dev; +Cc: thomas, Daly, Lee
On 11/2/2018 3:01 AM, Jozwiak, TomaszX wrote:
>
>> -----Original Message-----
>> From: Trahe, Fiona
>> Sent: Wednesday, October 31, 2018 1:42 AM
>> To: dev@dpdk.org
>> Cc: thomas@monjalon.net; akhil.goyal@nxp.com; Jozwiak, TomaszX
>> <tomaszx.jozwiak@intel.com>; Daly, Lee <lee.daly@intel.com>; Trahe, Fiona
>> <fiona.trahe@intel.com>
>> Subject: [PATCH] test/compress: improve trace
>>
>> Make clear which engine is compressing and which is decompressing in
>> debug output. Also add newline and print ratio = 0 if test fails.
>>
>> Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
>> ---
> Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-02 11:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 0:42 [PATCH] test/compress: improve trace Fiona Trahe
2018-10-31 10:22 ` Daly, Lee
2018-11-01 21:31 ` Jozwiak, TomaszX
2018-11-02 11:38 ` Akhil Goyal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.