DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/compress: fix size of test buffer
@ 2019-01-24 12:05 Marko Kovacevic
  2019-01-24 18:24 ` Kovacevic, Marko
  0 siblings, 1 reply; 4+ messages in thread
From: Marko Kovacevic @ 2019-01-24 12:05 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, Marko Kovacevic

Changed size of test buffer to 100 to allow
qat to run compress unit-test,
qat_comp_process_response():
QAT intermediate buffer may be too small for output,
try configuring a larger size

Fixes: c1bbb613ce96 ("test/compress: add out of space test")
Cc: marko.kovacevic@intel.com

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 test/test/test_compressdev.c | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
index e8476ed..4db65c4 100644
--- a/test/test/test_compressdev.c
+++ b/test/test/test_compressdev.c
@@ -42,7 +42,7 @@
 #define GZIP_HEADER_SIZE 10
 #define GZIP_TRAILER_SIZE 8
 
-#define OUT_OF_SPACE_BUF 1
+#define OUT_OF_SPACE_BUF 100
 
 const char *
 huffman_type_strings[] = {
@@ -597,13 +597,15 @@ prepare_sgl_bufs(const char *test_buf, struct rte_mbuf *head_buf,
 		uint32_t total_data_size,
 		struct rte_mempool *small_mbuf_pool,
 		struct rte_mempool *large_mbuf_pool,
-		uint8_t limit_segs_in_sgl)
+		uint8_t limit_segs_in_sgl,
+		const struct test_data_params *test_params)
 {
 	uint32_t remaining_data = total_data_size;
 	uint16_t num_remaining_segs = DIV_CEIL(remaining_data, SMALL_SEG_SIZE);
 	struct rte_mempool *pool;
 	struct rte_mbuf *next_seg;
 	uint32_t data_size;
+	unsigned int out_of_space = test_params->out_of_space;
 	char *buf_ptr;
 	const char *data_ptr = test_buf;
 	uint16_t i;
@@ -639,6 +641,10 @@ prepare_sgl_bufs(const char *test_buf, struct rte_mbuf *head_buf,
 	 * Allocate the rest of the segments,
 	 * copy the rest of the data and chain the segments.
 	 */
+	if (out_of_space)
+		num_remaining_segs = 1;
+
+
 	for (i = 0; i < num_remaining_segs; i++) {
 
 		if (i == (num_remaining_segs - 1)) {
@@ -647,9 +653,11 @@ prepare_sgl_bufs(const char *test_buf, struct rte_mbuf *head_buf,
 				pool = large_mbuf_pool;
 			else
 				pool = small_mbuf_pool;
-			data_size = remaining_data;
+			out_of_space ? data_size = out_of_space :
+					(data_size = remaining_data);
 		} else {
-			data_size = SMALL_SEG_SIZE;
+
+			(data_size = SMALL_SEG_SIZE);
 			pool = small_mbuf_pool;
 		}
 
@@ -759,7 +767,8 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,
 					data_size,
 					ts_params->small_mbuf_pool,
 					ts_params->large_mbuf_pool,
-					MAX_SEGS) < 0)
+					MAX_SEGS,
+					test_data) < 0)
 				goto exit;
 		}
 	} else {
@@ -791,7 +800,8 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,
 					data_size,
 					ts_params->small_mbuf_pool,
 					ts_params->large_mbuf_pool,
-					MAX_SEGS) < 0)
+					MAX_SEGS,
+					test_data) < 0)
 				goto exit;
 		}
 
@@ -1019,7 +1029,8 @@ test_deflate_comp_decomp(const struct interim_data_params *int_data,
 					data_size,
 					ts_params->small_mbuf_pool,
 					ts_params->large_mbuf_pool,
-					MAX_SEGS) < 0)
+					MAX_SEGS,
+					test_data) < 0)
 				goto exit;
 		}
 
-- 
2.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] test/compress: fix size of test buffer
  2019-01-24 12:05 [dpdk-dev] [PATCH] test/compress: fix size of test buffer Marko Kovacevic
@ 2019-01-24 18:24 ` Kovacevic, Marko
  0 siblings, 0 replies; 4+ messages in thread
From: Kovacevic, Marko @ 2019-01-24 18:24 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal

> Changed size of test buffer to 100 to allow qat to run compress unit-test,
> qat_comp_process_response():
> QAT intermediate buffer may be too small for output, try configuring a larger
> size
> 
> Fixes: c1bbb613ce96 ("test/compress: add out of space test")
> Cc: marko.kovacevic@intel.com
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> ---
>  test/test/test_compressdev.c | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
> index e8476ed..4db65c4 100644
> --- a/test/test/test_compressdev.c
> +++ b/test/test/test_compressdev.c
> @@ -42,7 +42,7 @@
>  #define GZIP_HEADER_SIZE 10
>  #define GZIP_TRAILER_SIZE 8
> 
> -#define OUT_OF_SPACE_BUF 1
> +#define OUT_OF_SPACE_BUF 100
> 
>  const char *
>  huffman_type_strings[] = {
> @@ -597,13 +597,15 @@ prepare_sgl_bufs(const char *test_buf, struct
> rte_mbuf *head_buf,
>  		uint32_t total_data_size,
>  		struct rte_mempool *small_mbuf_pool,
>  		struct rte_mempool *large_mbuf_pool,
> -		uint8_t limit_segs_in_sgl)
> +		uint8_t limit_segs_in_sgl,
> +		const struct test_data_params *test_params)
>  {
>  	uint32_t remaining_data = total_data_size;
>  	uint16_t num_remaining_segs = DIV_CEIL(remaining_data,
> SMALL_SEG_SIZE);
>  	struct rte_mempool *pool;
>  	struct rte_mbuf *next_seg;
>  	uint32_t data_size;
> +	unsigned int out_of_space = test_params->out_of_space;
>  	char *buf_ptr;
>  	const char *data_ptr = test_buf;
>  	uint16_t i;
> @@ -639,6 +641,10 @@ prepare_sgl_bufs(const char *test_buf, struct
> rte_mbuf *head_buf,
>  	 * Allocate the rest of the segments,
>  	 * copy the rest of the data and chain the segments.
>  	 */
> +	if (out_of_space)
> +		num_remaining_segs = 1;
> +
> +
>  	for (i = 0; i < num_remaining_segs; i++) {
> 
>  		if (i == (num_remaining_segs - 1)) {
> @@ -647,9 +653,11 @@ prepare_sgl_bufs(const char *test_buf, struct
> rte_mbuf *head_buf,
>  				pool = large_mbuf_pool;
>  			else
>  				pool = small_mbuf_pool;
> -			data_size = remaining_data;
> +			out_of_space ? data_size = out_of_space :
> +					(data_size = remaining_data);
>  		} else {
> -			data_size = SMALL_SEG_SIZE;
> +
> +			(data_size = SMALL_SEG_SIZE);
>  			pool = small_mbuf_pool;
>  		}
> 
> @@ -759,7 +767,8 @@ test_deflate_comp_decomp(const struct
> interim_data_params *int_data,
>  					data_size,
>  					ts_params->small_mbuf_pool,
>  					ts_params->large_mbuf_pool,
> -					MAX_SEGS) < 0)
> +					MAX_SEGS,
> +					test_data) < 0)
>  				goto exit;
>  		}
>  	} else {
> @@ -791,7 +800,8 @@ test_deflate_comp_decomp(const struct
> interim_data_params *int_data,
>  					data_size,
>  					ts_params->small_mbuf_pool,
>  					ts_params->large_mbuf_pool,
> -					MAX_SEGS) < 0)
> +					MAX_SEGS,
> +					test_data) < 0)
>  				goto exit;
>  		}
> 
> @@ -1019,7 +1029,8 @@ test_deflate_comp_decomp(const struct
> interim_data_params *int_data,
>  					data_size,
>  					ts_params->small_mbuf_pool,
>  					ts_params->large_mbuf_pool,
> -					MAX_SEGS) < 0)
> +					MAX_SEGS,
> +					test_data) < 0)
>  				goto exit;
>  		}
> 
> --

Self Nack

After some investigation from Pablo and after a conversation was had we have come to the conclusion that there might be an error somewhere else and just a check that needs to be added and that the unit test just exposed it and not that the unit test itself was wrong I can't confirm that as of yet until further investigation is done

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] test/compress: fix size of test buffer
  2019-01-22 11:17 Marko Kovacevic
@ 2019-01-22 13:43 ` Kovacevic, Marko
  0 siblings, 0 replies; 4+ messages in thread
From: Kovacevic, Marko @ 2019-01-22 13:43 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal

> Changed size of test buffer to 100 to allow qat to run compress unit-test,
> qat_comp_process_response():
> QAT intermediate buffer may be too small for output, try configuring a larger
> size
> 
> Fixes: c1bbb613ce96 ("test/compress: add out of space test")
> Cc: marko.kovacevic@intel.com
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> ---
>  test/test/test_compressdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
> index e8476ed..99cc390 100644
> --- a/test/test/test_compressdev.c
> +++ b/test/test/test_compressdev.c
> @@ -42,7 +42,7 @@
>  #define GZIP_HEADER_SIZE 10
>  #define GZIP_TRAILER_SIZE 8
> 

Changing this caused the isal_compression to fail and not run
Need more investigation

Self Nack

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] test/compress: fix size of test buffer
@ 2019-01-22 11:17 Marko Kovacevic
  2019-01-22 13:43 ` Kovacevic, Marko
  0 siblings, 1 reply; 4+ messages in thread
From: Marko Kovacevic @ 2019-01-22 11:17 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, Marko Kovacevic

Changed size of test buffer to 100 to allow
qat to run compress unit-test,
qat_comp_process_response():
QAT intermediate buffer may be too small for output,
try configuring a larger size

Fixes: c1bbb613ce96 ("test/compress: add out of space test")
Cc: marko.kovacevic@intel.com

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 test/test/test_compressdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
index e8476ed..99cc390 100644
--- a/test/test/test_compressdev.c
+++ b/test/test/test_compressdev.c
@@ -42,7 +42,7 @@
 #define GZIP_HEADER_SIZE 10
 #define GZIP_TRAILER_SIZE 8
 
-#define OUT_OF_SPACE_BUF 1
+#define OUT_OF_SPACE_BUF 100
 
 const char *
 huffman_type_strings[] = {
-- 
2.9.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-24 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 12:05 [dpdk-dev] [PATCH] test/compress: fix size of test buffer Marko Kovacevic
2019-01-24 18:24 ` Kovacevic, Marko
  -- strict thread matches above, loose matches on Subject: below --
2019-01-22 11:17 Marko Kovacevic
2019-01-22 13:43 ` Kovacevic, Marko

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).