DPDK patches and discussions
 help / color / mirror / Atom feed
From: Megha Ajmera <megha.ajmera@gmail.com>
To: dev@dpdk.org, jasvinder.singh@intel.com, cristian.dumitrescu@intel.com
Subject: [PATCH] sched:higher rates of pipe and subport are not taken care in application.
Date: Thu, 18 Aug 2022 05:42:07 +0000	[thread overview]
Message-ID: <20220818054207.1453413-1-megha.ajmera@gmail.com> (raw)

---
 examples/qos_sched/cfg_file.c | 66 +++++++++++++++++------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..fe0b42b023 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -62,71 +62,71 @@ 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 = (uint64_t)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 = (uint64_t)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 = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 oversubscription weight");
 		if (entry)
-			pipe_params[j].tc_ov_weight = (uint8_t)atoi(entry);
+			pipe_params[j].tc_ov_weight = (uint8_t)atol(entry);
 
 		entry = rte_cfgfile_get_entry(cfg, pipe_name, "tc 12 wrr weights");
 		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 = (uint64_t)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 = (uint64_t)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 = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)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] = (uint64_t)atol(entry);
 	}
 
 	return 0;
-- 
2.25.1


                 reply	other threads:[~2022-08-22  8:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220818054207.1453413-1-megha.ajmera@gmail.com \
    --to=megha.ajmera@gmail.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    /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).