[01/27] sched: update macros for flexible config
Checks
Commit Message
From: Jasvinder Singh <jasvinder.singh@intel.com>
Update existing macros and add new one for best-effort traffic class
queues to allow configuration flexiblity for pipe traffic classes and
queues, and subport level configuration of the pipe parameters.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Abraham Tovar <abrahamx.tovar@intel.com>
Signed-off-by: Lukasz Krakowiak <lukaszx.krakowiak@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 6 -----
doc/guides/rel_notes/release_19_08.rst | 7 ++++-
lib/librte_sched/Makefile | 2 +-
lib/librte_sched/meson.build | 2 +-
lib/librte_sched/rte_sched.h | 37 +++++++++++++++++++-------
5 files changed, 35 insertions(+), 19 deletions(-)
@@ -99,12 +99,6 @@ Deprecation Notices
to one it means it represents IV, when is set to zero it means J0 is used
directly, in this case 16 bytes of J0 need to be passed.
-* sched: To allow more traffic classes, flexible mapping of pipe queues to
- traffic classes, and subport level configuration of pipes and queues
- changes will be made to macros, data structures and API functions defined
- in "rte_sched.h". These changes are aligned to improvements suggested in the
- RFC https://mails.dpdk.org/archives/dev/2018-November/120035.html.
-
* metrics: The function ``rte_metrics_init`` will have a non-void return
in order to notify errors instead of calling ``rte_exit``.
@@ -83,6 +83,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=========================================================
+* sched: To allow more traffic classes, flexible mapping of pipe queues to
+ traffic classes, and subport level configuration of pipes and queues
+ changes are made to public macros, data structures and API functions defined
+ in "rte_sched.h".
+
ABI Changes
-----------
@@ -170,7 +175,7 @@ The libraries prepended with a plus sign were incremented in this version.
librte_rcu.so.1
librte_reorder.so.1
librte_ring.so.2
- librte_sched.so.2
+ + librte_sched.so.3
librte_security.so.2
librte_stack.so.1
librte_table.so.3
@@ -18,7 +18,7 @@ LDLIBS += -lrte_timer
EXPORT_MAP := rte_sched_version.map
-LIBABIVER := 2
+LIBABIVER := 3
#
# all source are stored in SRCS-y
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-version = 2
+version = 3
sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c')
headers = files('rte_sched.h', 'rte_sched_common.h',
'rte_red.h', 'rte_approx.h')
@@ -52,7 +52,7 @@ extern "C" {
* multiple connections of same traffic class belonging to
* the same user;
* - Weighted Round Robin (WRR) is used to service the
- * queues within same pipe traffic class.
+ * queues within same pipe lowest priority (best-effort) traffic class.
*
*/
@@ -66,26 +66,43 @@ extern "C" {
#include "rte_red.h"
#endif
-/** Number of traffic classes per pipe (as well as subport).
- * Cannot be changed.
+/** Maximum number of queues per pipe.
+ * Note that the multiple queues (power of 2) can only be assigned to
+ * lowest priority (best-effort) traffic class. Other higher priority traffic
+ * classes can only have one queue.
+ *
+ * Can not change.
+ */
+#define RTE_SCHED_QUEUES_PER_PIPE 16
+
+/** Number of WRR queues for lowest priority (best-effort) traffic class per
+ * pipe.
*/
-#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE 4
+#define RTE_SCHED_WRR_QUEUES_PER_PIPE 8
-/** Number of queues per pipe traffic class. Cannot be changed. */
+/** Number of traffic classes per pipe (as well as subport). */
#define RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS 4
+#define RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE \
+(RTE_SCHED_QUEUES_PER_PIPE - RTE_SCHED_WRR_QUEUES_PER_PIPE + 1)
-/** Number of queues per pipe. */
-#define RTE_SCHED_QUEUES_PER_PIPE \
- (RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE * \
- RTE_SCHED_QUEUES_PER_TRAFFIC_CLASS)
+/** Maximum number of subports that can be defined per port.
+ * Compile-time configurable.
+ */
+#ifndef RTE_SCHED_SUBPORTS_PER_PORT
+#define RTE_SCHED_SUBPORTS_PER_PORT 256
+#endif
-/** Maximum number of pipe profiles that can be defined per port.
+/** Maximum number of pipe profiles that can be defined per subport.
* Compile-time configurable.
*/
#ifndef RTE_SCHED_PIPE_PROFILES_PER_PORT
#define RTE_SCHED_PIPE_PROFILES_PER_PORT 256
#endif
+#ifndef RTE_SCHED_PIPE_PROFILES_PER_SUBPORT
+#define RTE_SCHED_PIPE_PROFILES_PER_SUBPORT 256
+#endif
+
/*
* Ethernet framing overhead. Overhead fields per Ethernet frame:
* 1. Preamble: 7 bytes;