[PATCH v3 2/4] sched: move grinder configuration flag

Megha Ajmera megha.ajmera at intel.com
Tue Feb 22 13:57:43 CET 2022


Grinder configuration is now moved to sched library.

Number of grinders can also modified by specifying
RTE_SCHED_PORT_N_GRINDERS=N in CFLAGS, where N is number of grinders.

Signed-off-by: Megha Ajmera <megha.ajmera at intel.com>
---
 config/rte_config.h                        | 1 -
 doc/guides/sample_app_ug/qos_scheduler.rst | 5 +++++
 lib/sched/rte_sched.c                      | 4 ++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/config/rte_config.h b/config/rte_config.h
index 7a7da2f4e5..d449af4810 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -92,7 +92,6 @@
 #undef RTE_SCHED_CMAN
 #undef RTE_SCHED_COLLECT_STATS
 #undef RTE_SCHED_SUBPORT_TC_OV
-#define RTE_SCHED_PORT_N_GRINDERS 8
 
 /* rte_graph defines */
 #define RTE_GRAPH_BURST_SIZE 256
diff --git a/doc/guides/sample_app_ug/qos_scheduler.rst b/doc/guides/sample_app_ug/qos_scheduler.rst
index 49c14a00da..0782e41ee7 100644
--- a/doc/guides/sample_app_ug/qos_scheduler.rst
+++ b/doc/guides/sample_app_ug/qos_scheduler.rst
@@ -45,6 +45,11 @@ The application is located in the ``qos_sched`` sub-directory.
     DPDK must be compiled defining *RTE_SCHED_COLLECT_STATS*, which can be done by changing the relevant
     entry in the ``config/rte_config.h`` file.
 
+.. note::
+
+    Number of grinders is currently set to 8. This can be modified by specifying RTE_SCHED_PORT_N_GRINDERS=N in
+    CFLAGS, where N is number of grinders.
+
 Running the Application
 -----------------------
 
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index 1d3051cc0f..9c85edb4cc 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -24,6 +24,10 @@
 #pragma warning(disable:2259) /* conversion may lose significant bits */
 #endif
 
+#ifndef RTE_SCHED_PORT_N_GRINDERS
+#define RTE_SCHED_PORT_N_GRINDERS 8
+#endif
+
 #define RTE_SCHED_TB_RATE_CONFIG_ERR          (1e-7)
 #define RTE_SCHED_WRR_SHIFT                   3
 #define RTE_SCHED_MAX_QUEUES_PER_TC           RTE_SCHED_BE_QUEUES_PER_PIPE
-- 
2.25.1



More information about the dev mailing list