patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: Michael Baum <michaelba@nvidia.com>
Cc: Matan Azrad <matan@nvidia.com>, dpdk stable <stable@dpdk.org>
Subject: patch 'app/compress-perf: fix testing single operation' has been queued to stable release 20.11.8
Date: Thu, 23 Feb 2023 09:37:06 +0000	[thread overview]
Message-ID: <20230223093715.3926893-62-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com>

Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3cc7c9875b09be70696cd0f5c00ed8c540bb8c44

Thanks.

Luca Boccassi

---
From 3cc7c9875b09be70696cd0f5c00ed8c540bb8c44 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Tue, 14 Feb 2023 19:40:28 +0200
Subject: [PATCH] app/compress-perf: fix testing single operation

[ upstream commit 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c ]

Part of the application options is to test only compress and only
decompress but actually the application ignores this user option and
tries to test always both compress and decompress.

Allow testing only compress and only decompress.

Fixes: e0b6287c035d ("app/compress-perf: add parser")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
 app/test-compress-perf/comp_perf_options.h    |   6 +-
 .../comp_perf_options_parse.c                 |   4 +-
 .../comp_perf_test_common.c                   | 126 +++++++++++++-----
 .../comp_perf_test_cyclecount.c               |  69 ++++++----
 .../comp_perf_test_throughput.c               |  66 +++++----
 .../comp_perf_test_verify.c                   |  58 +++++---
 app/test-compress-perf/main.c                 |   8 ++
 7 files changed, 223 insertions(+), 114 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_options.h b/app/test-compress-perf/comp_perf_options.h
index 0b777521c5..cfb00bd1ad 100644
--- a/app/test-compress-perf/comp_perf_options.h
+++ b/app/test-compress-perf/comp_perf_options.h
@@ -30,9 +30,9 @@ enum cperf_test_type {
 };
 
 enum comp_operation {
-	COMPRESS_ONLY,
-	DECOMPRESS_ONLY,
-	COMPRESS_DECOMPRESS
+	COMPRESS = (1 << 0),
+	DECOMPRESS = (1 << 1),
+	COMPRESS_DECOMPRESS = (COMPRESS | DECOMPRESS),
 };
 
 struct range_list {
diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 9b9d4e6554..303e714cda 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -446,11 +446,11 @@ parse_op_type(struct comp_test_data *test_data, const char *arg)
 	struct name_id_map optype_namemap[] = {
 		{
 			"comp",
-			COMPRESS_ONLY
+			COMPRESS
 		},
 		{
 			"decomp",
-			DECOMPRESS_ONLY
+			DECOMPRESS
 		},
 		{
 			"comp_and_decomp",
diff --git a/app/test-compress-perf/comp_perf_test_common.c b/app/test-compress-perf/comp_perf_test_common.c
index b402a0d839..cd60958944 100644
--- a/app/test-compress-perf/comp_perf_test_common.c
+++ b/app/test-compress-perf/comp_perf_test_common.c
@@ -227,23 +227,43 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
 {
 	uint16_t comp_mbuf_size;
 	uint16_t decomp_mbuf_size;
+	size_t comp_data_size;
+	size_t decomp_data_size;
+	size_t output_data_sz;
 
 	test_data->out_seg_sz = find_buf_size(test_data->seg_sz);
 
-	/* Number of segments for input and output
-	 * (compression and decompression)
-	 */
-	test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
-			test_data->seg_sz);
+	if (test_data->test_op & COMPRESS) {
+		/*
+		 * Number of segments for input and output
+		 * (compression and decompression)
+		 */
+		test_data->total_segs = DIV_CEIL(test_data->input_data_sz,
+						 test_data->seg_sz);
+	} else {
+		/*
+		 * When application does decompression only, input data is
+		 * compressed and smaller than the output. The expected size of
+		 * uncompressed data given by the user in segment size argument.
+		 */
+		test_data->total_segs = test_data->max_sgl_segs;
+	}
+
+	output_data_sz = (size_t) test_data->out_seg_sz * test_data->total_segs;
+	output_data_sz =
+		RTE_MAX(output_data_sz, (size_t) MIN_COMPRESSED_BUF_SIZE);
 
 	if (test_data->use_external_mbufs != 0) {
 		if (comp_perf_allocate_external_mbufs(test_data, mem) < 0)
 			return -1;
 		comp_mbuf_size = 0;
 		decomp_mbuf_size = 0;
-	} else {
+	} else if (test_data->test_op & COMPRESS) {
 		comp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
 		decomp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
+	} else {
+		comp_mbuf_size = test_data->seg_sz + RTE_PKTMBUF_HEADROOM;
+		decomp_mbuf_size = test_data->out_seg_sz + RTE_PKTMBUF_HEADROOM;
 	}
 
 	char pool_name[32] = "";
@@ -287,26 +307,28 @@ comp_perf_allocate_memory(struct comp_test_data *test_data,
 		return -1;
 	}
 
-	/*
-	 * Compressed data might be a bit larger than input data,
-	 * if data cannot be compressed
-	 */
-	mem->compressed_data = rte_zmalloc_socket(NULL,
-				RTE_MAX(
-				    (size_t) test_data->out_seg_sz *
-							  test_data->total_segs,
-				    (size_t) MIN_COMPRESSED_BUF_SIZE),
-				0,
-				rte_socket_id());
+	if (test_data->test_op & COMPRESS) {
+		/*
+		 * Compressed data might be a bit larger than input data,
+		 * if data cannot be compressed
+		 */
+		comp_data_size = output_data_sz;
+		decomp_data_size = test_data->input_data_sz;
+	} else {
+		comp_data_size = test_data->input_data_sz;
+		decomp_data_size = output_data_sz;
+	}
+
+	mem->compressed_data = rte_zmalloc_socket(NULL, comp_data_size, 0,
+						  rte_socket_id());
 	if (mem->compressed_data == NULL) {
 		RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
 				"file could not be allocated\n");
 		return -1;
 	}
 
-	mem->decompressed_data = rte_zmalloc_socket(NULL,
-				test_data->input_data_sz, 0,
-				rte_socket_id());
+	mem->decompressed_data = rte_zmalloc_socket(NULL, decomp_data_size, 0,
+						    rte_socket_id());
 	if (mem->decompressed_data == NULL) {
 		RTE_LOG(ERR, USER1, "Memory to hold the data from the input "
 				"file could not be allocated\n");
@@ -351,6 +373,7 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 	uint16_t segs_per_mbuf = 0;
 	uint32_t cmz = 0;
 	uint32_t dmz = 0;
+	bool decompress_only = !!(test_data->test_op == DECOMPRESS);
 
 	for (i = 0; i < mem->total_bufs; i++) {
 		/* Allocate data in input mbuf and copy data from input file */
@@ -361,8 +384,6 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 			return -1;
 		}
 
-		data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
-
 		if (test_data->use_external_mbufs != 0) {
 			rte_pktmbuf_attach_extbuf(mem->decomp_bufs[i],
 					mem->decomp_memzones[dmz]->addr,
@@ -372,16 +393,23 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 			dmz++;
 		}
 
+		if (!decompress_only)
+			data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
+		else
+			data_sz = test_data->out_seg_sz;
+
 		data_addr = (uint8_t *) rte_pktmbuf_append(
 					mem->decomp_bufs[i], data_sz);
 		if (data_addr == NULL) {
 			RTE_LOG(ERR, USER1, "Could not append data\n");
 			return -1;
 		}
-		rte_memcpy(data_addr, input_data_ptr, data_sz);
 
-		input_data_ptr += data_sz;
-		remaining_data -= data_sz;
+		if (!decompress_only) {
+			rte_memcpy(data_addr, input_data_ptr, data_sz);
+			input_data_ptr += data_sz;
+			remaining_data -= data_sz;
+		}
 
 		/* Already one segment in the mbuf */
 		segs_per_mbuf = 1;
@@ -398,8 +426,6 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 				return -1;
 			}
 
-			data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
-
 			if (test_data->use_external_mbufs != 0) {
 				rte_pktmbuf_attach_extbuf(
 					next_seg,
@@ -410,6 +436,12 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 				dmz++;
 			}
 
+			if (!decompress_only)
+				data_sz = RTE_MIN(remaining_data,
+						  test_data->seg_sz);
+			else
+				data_sz = test_data->out_seg_sz;
+
 			data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
 				data_sz);
 
@@ -418,9 +450,11 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 				return -1;
 			}
 
-			rte_memcpy(data_addr, input_data_ptr, data_sz);
-			input_data_ptr += data_sz;
-			remaining_data -= data_sz;
+			if (!decompress_only) {
+				rte_memcpy(data_addr, input_data_ptr, data_sz);
+				input_data_ptr += data_sz;
+				remaining_data -= data_sz;
+			}
 
 			if (rte_pktmbuf_chain(mem->decomp_bufs[i],
 					next_seg) < 0) {
@@ -447,16 +481,26 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 			cmz++;
 		}
 
-		data_addr = (uint8_t *) rte_pktmbuf_append(
-					mem->comp_bufs[i],
-					test_data->out_seg_sz);
+		if (decompress_only)
+			data_sz = RTE_MIN(remaining_data, test_data->seg_sz);
+		else
+			data_sz = test_data->out_seg_sz;
+
+		data_addr = (uint8_t *) rte_pktmbuf_append(mem->comp_bufs[i],
+							   data_sz);
 		if (data_addr == NULL) {
 			RTE_LOG(ERR, USER1, "Could not append data\n");
 			return -1;
 		}
 
+		if (decompress_only) {
+			rte_memcpy(data_addr, input_data_ptr, data_sz);
+			input_data_ptr += data_sz;
+			remaining_data -= data_sz;
+		}
+
 		/* Chain mbufs if needed for output mbufs */
-		for (j = 1; j < segs_per_mbuf; j++) {
+		for (j = 1; j < segs_per_mbuf && remaining_data > 0; j++) {
 			struct rte_mbuf *next_seg =
 				rte_pktmbuf_alloc(mem->comp_buf_pool);
 
@@ -476,13 +520,25 @@ prepare_bufs(struct comp_test_data *test_data, struct cperf_mem_resources *mem)
 				cmz++;
 			}
 
+			if (decompress_only)
+				data_sz = RTE_MIN(remaining_data,
+						  test_data->seg_sz);
+			else
+				data_sz = test_data->out_seg_sz;
+
 			data_addr = (uint8_t *)rte_pktmbuf_append(next_seg,
-				test_data->out_seg_sz);
+								  data_sz);
 			if (data_addr == NULL) {
 				RTE_LOG(ERR, USER1, "Could not append data\n");
 				return -1;
 			}
 
+			if (decompress_only) {
+				rte_memcpy(data_addr, input_data_ptr, data_sz);
+				input_data_ptr += data_sz;
+				remaining_data -= data_sz;
+			}
+
 			if (rte_pktmbuf_chain(mem->comp_bufs[i],
 					next_seg) < 0) {
 				RTE_LOG(ERR, USER1, "Could not chain mbufs\n");
diff --git a/app/test-compress-perf/comp_perf_test_cyclecount.c b/app/test-compress-perf/comp_perf_test_cyclecount.c
index ea62fcf52e..8474e59f17 100644
--- a/app/test-compress-perf/comp_perf_test_cyclecount.c
+++ b/app/test-compress-perf/comp_perf_test_cyclecount.c
@@ -510,38 +510,55 @@ cperf_cyclecount_test_runner(void *test_ctx)
 	if (cperf_verify_test_runner(&ctx->ver))
 		return EXIT_FAILURE;
 
-	/*
-	 * Run the tests twice, discarding the first performance
-	 * results, before the cache is warmed up
-	 */
+	if (test_data->test_op & COMPRESS) {
+		/*
+		 * Run the test twice, discarding the first performance
+		 * results, before the cache is warmed up
+		 */
+		for (i = 0; i < 2; i++) {
+			if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
+				return EXIT_FAILURE;
+		}
 
-	/* C O M P R E S S */
-	for (i = 0; i < 2; i++) {
-		if (main_loop(ctx, RTE_COMP_COMPRESS) < 0)
-			return EXIT_FAILURE;
-	}
-
-	ops_enq_retries_comp = ctx->ops_enq_retries;
-	ops_deq_retries_comp = ctx->ops_deq_retries;
+		ops_enq_retries_comp = ctx->ops_enq_retries;
+		ops_deq_retries_comp = ctx->ops_deq_retries;
 
-	duration_enq_per_op_comp = ctx->duration_enq /
-			(ctx->ver.mem.total_bufs * test_data->num_iter);
-	duration_deq_per_op_comp = ctx->duration_deq /
-			(ctx->ver.mem.total_bufs * test_data->num_iter);
+		duration_enq_per_op_comp = ctx->duration_enq /
+				(ctx->ver.mem.total_bufs * test_data->num_iter);
+		duration_deq_per_op_comp = ctx->duration_deq /
+				(ctx->ver.mem.total_bufs * test_data->num_iter);
+	} else {
+		ops_enq_retries_comp = 0;
+		ops_deq_retries_comp = 0;
 
-	/* D E C O M P R E S S */
-	for (i = 0; i < 2; i++) {
-		if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
-			return EXIT_FAILURE;
+		duration_enq_per_op_comp = 0;
+		duration_deq_per_op_comp = 0;
 	}
 
-	ops_enq_retries_decomp = ctx->ops_enq_retries;
-	ops_deq_retries_decomp = ctx->ops_deq_retries;
+	if (test_data->test_op & DECOMPRESS) {
+		/*
+		 * Run the test twice, discarding the first performance
+		 * results, before the cache is warmed up
+		 */
+		for (i = 0; i < 2; i++) {
+			if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0)
+				return EXIT_FAILURE;
+		}
+
+		ops_enq_retries_decomp = ctx->ops_enq_retries;
+		ops_deq_retries_decomp = ctx->ops_deq_retries;
 
-	duration_enq_per_op_decomp = ctx->duration_enq /
-			(ctx->ver.mem.total_bufs * test_data->num_iter);
-	duration_deq_per_op_decomp = ctx->duration_deq /
-			(ctx->ver.mem.total_bufs * test_data->num_iter);
+		duration_enq_per_op_decomp = ctx->duration_enq /
+				(ctx->ver.mem.total_bufs * test_data->num_iter);
+		duration_deq_per_op_decomp = ctx->duration_deq /
+				(ctx->ver.mem.total_bufs * test_data->num_iter);
+	} else {
+		ops_enq_retries_decomp = 0;
+		ops_deq_retries_decomp = 0;
+
+		duration_enq_per_op_decomp = 0;
+		duration_deq_per_op_decomp = 0;
+	}
 
 	duration_setup_per_op = ctx->duration_op /
 			(ctx->ver.mem.total_bufs * test_data->num_iter);
diff --git a/app/test-compress-perf/comp_perf_test_throughput.c b/app/test-compress-perf/comp_perf_test_throughput.c
index 7574e33ac7..5ea56e366a 100644
--- a/app/test-compress-perf/comp_perf_test_throughput.c
+++ b/app/test-compress-perf/comp_perf_test_throughput.c
@@ -355,41 +355,53 @@ cperf_throughput_test_runner(void *test_ctx)
 	 * First the verification part is needed
 	 */
 	if (cperf_verify_test_runner(&ctx->ver)) {
-		ret =  EXIT_FAILURE;
+		ret = EXIT_FAILURE;
 		goto end;
 	}
 
-	/*
-	 * Run the tests twice, discarding the first performance
-	 * results, before the cache is warmed up
-	 */
-	for (i = 0; i < 2; i++) {
-		if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
-			ret = EXIT_FAILURE;
-			goto end;
+	if (test_data->test_op & COMPRESS) {
+		/*
+		 * Run the test twice, discarding the first performance
+		 * results, before the cache is warmed up
+		 */
+		for (i = 0; i < 2; i++) {
+			if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
+				ret = EXIT_FAILURE;
+				goto end;
+			}
 		}
-	}
 
-	for (i = 0; i < 2; i++) {
-		if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
-			ret = EXIT_FAILURE;
-			goto end;
-		}
-	}
-
-	ctx->comp_tsc_byte =
+		ctx->comp_tsc_byte =
 			(double)(ctx->comp_tsc_duration[test_data->level]) /
-					test_data->input_data_sz;
+						       test_data->input_data_sz;
+		ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
+								     1000000000;
+	} else {
+		ctx->comp_tsc_byte = 0;
+		ctx->comp_gbps = 0;
+	}
 
-	ctx->decomp_tsc_byte =
+	if (test_data->test_op & DECOMPRESS) {
+		/*
+		 * Run the test twice, discarding the first performance
+		 * results, before the cache is warmed up
+		 */
+		for (i = 0; i < 2; i++) {
+			if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
+				ret = EXIT_FAILURE;
+				goto end;
+			}
+		}
+
+		ctx->decomp_tsc_byte =
 			(double)(ctx->decomp_tsc_duration[test_data->level]) /
-					test_data->input_data_sz;
-
-	ctx->comp_gbps = rte_get_tsc_hz() / ctx->comp_tsc_byte * 8 /
-			1000000000;
-
-	ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
-			1000000000;
+						       test_data->input_data_sz;
+		ctx->decomp_gbps = rte_get_tsc_hz() / ctx->decomp_tsc_byte * 8 /
+								     1000000000;
+	} else {
+		ctx->decomp_tsc_byte = 0;
+		ctx->decomp_gbps = 0;
+	}
 
 	if (rte_atomic16_test_and_set(&display_once)) {
 		printf("\n%12s%6s%12s%17s%15s%16s\n",
diff --git a/app/test-compress-perf/comp_perf_test_verify.c b/app/test-compress-perf/comp_perf_test_verify.c
index 98704a9548..aaf50657c0 100644
--- a/app/test-compress-perf/comp_perf_test_verify.c
+++ b/app/test-compress-perf/comp_perf_test_verify.c
@@ -112,7 +112,8 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
 		output_data_sz = &ctx->decomp_data_sz;
 		input_bufs = mem->comp_bufs;
 		output_bufs = mem->decomp_bufs;
-		out_seg_sz = test_data->seg_sz;
+		out_seg_sz = (test_data->test_op & COMPRESS) ?
+			     test_data->seg_sz : test_data->out_seg_sz;
 	}
 
 	/* Create private xform */
@@ -395,32 +396,47 @@ cperf_verify_test_runner(void *test_ctx)
 
 	test_data->ratio = 0;
 
-	if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
-		ret = EXIT_FAILURE;
-		goto end;
+	if (test_data->test_op & COMPRESS) {
+		if (main_loop(ctx, RTE_COMP_COMPRESS) < 0) {
+			ret = EXIT_FAILURE;
+			goto end;
+		}
 	}
 
-	if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
-		ret = EXIT_FAILURE;
-		goto end;
-	}
+	if (test_data->test_op & DECOMPRESS) {
+		if (main_loop(ctx, RTE_COMP_DECOMPRESS) < 0) {
+			ret = EXIT_FAILURE;
+			goto end;
+		}
+
+		if (!(test_data->test_op & COMPRESS)) {
+			/*
+			 * For DECOMPRESS_ONLY mode there is no more
+			 * verifications, reset the 'ratio' and 'comp_data_sz'
+			 * fields for other tests report.
+			 */
+			ctx->comp_data_sz = 0;
+			ctx->ratio = 0;
+			goto end;
+		}
 
-	if (ctx->decomp_data_sz != test_data->input_data_sz) {
-		RTE_LOG(ERR, USER1,
-	   "Decompressed data length not equal to input data length\n");
-		RTE_LOG(ERR, USER1,
-			"Decompressed size = %zu, expected = %zu\n",
-			ctx->decomp_data_sz, test_data->input_data_sz);
-		ret = EXIT_FAILURE;
-		goto end;
-	} else {
-		if (memcmp(ctx->mem.decompressed_data,
-				test_data->input_data,
-				test_data->input_data_sz) != 0) {
+		if (ctx->decomp_data_sz != test_data->input_data_sz) {
+			RTE_LOG(ERR, USER1,
+				"Decompressed data length not equal to input data length\n");
 			RTE_LOG(ERR, USER1,
-		    "Decompressed data is not the same as file data\n");
+				"Decompressed size = %zu, expected = %zu\n",
+				ctx->decomp_data_sz, test_data->input_data_sz);
 			ret = EXIT_FAILURE;
 			goto end;
+		} else {
+			if (memcmp(ctx->mem.decompressed_data,
+					test_data->input_data,
+					test_data->input_data_sz) != 0) {
+				RTE_LOG(ERR, USER1,
+					"Decompressed data is not the same as file data\n");
+				ret = EXIT_FAILURE;
+				goto end;
+			}
 		}
 	}
 
diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c
index ce9e80bedc..832140f814 100644
--- a/app/test-compress-perf/main.c
+++ b/app/test-compress-perf/main.c
@@ -253,6 +253,14 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
 		goto end;
 	}
 
+	if (!(test_data->test_op & COMPRESS) &&
+	    test_data->input_data_sz >
+	    (size_t) test_data->seg_sz * (size_t) test_data->max_sgl_segs) {
+		RTE_LOG(ERR, USER1,
+			"Size of input must be less than total segments\n");
+		goto end;
+	}
+
 	test_data->input_data = rte_zmalloc_socket(NULL,
 				test_data->input_data_sz, 0, rte_socket_id());
 
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:30.718322882 +0000
+++ 0062-app-compress-perf-fix-testing-single-operation.patch	2023-02-23 09:36:28.342172076 +0000
@@ -1 +1 @@
-From 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c Mon Sep 17 00:00:00 2001
+From 3cc7c9875b09be70696cd0f5c00ed8c540bb8c44 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 83cc3b90ad7a63868a43a67d6aa13b55068fbe0c ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
- .../comp_perf_test_verify.c                   |  60 ++++++---
+ .../comp_perf_test_verify.c                   |  58 +++++---
@@ -25 +26 @@
- 7 files changed, 224 insertions(+), 115 deletions(-)
+ 7 files changed, 223 insertions(+), 114 deletions(-)
@@ -28 +29 @@
-index 57dd146330..d00b299247 100644
+index 0b777521c5..cfb00bd1ad 100644
@@ -31 +32 @@
-@@ -32,9 +32,9 @@ enum cperf_test_type {
+@@ -30,9 +30,9 @@ enum cperf_test_type {
@@ -299 +300 @@
-index ce457fefbb..ce6c4d7605 100644
+index ea62fcf52e..8474e59f17 100644
@@ -302 +303 @@
-@@ -514,38 +514,55 @@ cperf_cyclecount_test_runner(void *test_ctx)
+@@ -510,38 +510,55 @@ cperf_cyclecount_test_runner(void *test_ctx)
@@ -385 +386 @@
-index 79cd2b2bf2..c9f8237626 100644
+index 7574e33ac7..5ea56e366a 100644
@@ -388 +389 @@
-@@ -359,41 +359,53 @@ cperf_throughput_test_runner(void *test_ctx)
+@@ -355,41 +355,53 @@ cperf_throughput_test_runner(void *test_ctx)
@@ -467,2 +468,2 @@
- 	exp = 0;
- 	if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
+ 	if (rte_atomic16_test_and_set(&display_once)) {
+ 		printf("\n%12s%6s%12s%17s%15s%16s\n",
@@ -470 +471 @@
-index 6b61a9194f..7d6b6abecd 100644
+index 98704a9548..aaf50657c0 100644
@@ -473 +474 @@
-@@ -114,7 +114,8 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
+@@ -112,7 +112,8 @@ main_loop(struct cperf_verify_ctx *ctx, enum rte_comp_xform_type type)
@@ -483,7 +484 @@
-@@ -392,44 +393,59 @@ cperf_verify_test_runner(void *test_ctx)
- 	int ret = EXIT_SUCCESS;
- 	static uint16_t display_once;
- 	uint32_t lcore = rte_lcore_id();
-+	uint16_t exp = 0;
- 
- 	ctx->mem.lcore_id = lcore;
+@@ -395,32 +396,47 @@ cperf_verify_test_runner(void *test_ctx)
@@ -557,7 +551,0 @@
- 	ctx->ratio = (double) ctx->comp_data_sz /
- 			test_data->input_data_sz * 100;
- 
--	uint16_t exp = 0;
- 	if (!ctx->silent) {
- 		if (__atomic_compare_exchange_n(&display_once, &exp, 1, 0,
- 				__ATOMIC_RELAXED, __ATOMIC_RELAXED)) {
@@ -565 +553 @@
-index 41b8edc2bd..bbb4c7917b 100644
+index ce9e80bedc..832140f814 100644
@@ -568 +556 @@
-@@ -254,6 +254,14 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)
+@@ -253,6 +253,14 @@ comp_perf_dump_input_data(struct comp_test_data *test_data)

  parent reply	other threads:[~2023-02-23  9:40 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  9:36 patch 'eal/windows: mark memory config as complete' " luca.boccassi
2023-02-23  9:36 ` patch 'kni: fix build on RHEL 9.1' " luca.boccassi
2023-02-23  9:36 ` patch 'doc: fix dependency setup in l2fwd-cat example guide' " luca.boccassi
2023-02-23  9:36 ` patch 'devtools: fix escaped space in grep pattern' " luca.boccassi
2023-02-23  9:36 ` patch 'app/crypto-perf: fix number of segments' " luca.boccassi
2023-02-23  9:36 ` patch 'eventdev/eth_tx: fix devices loop' " luca.boccassi
2023-02-23  9:36 ` patch 'crypto/qat: fix stream cipher direction' " luca.boccassi
2023-02-23  9:36 ` patch 'fbarray: fix metadata dump' " luca.boccassi
2023-02-23  9:36 ` patch 'graph: fix node shrink' " luca.boccassi
2023-02-23  9:36 ` patch 'net/nfp: fix firmware name derived from PCI name' " luca.boccassi
2023-02-23  9:36 ` patch 'app/testpmd: fix interactive mode with no ports' " luca.boccassi
2023-02-23  9:36 ` patch 'examples/qos_sched: fix debug mode' " luca.boccassi
2023-02-23  9:36 ` patch 'build: fix dependencies lookup' " luca.boccassi
2023-02-23  9:36 ` patch 'vdpa/ifc: fix argument compatibility check' " luca.boccassi
2023-02-23  9:36 ` patch 'vdpa/ifc: fix reconnection in SW-assisted live migration' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix net header settings in datapath' " luca.boccassi
2023-02-23  9:36 ` patch 'app/bbdev: add allocation checks' " luca.boccassi
2023-02-23  9:36 ` patch 'baseband/acc: fix memory leak on acc100 close' " luca.boccassi
2023-02-23  9:36 ` patch 'baseband/acc: fix acc100 iteration counter in TB' " luca.boccassi
2023-02-23  9:36 ` patch 'crypto/ccp: remove some printf' " luca.boccassi
2023-02-23  9:36 ` patch 'test/crypto: add missing MAC-I to PDCP vectors' " luca.boccassi
2023-02-23  9:36 ` patch 'compressdev: fix end of driver list' " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix Tx queue stats after queue stop and start' " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix Rx " luca.boccassi
2023-02-23  9:36 ` patch 'net/bnxt: fix RSS hash in mbuf' " luca.boccassi
2023-02-23  9:36 ` patch 'mem: fix hugepage info mapping' " luca.boccassi
2023-02-23  9:36 ` patch 'raw/ifpga/base: fix init with multi-process' " luca.boccassi
2023-02-23  9:36 ` patch 'telemetry: fix repeat display when callback don't init dict' " luca.boccassi
2023-02-23  9:36 ` patch 'test/mbuf: fix mbuf reset test' " luca.boccassi
2023-02-23  9:36 ` patch 'eventdev/timer: fix overflow' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: decrease log level for unimplemented requests' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix possible FD leaks' " luca.boccassi
2023-02-23  9:36 ` patch 'vhost: fix possible FD leaks on truncation' " luca.boccassi
2023-02-23  9:36 ` patch 'net/virtio-user: fix device starting failure handling' " luca.boccassi
2023-02-23  9:36 ` patch 'app/testpmd: fix forwarding stats for Tx dropped' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix default signal quality value for KX/KX4' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix packet type to parse from offload flags' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix interrupt loss' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix log about indirection table size' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: refactor set RSS hash algorithm and key interface' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix RSS key size compatibility' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix clearing RSS configuration' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: use RSS filter list to check duplicated rule' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: remove useless code when destroy valid RSS " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix warning on flush or destroy " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix config struct used for conversion' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: fix duplicate RSS rule check' " luca.boccassi
2023-02-23  9:36 ` patch 'net/hns3: extract common functions to set Rx/Tx' " luca.boccassi
2023-02-23  9:36 ` patch 'net/sfc: enforce fate action in transfer flow rules' " luca.boccassi
2023-02-23  9:36 ` patch 'net/txgbe: fix Rx buffer size in config register' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: fix flow sample with ConnectX-5' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: fix error CQE dumping for vectorized Rx' " luca.boccassi
2023-02-23  9:36 ` patch 'net/mlx5: ignore non-critical syndromes for Rx queue' " luca.boccassi
2023-02-23  9:36 ` patch 'net/i40e: reduce interrupt interval in multi-driver mode' " luca.boccassi
2023-02-23  9:36 ` patch 'net/ixgbe: fix firmware version consistency' " luca.boccassi
2023-02-23  9:37 ` patch 'net/iavf: add lock for VF commands' " luca.boccassi
2023-02-23  9:37 ` patch 'net/i40e: fix validation of flow transfer attribute' " luca.boccassi
2023-02-23  9:37 ` patch 'net/ice: " luca.boccassi
2023-02-23  9:37 ` patch 'net/iavf: protect insertion in flow list' " luca.boccassi
2023-02-23  9:37 ` patch 'net/ixgbe: enable IPv6 mask in flow rules' " luca.boccassi
2023-02-23  9:37 ` patch 'app/compress-perf: fix some typos' " luca.boccassi
2023-02-23  9:37 ` luca.boccassi [this message]
2023-02-23  9:37 ` patch 'net/bnxt: fix link state change interrupt config' " luca.boccassi
2023-02-23  9:37 ` patch 'app/testpmd: fix crash on cleanup' " luca.boccassi
2023-02-23  9:37 ` patch 'eal/freebsd: fix lock in alarm callback' " luca.boccassi
2023-02-23  9:37 ` patch 'reorder: invalidate buffer from ready queue in drain' " luca.boccassi
2023-02-23  9:37 ` patch 'test/reorder: fix double free of drained buffers' " luca.boccassi
2023-02-23  9:37 ` patch 'build: fix toolchain definition' " luca.boccassi
2023-02-23  9:37 ` patch 'eal: use same atomic intrinsics for GCC and clang' " luca.boccassi
2023-02-23  9:37 ` patch 'examples/cmdline: fix build with GCC 12' " luca.boccassi
2023-02-23  9:37 ` patch 'examples/qos_sched: fix Tx port config when link down' " luca.boccassi
2023-03-15 22:45   ` patch 'eal/windows: fix pedantic build' " luca.boccassi
2023-03-15 22:45     ` patch 'doc: fix reference to event timer header' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: fix crash for non supported HARQ length' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: extend HARQ tolerance' " luca.boccassi
2023-03-15 22:45     ` patch 'test/bbdev: remove check for invalid opaque data' " luca.boccassi
2023-03-15 22:45     ` patch 'vhost: fix OOB access for invalid vhost ID' " luca.boccassi
2023-03-16  9:27       ` Luca Boccassi
2023-03-16  9:56         ` David Marchand
2023-03-16 10:30           ` Kevin Traynor
2023-03-16 10:36             ` Luca Boccassi
2023-03-16 10:50               ` David Marchand
2023-03-15 22:45     ` patch 'Revert "vhost: fix OOB access for invalid vhost ID"' " luca.boccassi
2023-03-15 22:45     ` patch 'net/virtio: deduce IP length for TSO checksum' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix Tx preparation in checksum engine' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix packet count in IEEE 1588 " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: fix packet transmission in noisy VNF " luca.boccassi
2023-03-15 22:46     ` patch 'net/nfp: fix getting RSS configuration' " luca.boccassi
2023-03-15 22:46     ` patch 'net/ixgbe: fix IPv6 mask in flow director' " luca.boccassi
2023-03-15 22:46     ` patch 'net/i40e: revert link status check on device start' " luca.boccassi
2023-03-15 22:46     ` patch 'net/nfp: fix MTU configuration order' " luca.boccassi
2023-03-15 22:46     ` patch 'kvargs: add API documentation for process callback' " luca.boccassi
2023-03-15 22:46     ` patch 'compressdev: fix empty devargs parsing' " luca.boccassi
2023-03-15 22:46     ` patch 'cryptodev: " luca.boccassi
2023-03-15 22:46     ` patch 'net/virtio: " luca.boccassi
2023-03-15 22:46     ` patch 'raw/skeleton: " luca.boccassi
2023-03-15 22:46     ` patch 'kni: fix possible starvation when mbufs are exhausted' " luca.boccassi
2023-03-15 22:46     ` patch 'cmdline: handle EOF as quit' " luca.boccassi
2023-03-15 22:46     ` patch 'app/testpmd: cleanup cleanly from signal' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: fix possible truncation of hash key when config' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: fix possible truncation of redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report hash key' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report hash types' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use hardware config to report redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting hash algorithm' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting hash key' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting redirection table' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting RSS types' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate setting and clearing RSS rule' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: use new RSS rule to configure hardware' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: save hash algo to RSS filter list node' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: allow adding queue buffer size hash rule' " luca.boccassi
2023-03-15 22:46     ` patch 'net/hns3: separate flow RSS config from RSS conf' " luca.boccassi
2023-03-15 22:46     ` patch 'app/crypto-perf: fix test file memory leak' " luca.boccassi
2023-03-15 22:46     ` patch 'app/flow-perf: fix division or module by zero' " luca.boccassi
2023-03-22  0:41       ` patch 'raw/skeleton: fix selftest' " luca.boccassi
2023-03-22  0:41         ` patch 'ring: silence GCC 12 warnings' " luca.boccassi
2023-03-22  0:41         ` patch 'reorder: fix sequence number mbuf field register' " luca.boccassi
2023-03-22  0:41         ` patch 'test: fix segment length in packet generator' " luca.boccassi
2023-03-22  0:41         ` patch 'test/mbuf: fix test with mbuf debug enabled' " luca.boccassi
2023-03-22  0:41         ` patch 'app/testpmd: cleanup cleanly from signal' " luca.boccassi
2023-03-22  0:41         ` patch 'app/testpmd: fix interactive mode on Windows' " luca.boccassi
2023-03-22  0:41         ` patch 'app/compress-perf: fix remaining data for ops' " luca.boccassi
2023-03-22  0:41         ` patch 'app/bbdev: check statistics failure' " luca.boccassi
2023-03-22  0:41         ` patch 'net/vhost: add missing newline in logs' " luca.boccassi
2023-03-22  0:41         ` patch 'net/virtio: remove address width limit for modern devices' " luca.boccassi
2023-03-22  0:41         ` patch 'net/e1000: fix saving of stripped VLAN TCI' " luca.boccassi
2023-03-22  0:41         ` patch 'net/i40e: fix MAC loopback on X722' " luca.boccassi
2023-03-22  0:41         ` patch 'net/iavf: fix device stop during reset' " luca.boccassi
2023-03-22  0:41         ` patch 'net/mlx5: fix hairpin Tx queue reference count' " luca.boccassi
2023-03-22  0:41         ` patch 'common/mlx5: use just sufficient barrier for Arm' " luca.boccassi
2023-03-22  0:41         ` patch 'bus/ifpga: fix devargs handling' " luca.boccassi
2023-03-22  0:41         ` patch 'net/ipn3ke: fix thread exit' " luca.boccassi
2023-03-22  0:41         ` patch 'net/ipn3ke: fix representor name' " luca.boccassi
2023-03-29  1:04           ` patch 'examples/qos_sched: fix config entries in wrong sections' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix build with GCC 12 and ASan' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix CQE dump for Tx' " luca.boccassi
2023-03-29  1:04             ` patch 'net/mlx5: fix sysfs port name translation' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: fix code blocks in cryptodev guide' " luca.boccassi
2023-03-29  1:04             ` patch 'test/crypto: fix statistics error messages' " luca.boccassi
2023-03-29  1:04             ` patch 'pdump: fix build with GCC 12' " luca.boccassi
2023-03-29  1:04             ` patch 'acl: fix crash on PPC64 with GCC 11' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: fix pipeline example path in user guide' " luca.boccassi
2023-03-29  1:04             ` patch 'doc: add Linux capability to access physical addresses' " luca.boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223093715.3926893-62-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).