DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/compress-perf: fix remaining data for ops
@ 2023-03-10 16:27 Ciara Power
  2023-03-15 10:31 ` Ji, Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Ciara Power @ 2023-03-10 16:27 UTC (permalink / raw)
  Cc: dev, kai.ji, Arkadiusz Kusztal, michaelba, Ciara Power

From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>

Individual variables are needed for tracking the remaining data for
compression and decompression.

Fixes: 83cc3b90ad7a ("app/compress-perf: fix testing single operation")
Cc: michaelba@nvidia.com

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test-compress-perf/comp_perf_test_common.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c
index cd60958944..78487196ad 100644
--- a/app/test-compress-perf/comp_perf_test_common.c
+++ b/app/test-compress-perf/comp_perf_test_common.c
@@ -366,6 +366,7 @@ int
 prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 {
 	uint32_t remaining_data = test_data->input_data_sz;
+	uint32_t remaining_data_decomp = test_data->input_data_sz;
 	uint8_t *input_data_ptr = test_data->input_data;
 	size_t data_sz = 0;
 	uint8_t *data_addr;
@@ -482,7 +483,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 		}
 
 		if (decompress_only)
-			data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
+			data_sz = RTE_MIN(remaining_data_decomp, test_data->seg_sz);
 		else
 			data_sz = test_data->out_seg_sz;
 
@@ -496,11 +497,11 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 		if (decompress_only) {
 			rte_memcpy(data_addr, input_data_ptr, data_sz);
 			input_data_ptr += data_sz;
-			remaining_data -= data_sz;
+			remaining_data_decomp -= data_sz;
 		}
 
 		/* Chain mbufs if needed for output mbufs */
-		for (j = 1; j < segs_per_mbuf && remaining_data > 0; j++) {
+		for (j = 1; j < segs_per_mbuf && remaining_data_decomp > 0; j++) {
 			struct rte_mbuf *next_seg =
 				rte_pktmbuf_alloc(mem->comp_buf_pool);
 
@@ -521,7 +522,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 			}
 
 			if (decompress_only)
-				data_sz = RTE_MIN(remaining_data,
+				data_sz = RTE_MIN(remaining_data_decomp,
 						  test_data->seg_sz);
 			else
 				data_sz = test_data->out_seg_sz;
@@ -536,7 +537,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 			if (decompress_only) {
 				rte_memcpy(data_addr, input_data_ptr, data_sz);
 				input_data_ptr += data_sz;
-				remaining_data -= data_sz;
+				remaining_data_decomp -= data_sz;
 			}
 
 			if (rte_pktmbuf_chain(mem->comp_bufs[i],
-- 
2.25.1


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

* RE: [PATCH] app/compress-perf: fix remaining data for ops
  2023-03-10 16:27 [PATCH] app/compress-perf: fix remaining data for ops Ciara Power
@ 2023-03-15 10:31 ` Ji, Kai
  2023-03-16 18:22   ` Akhil Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Ji, Kai @ 2023-03-15 10:31 UTC (permalink / raw)
  To: Power, Ciara; +Cc: dev, Kusztal, ArkadiuszX, michaelba

Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Friday, March 10, 2023 4:27 PM
> Cc: dev@dpdk.org; Ji, Kai <kai.ji@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>; michaelba@nvidia.com; Power, Ciara
> <ciara.power@intel.com>
> Subject: [PATCH] app/compress-perf: fix remaining data for ops
> 
> From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> 
> Individual variables are needed for tracking the remaining data for
> compression and decompression.
> 
> Fixes: 83cc3b90ad7a ("app/compress-perf: fix testing single operation")
> Cc: michaelba@nvidia.com
> 
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
> 2.25.1


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

* RE: [PATCH] app/compress-perf: fix remaining data for ops
  2023-03-15 10:31 ` Ji, Kai
@ 2023-03-16 18:22   ` Akhil Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2023-03-16 18:22 UTC (permalink / raw)
  To: Ji, Kai, Power, Ciara; +Cc: dev, Kusztal, ArkadiuszX, michaelba, stable

> Acked-by: Kai Ji <kai.ji@intel.com>
> 
> > Subject: [PATCH] app/compress-perf: fix remaining data for ops
> >
> > From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> >
> > Individual variables are needed for tracking the remaining data for
> > compression and decompression.
> >
> > Fixes: 83cc3b90ad7a ("app/compress-perf: fix testing single operation")
> > Cc: michaelba@nvidia.com
> >
> > Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> > Signed-off-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Cc: stable@dpdk.org

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

end of thread, other threads:[~2023-03-16 18:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 16:27 [PATCH] app/compress-perf: fix remaining data for ops Ciara Power
2023-03-15 10:31 ` Ji, Kai
2023-03-16 18:22   ` 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).