[v1,2/9] test/bbdev: fix MLD output size computation

Message ID 20240422190800.123027-3-hernan.vargas@intel.com (mailing list archive)
State New
Delegated to: Maxime Coquelin
Headers
Series test-bbdev fixes and improvements for 24.07 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hernan Vargas April 22, 2024, 7:07 p.m. UTC
  For perf tests, the operation size for the MLD-TS was incorrect.
Fixed so that the performance numbers are correct.
Largely cosmetic only.

Fixes: 95f192a40e35 ("test/bbdev: add MLD cases")
Cc: stable@dpdk.org

Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
  

Patch

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index efd046984d58..9ed0c4648d24 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -2896,8 +2896,14 @@  calc_fft_size(struct rte_bbdev_fft_op *op)
 static uint32_t
 calc_mldts_size(struct rte_bbdev_mldts_op *op)
 {
-	uint32_t output_size;
-	output_size = op->mldts.num_layers * op->mldts.num_rbs * op->mldts.c_rep;
+	uint32_t output_size = 0;
+	uint16_t i;
+
+	for (i = 0; i < op->mldts.num_layers; i++)
+		output_size += op->mldts.q_m[i];
+
+	output_size *= 12 * 8 * op->mldts.num_rbs * (op->mldts.c_rep + 1);
+
 	return output_size;
 }