From: Megha Ajmera Date: Tue, 22 Feb 2022 12:57:43 +0000 (+0000) Subject: sched: move grinder configuration X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ec487c189686ee9b3b7551d3aca138cec3f91e74;p=dpdk.git sched: move grinder configuration 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 Acked-by: Cristian Dumitrescu --- 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..b043022622 100644 --- a/doc/guides/sample_app_ug/qos_scheduler.rst +++ b/doc/guides/sample_app_ug/qos_scheduler.rst @@ -45,6 +45,12 @@ 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 162fced252..0f9bd45784 100644 --- a/lib/sched/rte_sched.c +++ b/lib/sched/rte_sched.c @@ -23,6 +23,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