DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] sched: make RED scaling configurable
       [not found] <1504170013-5887-1-git-send-email-alan.dewar@att.com>
@ 2017-08-31  9:53 ` Dumitrescu, Cristian
  0 siblings, 0 replies; 3+ messages in thread
From: Dumitrescu, Cristian @ 2017-08-31  9:53 UTC (permalink / raw)
  To: Alan Dewar; +Cc: dev, Kantecki, Tomasz

CC-ing Tomasz, the author of rte_red.[hc].

> -----Original Message-----
> From: Alan Dewar [mailto:alangordondewar@gmail.com]
> Sent: Thursday, August 31, 2017 10:00 AM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] sched: make RED scaling configurable
> 
> The 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.h into config/common_base so that
> RED scaling can be configured during build.
> 
> Signed-off-by: Alan Dewar <alan.dewar@att.com>
> ---
>  config/common_base         | 2 ++
>  lib/librte_sched/rte_red.h | 3 +--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/config/common_base b/config/common_base
> index 5e97a08..5501dfe 100644
> --- a/config/common_base
> +++ b/config/common_base
> @@ -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 library
> diff --git a/lib/librte_sched/rte_red.h b/lib/librte_sched/rte_red.h
> index ca12227..49d3379 100644
> --- a/lib/librte_sched/rte_red.h
> +++ b/lib/librte_sched/rte_red.h
> @@ -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 */
>  #define RTE_RED_S                           (1 << 22)  /**< Packet size multiplied by
> number of leaf queues */
> -#define RTE_RED_MAX_TH_MAX                  1023       /**< Max threshold limit
> in fixed point format */
>  #define RTE_RED_WQ_LOG2_MIN                 1          /**< Min inverse filter
> weight value */
>  #define RTE_RED_WQ_LOG2_MAX                 12         /**< Max inverse filter
> weight value */
>  #define RTE_RED_MAXP_INV_MIN                1          /**< Min inverse mark
> probability value */
> --
> 2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] sched: make RED scaling configurable
  2017-09-01 13:41 alangordondewar
@ 2017-09-11 15:51 ` Kantecki, Tomasz
  0 siblings, 0 replies; 3+ messages in thread
From: Kantecki, Tomasz @ 2017-09-11 15:51 UTC (permalink / raw)
  To: alangordondewar; +Cc: dev, Alan Dewar

Hi Alan,

This looks like a very good idea but I think the patch must also cover adequate changes of test/test/test_red.c file.
What range of fraction/max_threshold values did you find to work correctly with no further code mods?

Thanks,
Tomasz

-----Original Message-----
From: alangordondewar@gmail.com [mailto:alangordondewar@gmail.com] 
Sent: Friday, September 1, 2017 2:42 PM
To: Kantecki, Tomasz <tomasz.kantecki@intel.com>
Cc: dev@dpdk.org; Alan Dewar <alan.dewar@att.com>
Subject: [PATCH] sched: make RED scaling configurable

From: Alan Dewar <alan.dewar@att.com>

The 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.h into config/common_base so that RED scaling can be configured during build.

Signed-off-by: Alan Dewar <alan.dewar@att.com>
---
 config/common_base         | 2 ++
 lib/librte_sched/rte_red.h | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/common_base b/config/common_base index 5e97a08..5501dfe 100644
--- a/config/common_base
+++ b/config/common_base
@@ -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 library
diff --git a/lib/librte_sched/rte_red.h b/lib/librte_sched/rte_red.h index ca12227..49d3379 100644
--- a/lib/librte_sched/rte_red.h
+++ b/lib/librte_sched/rte_red.h
@@ -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 */
 #define RTE_RED_S                           (1 << 22)  /**< Packet size multiplied by number of leaf queues */
-#define RTE_RED_MAX_TH_MAX                  1023       /**< Max threshold limit in fixed point format */
 #define RTE_RED_WQ_LOG2_MIN                 1          /**< Min inverse filter weight value */
 #define RTE_RED_WQ_LOG2_MAX                 12         /**< Max inverse filter weight value */
 #define RTE_RED_MAXP_INV_MIN                1          /**< Min inverse mark probability value */
--
2.1.4

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-dev] [PATCH] sched: make RED scaling configurable
@ 2017-09-01 13:41 alangordondewar
  2017-09-11 15:51 ` Kantecki, Tomasz
  0 siblings, 1 reply; 3+ messages in thread
From: alangordondewar @ 2017-09-01 13:41 UTC (permalink / raw)
  To: tomasz.kantecki; +Cc: dev, Alan Dewar

From: Alan Dewar <alan.dewar@att.com>

The 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.h into config/common_base so that
RED scaling can be configured during build.

Signed-off-by: Alan Dewar <alan.dewar@att.com>
---
 config/common_base         | 2 ++
 lib/librte_sched/rte_red.h | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/config/common_base b/config/common_base
index 5e97a08..5501dfe 100644
--- a/config/common_base
+++ b/config/common_base
@@ -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 library
diff --git a/lib/librte_sched/rte_red.h b/lib/librte_sched/rte_red.h
index ca12227..49d3379 100644
--- a/lib/librte_sched/rte_red.h
+++ b/lib/librte_sched/rte_red.h
@@ -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 */
 #define RTE_RED_S                           (1 << 22)  /**< Packet size multiplied by number of leaf queues */
-#define RTE_RED_MAX_TH_MAX                  1023       /**< Max threshold limit in fixed point format */
 #define RTE_RED_WQ_LOG2_MIN                 1          /**< Min inverse filter weight value */
 #define RTE_RED_WQ_LOG2_MAX                 12         /**< Max inverse filter weight value */
 #define RTE_RED_MAXP_INV_MIN                1          /**< Min inverse mark probability value */
-- 
2.1.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-11 15:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1504170013-5887-1-git-send-email-alan.dewar@att.com>
2017-08-31  9:53 ` [dpdk-dev] [PATCH] sched: make RED scaling configurable Dumitrescu, Cristian
2017-09-01 13:41 alangordondewar
2017-09-11 15:51 ` Kantecki, Tomasz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).