From: Savinay Dharmappa <savinay.dharmappa@intel.com>
To: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, dev@dpdk.org
Cc: savinay.dharmappa@intel.com
Subject: [dpdk-dev] [PATCH v6 8/8] sched: remove redundant code
Date: Tue, 6 Oct 2020 16:27:33 +0100 [thread overview]
Message-ID: <20201006152733.52178-9-savinay.dharmappa@intel.com> (raw)
In-Reply-To: <20201006152733.52178-1-savinay.dharmappa@intel.com>
Remove redundant data structure fields references from
functions and subport level data structures. It also
update the release and deprecation note
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 ----
doc/guides/rel_notes/release_20_11.rst | 2 ++
lib/librte_sched/rte_sched.c | 42 ++------------------------
lib/librte_sched/rte_sched.h | 12 --------
4 files changed, 4 insertions(+), 58 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 584e72087..f7363a585 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -212,12 +212,6 @@ Deprecation Notices
in "rte_sched.h". These changes are aligned to improvements suggested in the
RFC https://mails.dpdk.org/archives/dev/2018-November/120035.html.
-* sched: To allow dynamic configuration of the subport bandwidth profile,
- changes will be made to data structures ``rte_sched_subport_params``,
- ``rte_sched_port_params`` and new data structure, API functions will be
- defined in ``rte_sched.h``. These changes are aligned as suggested in the
- RFC https://mails.dpdk.org/archives/dev/2020-July/175161.html
-
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index ca5ec7391..886a3c122 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -131,6 +131,8 @@ Removed Items
* Removed Python 2 support since it was EOL'd in January 2020.
+* sched: Add support to update subport bandwidth dynamically.
+
API Changes
-----------
diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index c5482d6e0..7c5688068 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -152,16 +152,11 @@ struct rte_sched_grinder {
struct rte_sched_subport {
/* Token bucket (TB) */
uint64_t tb_time; /* time of last update */
- uint64_t tb_period;
- uint64_t tb_credits_per_period;
- uint64_t tb_size;
uint64_t tb_credits;
/* Traffic classes (TCs) */
uint64_t tc_time; /* time of next update */
- uint64_t tc_credits_per_period[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
uint64_t tc_credits[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
- uint64_t tc_period;
/* TC oversubscription */
uint64_t tc_ov_wm;
@@ -837,18 +832,6 @@ rte_sched_subport_check_params(struct rte_sched_subport_params *params,
return -EINVAL;
}
- if (params->tb_rate == 0 || params->tb_rate > rate) {
- RTE_LOG(ERR, SCHED,
- "%s: Incorrect value for tb rate\n", __func__);
- return -EINVAL;
- }
-
- if (params->tb_size == 0) {
- RTE_LOG(ERR, SCHED,
- "%s: Incorrect value for tb size\n", __func__);
- return -EINVAL;
- }
-
/* qsize: if non-zero, power of 2,
* no bigger than 32K (due to 16-bit read/write pointers)
*/
@@ -862,29 +845,8 @@ rte_sched_subport_check_params(struct rte_sched_subport_params *params,
}
}
- for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) {
- uint64_t tc_rate = params->tc_rate[i];
- uint16_t qsize = params->qsize[i];
-
- if ((qsize == 0 && tc_rate != 0) ||
- (qsize != 0 && tc_rate == 0) ||
- (tc_rate > params->tb_rate)) {
- RTE_LOG(ERR, SCHED,
- "%s: Incorrect value for tc rate\n", __func__);
- return -EINVAL;
- }
- }
-
- if (params->qsize[RTE_SCHED_TRAFFIC_CLASS_BE] == 0 ||
- params->tc_rate[RTE_SCHED_TRAFFIC_CLASS_BE] == 0) {
- RTE_LOG(ERR, SCHED,
- "%s: Incorrect qsize or tc rate(best effort)\n", __func__);
- return -EINVAL;
- }
-
- if (params->tc_period == 0) {
- RTE_LOG(ERR, SCHED,
- "%s: Incorrect value for tc period\n", __func__);
+ if (params->qsize[RTE_SCHED_TRAFFIC_CLASS_BE] == 0) {
+ RTE_LOG(ERR, SCHED, "%s: Incorrect qsize\n", __func__);
return -EINVAL;
}
diff --git a/lib/librte_sched/rte_sched.h b/lib/librte_sched/rte_sched.h
index 697f66460..aee847471 100644
--- a/lib/librte_sched/rte_sched.h
+++ b/lib/librte_sched/rte_sched.h
@@ -149,18 +149,6 @@ struct rte_sched_pipe_params {
* byte.
*/
struct rte_sched_subport_params {
- /** Token bucket rate (measured in bytes per second) */
- uint64_t tb_rate;
-
- /** Token bucket size (measured in credits) */
- uint64_t tb_size;
-
- /** Traffic class rates (measured in bytes per second) */
- uint64_t tc_rate[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-
- /** Enforcement period for rates (measured in milliseconds) */
- uint64_t tc_period;
-
/** Number of subport pipes.
* The subport can enable/allocate fewer pipes than the maximum
* number set through struct port_params::n_max_pipes_per_subport,
--
2.17.1
next prev parent reply other threads:[~2020-10-06 15:42 UTC|newest]
Thread overview: 107+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 18:27 [dpdk-dev] [RFC PATCH 0/2] Enable dyynamic configuration of subport bandwidth profile Savinay Dharmappa
2020-07-15 18:27 ` [dpdk-dev] [RFC PATCH 1/2] sched: add dynamic config " Savinay Dharmappa
2020-07-16 8:14 ` Singh, Jasvinder
2020-07-20 11:20 ` Dumitrescu, Cristian
2020-07-20 11:21 ` Dumitrescu, Cristian
2020-09-02 8:56 ` [dpdk-dev] [PATCH v1 1/4] " Savinay Dharmappa
2020-09-02 8:56 ` [dpdk-dev] [PATCH v1 2/4] " Savinay Dharmappa
2020-09-02 8:56 ` [dpdk-dev] [PATCH v1 3/4] " Savinay Dharmappa
2020-09-02 8:56 ` [dpdk-dev] [PATCH v1 4/4] " Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 00/10] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 01/10] sched: add support profile data structure Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 02/10] sched: add subport profile table Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 03/10] sched: add subport profile add and config api Savinay Dharmappa
2020-09-14 14:05 ` Singh, Jasvinder
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 04/10] sched: update the grinder credit update function Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 05/10] sched: update the pipe config api implementation Savinay Dharmappa
2020-09-14 14:26 ` Singh, Jasvinder
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 06/10] example/qos_sched: add dynamic config of subport Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 07/10] example/ip_pipeline: " Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 08/10] drivers/softnic: " Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 09/10] app/test_sched: " Savinay Dharmappa
2020-09-10 18:48 ` [dpdk-dev] [PATCH v2 10/10] sched: remove the redundant code Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 0/9] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 1/9] sched: add support profile data structure Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 2/9] sched: add subport profile table Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 3/9] sched: add subport profile add and config api Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 4/9] sched: update grinder credit and pipe config function Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 5/9] example/qos_sched: add dynamic config of subport Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 6/9] example/ip_pipeline: " Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 7/9] drivers/softnic: " Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 8/9] app/test_sched: " Savinay Dharmappa
2020-09-16 16:43 ` [dpdk-dev] [PATCH v3 9/9] sched: remove the redundant code Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 0/9] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 1/9] sched: add support profile data structure Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 2/9] sched: add subport profile table Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 3/9] sched: add subport profile add and config api Savinay Dharmappa
2020-09-29 21:19 ` Dumitrescu, Cristian
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 4/9] sched: update grinder credit and pipe config function Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 5/9] example/qos_sched: add dynamic config of subport Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 6/9] example/ip_pipeline: " Savinay Dharmappa
2020-09-29 21:23 ` Dumitrescu, Cristian
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 7/9] drivers/softnic: " Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 8/9] app/test_sched: " Savinay Dharmappa
2020-09-17 8:42 ` [dpdk-dev] [PATCH v4 9/9] sched: remove the redundant code Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 0/9] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 1/9] sched: add support profile table Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 2/9] sched: add subport profile add api Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 3/9] sched : add dynamic config of subport bandwidth Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 4/9] sched: update grinder credit and pipe config function Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 5/9] example/qos_sched: add dynamic config of subport Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 6/9] example/ip_pipeline: " Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 7/9] drivers/softnic: " Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 8/9] app/test_sched: " Savinay Dharmappa
2020-09-30 19:24 ` [dpdk-dev] [PATCH v5 9/9] sched : remove redundant code Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 0/8] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 1/8] sched: add support profile table Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 2/8] sched: introduce subport profile add function Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 3/8] sched: update subport rate dynamically Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 4/8] example/qos_sched: " Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 5/8] example/ip_pipeline: " Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 6/8] drivers/softnic: " Savinay Dharmappa
2020-10-06 15:27 ` [dpdk-dev] [PATCH v6 7/8] app/test_sched: " Savinay Dharmappa
2020-10-06 15:27 ` Savinay Dharmappa [this message]
2020-10-06 15:52 ` [dpdk-dev] [PATCH v6 0/8] Enable dynamic config of subport bandwidth Dumitrescu, Cristian
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 " Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 1/8] sched: add support profile table Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 2/8] sched: introduce subport profile add function Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 3/8] sched: update subport rate dynamically Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 4/8] example/qos_sched: " Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 5/8] example/ip_pipeline: " Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 6/8] drivers/softnic: " Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 7/8] app/test_sched: " Savinay Dharmappa
2020-10-06 18:02 ` [dpdk-dev] [PATCH v7 8/8] sched: remove redundant code Savinay Dharmappa
2020-10-06 19:05 ` [dpdk-dev] [PATCH v7 0/8] Enable dynamic config of subport bandwidth Dumitrescu, Cristian
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 " Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 1/8] sched: add support profile table Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 2/8] sched: introduce subport profile add function Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 3/8] sched: update subport rate dynamically Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 4/8] example/qos_sched: " Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 5/8] example/ip_pipeline: " Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 6/8] drivers/softnic: " Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 7/8] app/test_sched: " Savinay Dharmappa
2020-10-07 14:09 ` [dpdk-dev] [PATCH v8 8/8] sched: remove redundant code Savinay Dharmappa
2020-10-09 8:28 ` Thomas Monjalon
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 0/8] Enable dynamic config of subport bandwidth Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 1/8] sched: add support profile table Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 2/8] sched: introduce subport profile add function Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 3/8] sched: update subport rate dynamically Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 4/8] example/qos_sched: " Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 5/8] example/ip_pipeline: " Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 6/8] drivers/softnic: " Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 7/8] app/test_sched: " Savinay Dharmappa
2020-10-09 12:39 ` [dpdk-dev] [PATCH v9 8/8] sched: remove redundant code Savinay Dharmappa
2020-10-11 20:11 ` [dpdk-dev] [PATCH v9 0/8] Enable dynamic config of subport bandwidth Thomas Monjalon
2020-10-12 5:24 ` Dharmappa, Savinay
2020-10-12 23:08 ` Dharmappa, Savinay
2020-10-13 13:56 ` Dharmappa, Savinay
2020-10-13 14:06 ` Thomas Monjalon
2020-10-15 0:17 ` Thomas Monjalon
2020-07-15 18:27 ` [dpdk-dev] [RFC PATCH 2/2] example/qos_sched: subport bandwidth profile config Savinay Dharmappa
2020-07-16 8:14 ` Singh, Jasvinder
2020-09-02 9:07 ` [dpdk-dev] [PATCH v1 1/4] example/qos_sched: subport bandwidth dynmaic conf Savinay Dharmappa
2020-09-02 9:07 ` [dpdk-dev] [PATCH v1 2/4] example/ip_pipeline: " Savinay Dharmappa
2020-09-02 9:07 ` [dpdk-dev] [PATCH v1 3/4] drivers/softnic: subport bandwidth profile config Savinay Dharmappa
2020-09-02 9:07 ` [dpdk-dev] [PATCH v1 4/4] app/test_sched: " Savinay Dharmappa
2020-09-02 10:46 ` [dpdk-dev] [PATCH v1 1/4] example/qos_sched: subport bandwidth dynmaic conf Dharmappa, Savinay
2020-07-16 8:14 ` [dpdk-dev] [RFC PATCH 0/2] Enable dyynamic configuration of subport bandwidth profile Singh, Jasvinder
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=20201006152733.52178-9-savinay.dharmappa@intel.com \
--to=savinay.dharmappa@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.