* [dpdk-dev] [PATCH] test/compress: improve debug trace setup
@ 2018-11-19 13:52 Lee Daly
2018-11-27 13:24 ` Jozwiak, TomaszX
0 siblings, 1 reply; 3+ messages in thread
From: Lee Daly @ 2018-11-19 13:52 UTC (permalink / raw)
To: fiona.trahe, tomaszx.jozwiak; +Cc: dev, Lee Daly
This removes the magic number from the assignment of the engine variable,
which is used in the debug trace.
Signed-off-by: Lee Daly <lee.daly@intel.com>
---
test/test/test_compressdev.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
index b9748ce..a53e946 100644
--- a/test/test/test_compressdev.c
+++ b/test/test/test_compressdev.c
@@ -881,11 +881,9 @@ test_deflate_comp_decomp(const char * const test_bufs[],
&compress_xforms[xform_idx]->compress;
enum rte_comp_huffman huffman_type =
compress_xform->deflate.huffman;
- char engine[22];
- if (zlib_dir == ZLIB_COMPRESS || zlib_dir == ZLIB_ALL)
- strlcpy(engine, "zlib (direct, no pmd)", 22);
- else
- strlcpy(engine, "pmd", 22);
+ char engine[] = "zlib (directly, not PMD)";
+ if (zlib_dir != ZLIB_COMPRESS || zlib_dir != ZLIB_ALL)
+ strlcpy(engine, "PMD", sizeof(engine));
RTE_LOG(DEBUG, USER1, "Buffer %u compressed by %s from %u to"
" %u bytes (level = %d, huffman = %s)\n",
@@ -1092,11 +1090,9 @@ 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);
- char engine[22];
- if (zlib_dir == ZLIB_DECOMPRESS || zlib_dir == ZLIB_ALL)
- strlcpy(engine, "zlib (direct, no pmd)", 22);
- else
- strlcpy(engine, "pmd", 22);
+ char engine[] = "zlib, (directly, no PMD)";
+ if (zlib_dir != ZLIB_DECOMPRESS || zlib_dir != ZLIB_ALL)
+ strlcpy(engine, "pmd", sizeof(engine));
RTE_LOG(DEBUG, USER1,
"Buffer %u decompressed by %s from %u to %u bytes\n",
buf_idx[priv_data->orig_idx], engine,
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] test/compress: improve debug trace setup
2018-11-19 13:52 [dpdk-dev] [PATCH] test/compress: improve debug trace setup Lee Daly
@ 2018-11-27 13:24 ` Jozwiak, TomaszX
2018-12-18 10:19 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Jozwiak, TomaszX @ 2018-11-27 13:24 UTC (permalink / raw)
To: Daly, Lee, Trahe, Fiona; +Cc: dev
> -----Original Message-----
> From: Daly, Lee
> Sent: Monday, November 19, 2018 2:53 PM
> To: Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
> <tomaszx.jozwiak@intel.com>
> Cc: dev@dpdk.org; Daly, Lee <lee.daly@intel.com>
> Subject: [PATCH] test/compress: improve debug trace setup
>
> This removes the magic number from the assignment of the engine variable,
> which is used in the debug trace.
>
> Signed-off-by: Lee Daly <lee.daly@intel.com>
> ---
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] test/compress: improve debug trace setup
2018-11-27 13:24 ` Jozwiak, TomaszX
@ 2018-12-18 10:19 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2018-12-18 10:19 UTC (permalink / raw)
To: Jozwiak, TomaszX, Daly, Lee, Trahe, Fiona; +Cc: dev
On 11/27/2018 6:54 PM, Jozwiak, TomaszX wrote:
>
>> -----Original Message-----
>> From: Daly, Lee
>> Sent: Monday, November 19, 2018 2:53 PM
>> To: Trahe, Fiona <fiona.trahe@intel.com>; Jozwiak, TomaszX
>> <tomaszx.jozwiak@intel.com>
>> Cc: dev@dpdk.org; Daly, Lee <lee.daly@intel.com>
>> Subject: [PATCH] test/compress: improve debug trace setup
>>
>> This removes the magic number from the assignment of the engine variable,
>> which is used in the debug trace.
>>
>> Signed-off-by: Lee Daly <lee.daly@intel.com>
>> ---
> Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Applied to dpdk-next-crypto
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-18 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 13:52 [dpdk-dev] [PATCH] test/compress: improve debug trace setup Lee Daly
2018-11-27 13:24 ` Jozwiak, TomaszX
2018-12-18 10:19 ` Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).