Skip to contentSkip to conversation

accel-config/test: Fix bug of setting max destination size

PATCH In review Li Zhang 2 participants 2 messages Jun 14, 2022

lore
Share & tools
lore

Li Zhang

author
#0 lore raw

PATCH 1/1 accel-config/test: Fix bug of setting max destination size

It's incorrect to use a fixed size for setting the max destination size, replace it with setting wq_max_xfer_size to the max destination size in descriptor register.

Signed-off-by Li Zhang <li4.zhang(a)intel.com>
---
 test/iaa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
test/iaa.c +3 -3
index 7cc11c7..ad6c521 100644
@@ -567,7 +567,7 @@ int iaa_compress_multi_task_nodes(struct acctest_context *ctx)
 
 		tsk_node->tsk->iaa_compr_flags = (IDXD_COMPRESS_FLAG_EOB_BFINAL |
 						  IDXD_COMPRESS_FLAG_FLUSH_OUTPUT);
-		tsk_node->tsk->iaa_max_dst_size = IAA_COMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
 		iaa_prep_compress(tsk_node->tsk);
 		tsk_node = tsk_node->next;
@@ -625,7 +625,7 @@ int iaa_decompress_multi_task_nodes(struct acctest_context *ctx)
 
 		tsk_node->tsk->iaa_compr_flags = (IDXD_COMPRESS_FLAG_EOB_BFINAL |
 						  IDXD_COMPRESS_FLAG_FLUSH_OUTPUT);
-		tsk_node->tsk->iaa_max_dst_size = IAA_DECOMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
 		iaa_prep_compress(tsk_node->tsk);
 		tsk_node = tsk_node->next;
@@ -676,7 +676,7 @@ int iaa_decompress_multi_task_nodes(struct acctest_context *ctx)
 						    IDXD_DECOMPRESS_FLAG_STOP_ON_EOB |
 						    IDXD_DECOMPRESS_FLAG_FLUSH_OUTPUT |
 						    IDXD_DECOMPRESS_FLAG_EN_DECOMPRESS);
-		tsk_node->tsk->iaa_max_dst_size = IAA_DECOMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
 		iaa_prep_decompress(tsk_node->tsk);
 		tsk_node = tsk_node->next;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Li Zhang

It's incorrect to use a fixed size for setting the max destination size, replace it with setting wq_max_xfer_size to the max destination size in descriptor register.

Signed-off-by Li Zhang <li4.zhang(a)intel.com>
Reviewed-by Dave Jiang <dave.jiang(a)intel.com>
Quoted 35 lines
---
  test/iaa.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
test/iaa.c +3 -3
index 7cc11c7..ad6c521 100644
@@ -567,7 +567,7 @@ int iaa_compress_multi_task_nodes(struct acctest_context *ctx)
 
  		tsk_node->tsk->iaa_compr_flags = (IDXD_COMPRESS_FLAG_EOB_BFINAL |
  						  IDXD_COMPRESS_FLAG_FLUSH_OUTPUT);
-		tsk_node->tsk->iaa_max_dst_size = IAA_COMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
  		iaa_prep_compress(tsk_node->tsk);
  		tsk_node = tsk_node->next;
@@ -625,7 +625,7 @@ int iaa_decompress_multi_task_nodes(struct acctest_context *ctx)
 
  		tsk_node->tsk->iaa_compr_flags = (IDXD_COMPRESS_FLAG_EOB_BFINAL |
  						  IDXD_COMPRESS_FLAG_FLUSH_OUTPUT);
-		tsk_node->tsk->iaa_max_dst_size = IAA_DECOMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
  		iaa_prep_compress(tsk_node->tsk);
  		tsk_node = tsk_node->next;
@@ -676,7 +676,7 @@ int iaa_decompress_multi_task_nodes(struct acctest_context *ctx)
  						    IDXD_DECOMPRESS_FLAG_STOP_ON_EOB |
  						    IDXD_DECOMPRESS_FLAG_FLUSH_OUTPUT |
  						    IDXD_DECOMPRESS_FLAG_EN_DECOMPRESS);
-		tsk_node->tsk->iaa_max_dst_size = IAA_DECOMPRESS_MAX_DEST_SIZE;
+		tsk_node->tsk->iaa_max_dst_size = ctx->wq_max_xfer_size;
 
  		iaa_prep_decompress(tsk_node->tsk);
  		tsk_node = tsk_node->next;