DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] sched: Support to config 100G rate to subport/pipe
@ 2022-08-18  8:07 Megha Ajmera
  0 siblings, 0 replies; only message in thread
From: Megha Ajmera @ 2022-08-18  8:07 UTC (permalink / raw)
  To: dev, jasvinder.singh, cristian.dumitrescu

Currently in hqos tc rates, tb sizes can be configured upto 25G.

Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
---
 examples/qos_sched/cfg_file.c | 64 +++++++++++++++++------------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..cea041e69b 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -62,67 +62,67 @@ cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe_params
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tb rate");
 		if (entry)
-			pipe_params[j].tb_rate = (uint64_t)atoi(entry);
+			pipe_params[j].tb_rate = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tb size");
 		if (entry)
-			pipe_params[j].tb_size = (uint64_t)atoi(entry);
+			pipe_params[j].tb_size = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc period");
 		if (entry)
-			pipe_params[j].tc_period = (uint64_t)atoi(entry);
+			pipe_params[j].tc_period = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 0 rate");
 		if (entry)
-			pipe_params[j].tc_rate[0] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[0] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 1 rate");
 		if (entry)
-			pipe_params[j].tc_rate[1] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[1] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 2 rate");
 		if (entry)
-			pipe_params[j].tc_rate[2] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[2] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 3 rate");
 		if (entry)
-			pipe_params[j].tc_rate[3] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[3] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 4 rate");
 		if (entry)
-			pipe_params[j].tc_rate[4] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[4] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 5 rate");
 		if (entry)
-			pipe_params[j].tc_rate[5] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[5] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 6 rate");
 		if (entry)
-			pipe_params[j].tc_rate[6] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[6] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 7 rate");
 		if (entry)
-			pipe_params[j].tc_rate[7] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[7] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 8 rate");
 		if (entry)
-			pipe_params[j].tc_rate[8] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[8] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 9 rate");
 		if (entry)
-			pipe_params[j].tc_rate[9] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[9] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 10 rate");
 		if (entry)
-			pipe_params[j].tc_rate[10] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[10] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 11 rate");
 		if (entry)
-			pipe_params[j].tc_rate[11] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[11] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 rate");
 		if (entry)
-			pipe_params[j].tc_rate[12] = (uint64_t)atoi(entry);
+			pipe_params[j].tc_rate[12] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 oversubscription weight");
 		if (entry)
@@ -163,67 +163,67 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tb rate");
 		if (entry)
-			subport_profile[i].tb_rate = (uint64_t)atoi(entry);
+			subport_profile[i].tb_rate = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tb size");
 		if (entry)
-			subport_profile[i].tb_size = (uint64_t)atoi(entry);
+			subport_profile[i].tb_size = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc period");
 		if (entry)
-			subport_profile[i].tc_period = (uint64_t)atoi(entry);
+			subport_profile[i].tc_period = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 0 rate");
 		if (entry)
-			subport_profile[i].tc_rate[0] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[0] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 1 rate");
 		if (entry)
-			subport_profile[i].tc_rate[1] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[1] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 2 rate");
 		if (entry)
-			subport_profile[i].tc_rate[2] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[2] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 3 rate");
 		if (entry)
-			subport_profile[i].tc_rate[3] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[3] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 4 rate");
 		if (entry)
-			subport_profile[i].tc_rate[4] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[4] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 5 rate");
 		if (entry)
-			subport_profile[i].tc_rate[5] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[5] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 6 rate");
 		if (entry)
-			subport_profile[i].tc_rate[6] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[6] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 7 rate");
 		if (entry)
-			subport_profile[i].tc_rate[7] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[7] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 8 rate");
 		if (entry)
-			subport_profile[i].tc_rate[8] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[8] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 9 rate");
 		if (entry)
-			subport_profile[i].tc_rate[9] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[9] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 10 rate");
 		if (entry)
-			subport_profile[i].tc_rate[10] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[10] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 11 rate");
 		if (entry)
-			subport_profile[i].tc_rate[11] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[11] = atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, sec_name, "tc 12 rate");
 		if (entry)
-			subport_profile[i].tc_rate[12] = (uint64_t)atoi(entry);
+			subport_profile[i].tc_rate[12] = atol(entry);
 	}
 
 	return 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-18  8:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18  8:07 [PATCH] sched: Support to config 100G rate to subport/pipe Megha Ajmera

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).