sched: make RED scaling configurable
CC-ing Tomasz, the author of rte_red.[hc].
Quoted 59 lines
-----Original Message-----
From: Alan Dewar [mailto:[email protected]]
Sent: Thursday, August 31, 2017 10:00 AM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]
Subject: [PATCH] sched: make RED scaling configurableThe RED code stores the maximum threshold is a 32-bit integer as a pseudo fixed-point floating number with 10 fractional bits. Twelve other bits are used to encode the filter weight, leaving just 10 bits for the queue length. This limits the maximum queue length supported by RED queues as 1024 packets.
Move the "hard" definitions from
red.hinto config/common_base so that RED scaling can be configured during build.Signed-off-by Alan Dewar <[email protected]>--- config/common_base | 2 ++ lib/librte_sched/rte_red.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-)config/common_base +2
-0@@ -666,6 +666,8 @@ CONFIG_RTE_SCHED_COLLECT_STATS=n CONFIG_RTE_SCHED_SUBPORT_TC_OV=n CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 CONFIG_RTE_SCHED_VECTOR=n +CONFIG_RTE_RED_SCALING=10 +CONFIG_RTE_RED_MAX_TH_MAX=1023 # # Compile the distributor librarylib/librte_sched/rte_red.h +1
-1@@ -51,10 +51,9 @@ extern "C" {#include <rte_debug.h> #include <rte_cycles.h> #include <rte_branch_prediction.h> +#include <rte_config.h> -#define RTE_RED_SCALING 10/**< Fraction size for fixed- point */
#defineRTE_RED_S(1 << 22) /**< Packet size multiplied by
number of leaf queues */
-#defineRTE_RED_MAX_TH_MAX1023 /**< Max threshold limit
in fixed point format */
#defineRTE_RED_WQ_LOG2_MIN1 /**< Min inverse filter
weight value */
#defineRTE_RED_WQ_LOG2_MAX12 /**< Max inverse filter
weight value */
#defineRTE_RED_MAXP_INV_MIN1 /**< Min inverse mark
probability value */
--
2.1.4