diff mbox series

[3/5] app/flow-perf: fix naming of CPU used structured data

Message ID 20210307091202.586-4-wisamm@nvidia.com (mailing list archive)
State New, archived
Delegated to: Thomas Monjalon
Headers show
Series New flow-perf fixes | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Wisam Monther March 7, 2021, 9:12 a.m. UTC
create_flow and create_meter are not correct names since those
are records that contain creation and deletion, which makes
them more of a record for such data.

Fixes: d8099d7ecbd0 ("app/flow-perf: split dump functions")
Cc: dongzhou@nvidia.com

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
---
 app/test-flow-perf/main.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 4054178273..01607881df 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -105,8 +105,8 @@  struct used_cpu_time {
 struct multi_cores_pool {
 	uint32_t cores_count;
 	uint32_t rules_count;
-	struct used_cpu_time create_meter;
-	struct used_cpu_time create_flow;
+	struct used_cpu_time meters_record;
+	struct used_cpu_time flows_record;
 	int64_t last_alloc[RTE_MAX_LCORE];
 	int64_t current_alloc[RTE_MAX_LCORE];
 } __rte_cache_aligned;
@@ -1013,10 +1013,10 @@  meters_handler(int port_id, uint8_t core_id, uint8_t ops)
 		cpu_time_used, insertion_rate);
 
 	if (ops == METER_CREATE)
-		mc_pool.create_meter.insertion[port_id][core_id]
+		mc_pool.meters_record.insertion[port_id][core_id]
 			= cpu_time_used;
 	else
-		mc_pool.create_meter.deletion[port_id][core_id]
+		mc_pool.meters_record.deletion[port_id][core_id]
 			= cpu_time_used;
 }
 
@@ -1134,7 +1134,7 @@  destroy_flows(int port_id, uint8_t core_id, struct rte_flow **flows_list)
 	printf(":: Port %d :: Core %d :: The time for deleting %d rules is %f seconds\n",
 		port_id, core_id, rules_count_per_core, cpu_time_used);
 
-	mc_pool.create_flow.deletion[port_id][core_id] = cpu_time_used;
+	mc_pool.flows_record.deletion[port_id][core_id] = cpu_time_used;
 }
 
 static struct rte_flow **
@@ -1241,7 +1241,7 @@  insert_flows(int port_id, uint8_t core_id)
 	printf(":: Port %d :: Core %d :: The time for creating %d in rules %f seconds\n",
 		port_id, core_id, rules_count_per_core, cpu_time_used);
 
-	mc_pool.create_flow.insertion[port_id][core_id] = cpu_time_used;
+	mc_pool.flows_record.insertion[port_id][core_id] = cpu_time_used;
 	return flows_list;
 }
 
@@ -1439,9 +1439,9 @@  run_rte_flow_handler_cores(void *data __rte_unused)
 	RTE_ETH_FOREACH_DEV(port) {
 		if (has_meter())
 			dump_used_cpu_time("Meters:",
-				port, &mc_pool.create_meter);
+				port, &mc_pool.meters_record);
 		dump_used_cpu_time("Flows:",
-			port, &mc_pool.create_flow);
+			port, &mc_pool.flows_record);
 		dump_used_mem(port);
 	}