Add PIE support for HQoS library
Subsystems (2)
PATCH v15 1/5 sched: add PIE based congestion management
In reply to Liguzinski, WojciechXImplement PIE based congestion management based on rfc8033
- Renamed WRED occurences to RED
- Applied __attribute__((unused)) to parameters in rte_sched_port_pie_dequeue()
- Moved rte_sched_cma_params structure before the first usage
- Added the release comment to version.map when new symbols are being introduced
- Removed the statement that RED is obsolete in cover letter
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 703 insertions(+), 96 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +3 -7
@@ -1,11 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') -headers = files( - 'rte_approx.h', - 'rte_red.h', - 'rte_sched.h', - 'rte_sched_common.h', -) +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') +headers = files('rte_sched.h', 'rte_sched_common.h', + 'rte_red.h', 'rte_approx.h', 'rte_pie.h') deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +168 -73
359 lines not on this page · raw message
lib/sched/rte_sched.h +50 -13
100 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { rte_sched_subport_pipe_profile_add; # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v15 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXpatch add support enable PIE or RED by
parsing config file.
- Renamed WRED occurences to RED
--- config/rte_config.h | 1 - examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 +++++++++++++++++++++----------- 7 files changed, 250 insertions(+), 110 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/app_thread.c +0 -1
@@ -205,7 +205,6 @@ app_worker_thread(struct thread_conf **confs)if (likely (nb_pkt)) {int nb_sent =rte_sched_port_enqueue (conf->sched_port, mbufs, nb_pkt); -APP_STATS_ADD (conf->stat.nb_drop, nb_pkt - nb_sent);APP_STATS_ADD (conf->stat.nb_rx, nb_pkt); }
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -204,15 +204,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -279,7 +273,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v15 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXAdding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
PATCH v15 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXAdded PIE related information to documentation.
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 60 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 ++++- 3 files changed, 66 insertions(+), 10 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +52 -8
107 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
PATCH v15 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXTests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -114,6 +114,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -245,6 +246,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -296,6 +298,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -309,6 +312,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
Quoted 65 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Tuesday, October 19, 2021 9:19 AM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v15 0/5] Add PIE support for HQoS libraryDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem
which is a situation when excess buffers in the network cause high latency and latency
variation. Currently, it supports RED for active queue management. However, more
advanced queue management is required to address this problem and provide desirable
quality of service to users.This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral
controller Enhanced) that can effectively and directly control queuing latency to address
the bufferbloat problem.The implementation of mentioned functionality includes modification of existing and
adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going
to be prepared and sent.Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIEapp/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 60 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 20 files changed, 2171 insertions(+), 284 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Quoted 2 lines
--
2.25.1
v16 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 62 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 20 files changed, 2172 insertions(+), 285 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v16 1/5 sched: add PIE based congestion management
Implement PIE based congestion management based on rfc8033
- Renamed WRED occurences to RED
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 703 insertions(+), 96 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +3 -7
@@ -1,11 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') -headers = files( - 'rte_approx.h', - 'rte_red.h', - 'rte_sched.h', - 'rte_sched_common.h', -) +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') +headers = files('rte_sched.h', 'rte_sched_common.h', + 'rte_red.h', 'rte_approx.h', 'rte_pie.h') deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +168 -73
359 lines not on this page · raw message
lib/sched/rte_sched.h +50 -13
100 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { rte_sched_subport_pipe_profile_add; # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v16 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXpatch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 +++++++++++++++++++++----------- 7 files changed, 250 insertions(+), 110 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/app_thread.c +0 -1
@@ -205,7 +205,6 @@ app_worker_thread(struct thread_conf **confs)if (likely (nb_pkt)) {int nb_sent =rte_sched_port_enqueue (conf->sched_port, mbufs, nb_pkt); -APP_STATS_ADD (conf->stat.nb_drop, nb_pkt - nb_sent);APP_STATS_ADD (conf->stat.nb_rx, nb_pkt); }
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -204,15 +204,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -279,7 +273,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v16 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXAdding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
PATCH v16 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXAdded PIE related information to documentation.
- Corrected marker for Droppers title
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 62 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 67 insertions(+), 11 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +53 -9
108 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
PATCH v16 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXTests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -114,6 +114,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -245,6 +246,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -296,6 +298,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -309,6 +312,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
v17 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 20 files changed, 2173 insertions(+), 286 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 3 lines
2.25.1 Series-acked-by: Cristian Dumitrescu <[email protected]>
PATCH v17 1/5 sched: add PIE based congestion management
Implement PIE based congestion management based on rfc8033
--
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 10 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 703 insertions(+), 96 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +3 -7
@@ -1,11 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') -headers = files( - 'rte_approx.h', - 'rte_red.h', - 'rte_sched.h', - 'rte_sched_common.h', -) +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') +headers = files('rte_sched.h', 'rte_sched_common.h', + 'rte_red.h', 'rte_approx.h', 'rte_pie.h') deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +168 -73
359 lines not on this page · raw message
lib/sched/rte_sched.h +50 -13
100 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { rte_sched_subport_pipe_profile_add; # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v17 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXpatch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/app_thread.c | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 +++++++++++++++++++++----------- 7 files changed, 250 insertions(+), 110 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/app_thread.c +0 -1
@@ -205,7 +205,6 @@ app_worker_thread(struct thread_conf **confs)if (likely (nb_pkt)) {int nb_sent =rte_sched_port_enqueue (conf->sched_port, mbufs, nb_pkt); -APP_STATS_ADD (conf->stat.nb_drop, nb_pkt - nb_sent);APP_STATS_ADD (conf->stat.nb_rx, nb_pkt); }
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -204,15 +204,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -279,7 +273,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v17 2/5] example/qos_sched: add PIE support
examples/qos_sched/app_thread.c app_worker_thread(struct thread_conf **confs) · line 210
Quoted 12 lines · WojciechX
examples/qos_sched/app_thread.c +0
-1@@ -205,7 +205,6 @@ app_worker_thread(struct thread_conf **confs)if (likely (nb_pkt)) {int nb_sent =rte_sched_port_enqueue (conf->sched_port, mbufs, nb_pkt); -APP_STATS_ADD (conf->stat.nb_drop, nb_pkt - nb_sent);APP_STATS_ADD (conf->stat.nb_rx, nb_pkt); }
Unnecessary whitespace change, drop this in next revision?
Re: [dpdk-dev] [PATCH v17 2/5] example/qos_sched: add PIE support
Hi Stephen,
Sure, no problem with that.
I probably changed that line together with something else in some earlier version and didn't notice it now.
Thanks,
Wojtek
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Wednesday, October 20, 2021 5:11 PM
To: Liguzinski, WojciechX <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Ajmera, Megha <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v17 2/5] example/qos_sched: add PIE support
examples/qos_sched/app_thread.c app_worker_thread(struct thread_conf **confs) · line 210
Quoted 12 lines · WojciechX
(quoted diff) +0
-0
b/examples/qos_sched/app_thread.cindexdbc878b553..895c0d3592100644examples/qos_sched/app_thread.c +0
-1@@ -205,7 +205,6 @@ app_worker_thread(struct thread_conf **confs)if (likely (nb_pkt)) {int nb_sent =rte_sched_port_enqueue (conf->sched_port, mbufs, nb_pkt); -APP_STATS_ADD (conf->stat.nb_drop, nb_pkt - nb_sent);APP_STATS_ADD (conf->stat.nb_rx, nb_pkt); }
Unnecessary whitespace change, drop this in next revision?
PATCH v17 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXAdding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
PATCH v17 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXAdded PIE related information to documentation.
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 68 insertions(+), 12 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
PATCH v17 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXTests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -114,6 +114,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -245,6 +246,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -296,6 +298,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -309,6 +312,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
v18 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 19 files changed, 2172 insertions(+), 279 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 3 lines
2.25.1 Series-acked-by: Cristian Dumitrescu <[email protected]>
PATCH v18 1/5 sched: add PIE based congestion management
Implement PIE based congestion management based on rfc8033
--
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 702 insertions(+), 90 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +168 -73
359 lines not on this page · raw message
lib/sched/rte_sched.h +50 -13
100 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { rte_sched_subport_pipe_profile_add; # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v18 1/5] sched: add PIE based congestion management
Quoted 37 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Monday, October 25, 2021 12:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v18 1/5] sched: add PIE based congestion managementImplement PIE based congestion management based on rfc8033
Signed-off-by Liguzinski, WojciechX <[email protected]>--
Changes in V18:
- Resolved merge conflict inlib/sched/meson.buildafter rebasing ontop of main
- Reverted whitespace change inapp_thread.c- comment from Stephen HemmingerChanges in V17:
- Corrected paragraph link naming inqos_framework.rstto fix CI buildsChanges in V16:
- Fixed 'title underline too short' error inqos_framework.rst
- Applied__rte_unusedmacro to parameters inrte_sched_port_pie_dequeue()--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 702 insertions(+), 90 deletions(-) create mode 100644
Quoted 2 lines
lib/sched/rte_pie.ccreate mode 100644lib/sched/rte_pie.h
PATCH v18 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXpatch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -90,7 +90,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v18 2/5] example/qos_sched: add PIE support
Quoted 14 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Monday, October 25, 2021 12:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v18 2/5] example/qos_sched: add PIE supportpatch add support enable PIE or RED by
parsing config file.Signed-off-by Liguzinski, WojciechX <[email protected]>
Quoted 9 lines
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
PATCH v18 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXAdding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v18 3/5] example/ip_pipeline: add PIE support
Quoted 10 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Monday, October 25, 2021 12:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v18 3/5] example/ip_pipeline: add PIE support
Quoted 7 lines
Adding the PIE support for IP Pipeline
Signed-off-by Liguzinski, WojciechX <[email protected]>--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
PATCH v18 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXAdded PIE related information to documentation.
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 68 insertions(+), 12 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v18 4/5] doc/guides/prog_guide: added PIE
Quoted 10 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Monday, October 25, 2021 12:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v18 4/5] doc/guides/prog_guide: added PIE
Quoted 9 lines
Added PIE related information to documentation.
Signed-off-by Liguzinski, WojciechX <[email protected]>--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 68 insertions(+), 12 deletions(-)
PATCH v18 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXTests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -249,6 +250,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -300,6 +302,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -313,6 +316,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v18 5/5] app/test: add tests for PIE
Quoted 13 lines
-----Original Message-----
From: Liguzinski, WojciechX <[email protected]>
Sent: Monday, October 25, 2021 12:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [PATCH v18 5/5] app/test: add tests for PIETests for PIE code added to test application.
Signed-off-by Liguzinski, WojciechX <[email protected]>
Quoted 9 lines
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644
app/test/test_pie.c
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
https://patchwork.dpdk.org/project/dpdk/cover/[email protected]/
Thanks & Regards,
Yu Liu
-----Original Message-----
From: dev <[email protected]> On Behalf Of Liguzinski, WojciechX
Sent: Monday, October 25, 2021 7:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [dpdk-dev] [PATCH v18 0/5] Add PIE support for HQoS library
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 19 files changed, 2172 insertions(+), 279 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
--
2.25.1
26/10/2021 10:24, Liu, Yu Y:
Quoted 4 lines
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
https://patchwork.dpdk.org/project/dpdk/cover/[email protected]/
I didn't see any email from Cristian.
It seems you just added this ack silently at the bottom of the cover letter.
1/ an email from Cristian is far better
2/ when integrating ack, it must be done in patches, not cover letter
Quoted 51 lines
Thanks & Regards,
Yu Liu-----Original Message-----
From: dev <[email protected]> On Behalf Of Liguzinski, WojciechX
Sent: Monday, October 25, 2021 7:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: Ajmera, Megha <[email protected]>
Subject: [dpdk-dev] [PATCH v18 0/5] Add PIE support for HQoS libraryDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIEapp/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 19 files changed, 2172 insertions(+), 279 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h--
2.25.1Series-acked-by Cristian Dumitrescu <[email protected]>
Quoted 17 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, October 26, 2021 9:33 AM
To: Liguzinski, WojciechX <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Liu, Yu Y <[email protected]>
Cc: [email protected]; Ajmera, Megha <[email protected]>; Liu, Yu Y <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v18 0/5] Add PIE support for HQoS library26/10/2021 10:24, Liu, Yu Y:
Quoted 4 lines
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
Quoted 9 lines
https://patchwork.dpdk.org/project/dpdk/cover/20211019081902.3514841-
[email protected]/I didn't see any email from Cristian.
It seems you just added this ack silently at the bottom of the cover letter.1/ an email from Cristian is far better
2/ when integrating ack, it must be done in patches, not cover letter
Hi Thomas,
I did ack this set in a previous version (V15) by replying with "Series-acked-by" on the cover letter email, which does not show in patchwork. Is there a better way to do this?
It would be good to have Jasvinder's ack as well on this series, as he is looking into some other aspects of the sched library.
Regards,
Cristian
Quoted 69 lines
Quoted 9 lines
Thanks & Regards,
Yu Liu-----Original Message-----
From: dev <[email protected]> On Behalf Of Liguzinski, WojciechX
Sent: Monday, October 25, 2021 7:32 PM
To: [email protected]; Singh, Jasvinder <[email protected]>;Dumitrescu, Cristian <[email protected]>
Quoted 4 lines
Cc: Ajmera, Megha <[email protected]>
Subject: [dpdk-dev] [PATCH v18 0/5] Add PIE support for HQoS libraryDPDK sched library is equipped with mechanism that secures it from the
bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
Quoted 2 lines
This solution (RFC) proposes usage of new algorithm called "PIE"
(Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
Quoted 2 lines
The implementation of mentioned functionality includes modification of
existing and adding a new set of data structures to the library, adding PIE related APIs.
Quoted 1 line
This affects structures in public API/ABI. That is why deprecation notice is
going to be prepared and sent.
Quoted 20 lines
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIEapp/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 +Quoted 8 lines
examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 19 files changed, 2172 insertions(+), 279 deletions(-) create mode 100644
app/test/test_pie.ccreate mode 100644lib/sched/rte_pie.ccreate mode 100644lib/sched/rte_pie.hQuoted 6 lines
--
2.25.1Series-acked-by Cristian Dumitrescu <[email protected]>
26/10/2021 12:02, Dumitrescu, Cristian:
Quoted 12 lines
From: Thomas Monjalon <[email protected]>
Quoted 11 lines
26/10/2021 10:24, Liu, Yu Y:
Quoted 4 lines
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
https://patchwork.dpdk.org/project/dpdk/cover/20211019081902.3514841-
[email protected]/I didn't see any email from Cristian.
It seems you just added this ack silently at the bottom of the cover letter.
Quoted 7 lines
Quoted 3 lines
1/ an email from Cristian is far better
2/ when integrating ack, it must be done in patches, not cover letterHi Thomas,
I did ack this set in a previous version (V15) by replying with "Series-acked-by" on the cover letter email, which does not show in patchwork. Is there a better way to do this?
No you did the right thing (I missed this email on v15).
But v16 did not show your ack.
And v17 added it only in the cover letter instead of reporting it in all patches.
Quoted 1 line
It would be good to have Jasvinder's ack as well on this series, as he is looking into some other aspects of the sched library.
Yes
Hi,
V16 - My bad, probably I haven't copied it correctly when preparing cover letter
V17 - I understood Cristian's comment as to copy the Series ACK to next versions of patches, and not to "split it" for each one. If that was the correct way I had no knowledge about it.
Wojtek
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, October 26, 2021 12:10 PM
To: Liguzinski, WojciechX <[email protected]>; Singh, Jasvinder <[email protected]>; Liu, Yu Y <[email protected]>; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Ajmera, Megha <[email protected]>; Liu, Yu Y <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v18 0/5] Add PIE support for HQoS library
26/10/2021 12:02, Dumitrescu, Cristian:
Quoted 13 lines
From: Thomas Monjalon <[email protected]>
Quoted 12 lines
26/10/2021 10:24, Liu, Yu Y:
Quoted 4 lines
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
https://patchwork.dpdk.org/project/dpdk/cover/20211019081902.3514841
-
[email protected]/I didn't see any email from Cristian.
It seems you just added this ack silently at the bottom of the cover letter.
Quoted 7 lines
Quoted 3 lines
1/ an email from Cristian is far better 2/ when integrating ack, it must be done in patches, not cover letter
Hi Thomas,
I did ack this set in a previous version (V15) by replying with "Series-acked-by" on the cover letter email, which does not show in patchwork. Is there a better way to do this?
No you did the right thing (I missed this email on v15).
But v16 did not show your ack.
And v17 added it only in the cover letter instead of reporting it in all patches.
Quoted 1 line
It would be good to have Jasvinder's ack as well on this series, as he is looking into some other aspects of the sched library.
Yes
26/10/2021 12:20, Liguzinski, WojciechX:
Quoted 4 lines
Hi,
V16 - My bad, probably I haven't copied it correctly when preparing cover letter
V17 - I understood Cristian's comment as to copy the Series ACK to next versions of patches, and not to "split it" for each one. If that was the correct way I had no knowledge about it.
Yes you had to reproduce it in each patch. Otherwise who would do it to make it appear in patchwork and in the git history when merged? I understand you did not have that knowledge.
For future, I hope the Intel team will better track features patches of newcomers so they don't miss something knew by others.
John, I know knowledge sharing is not an easy task, we always have to improve :)
Quoted 34 lines
From: Thomas Monjalon <[email protected]>
26/10/2021 12:02, Dumitrescu, Cristian:Quoted 13 lines
From: Thomas Monjalon <[email protected]>
Quoted 12 lines
26/10/2021 10:24, Liu, Yu Y:
Quoted 4 lines
Hi Thomas,
Would you merge this patch as the series is acked by Cristian as below?
https://patchwork.dpdk.org/project/dpdk/cover/20211019081902.3514841
-
[email protected]/I didn't see any email from Cristian.
It seems you just added this ack silently at the bottom of the cover letter.Quoted 7 lines
Quoted 3 lines
1/ an email from Cristian is far better 2/ when integrating ack, it must be done in patches, not cover letter
Hi Thomas,
I did ack this set in a previous version (V15) by replying with "Series-acked-by" on the cover letter email, which does not show in patchwork. Is there a better way to do this?
No you did the right thing (I missed this email on v15).
But v16 did not show your ack.
And v17 added it only in the cover letter instead of reporting it in all patches.Quoted 1 line
It would be good to have Jasvinder's ack as well on this series, as he is looking into some other aspects of the sched library.
Yes
v19 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXDPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Liguzinski, WojciechX (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 241 ++-- lib/sched/rte_sched.h | 63 +- lib/sched/version.map | 4 + 19 files changed, 2172 insertions(+), 279 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v19 1/5 sched: add PIE based congestion management
Implement PIE based congestion management based on rfc8033
--
Changes in V19:
- ACKs included in patches
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 241 +++++++++----- lib/sched/rte_sched.h | 63 +++- lib/sched/version.map | 4 + 7 files changed, 702 insertions(+), 90 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +168 -73
359 lines not on this page · raw message
lib/sched/rte_sched.h +50 -13
100 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
28/10/2021 12:17, Liguzinski, WojciechX:
Quoted 9 lines
Implement PIE based congestion management based on rfc8033
Signed-off-by Liguzinski, WojciechX <[email protected]>Acked-by Jasvinder Singh <[email protected]>--
Changes in V19:
- ACKs included in patches
Would be good to fix your own name as well.
I guess your first name is not WojciechX but Wojciech. And we put first name first without a comma.
Also the related doc change should be in this patch.
It's OK that you don't have all knowledge of the process, I am just disappointed that you don't get more help from those adding your acks, so it falls on me to fix.
Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
Sure, I will correct the name.
As I can see from a distance that some things could be resolved/corrected from the very beginning (like e.g. the name and its format).
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, October 29, 2021 3:44 PM
To: Liguzinski, WojciechX <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Ajmera, Megha <[email protected]>; Mcnamara, John <[email protected]>; Yigit, Ferruh <[email protected]>; Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
28/10/2021 12:17, Liguzinski, WojciechX:
Quoted 9 lines
Implement PIE based congestion management based on rfc8033
Signed-off-by Liguzinski, WojciechX <[email protected]>Acked-by Jasvinder Singh <[email protected]>--
Changes in V19:
- ACKs included in patches
Would be good to fix your own name as well.
I guess your first name is not WojciechX but Wojciech. And we put first name first without a comma.
Also the related doc change should be in this patch.
It's OK that you don't have all knowledge of the process, I am just disappointed that you don't get more help from those adding your acks, so it falls on me to fix.
Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
In reply to Liguzinski, WojciechX28/10/2021 12:17, Liguzinski, WojciechX:
Quoted 1 line
Implement PIE based congestion management based on rfc8033
An explanation is missing about why RED code is removed.
I don't know whether it deserves a separate commit,
but at least it should be removed consisently in lib and example code in the same patch.
Cristian, please make efforts to help this patchset be properly organized. A blind ack is not enough.
Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
Quoted 16 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Friday, October 29, 2021 2:58 PM
To: Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Ajmera, Megha <[email protected]>; Liguzinski, WojciechX <[email protected]>; [email protected]; Mcnamara, John <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management28/10/2021 12:17, Liguzinski, WojciechX:
Quoted 1 line
Implement PIE based congestion management based on rfc8033
Quoted 8 lines
An explanation is missing about why RED code is removed.
I don't know whether it deserves a separate commit,
but at least it should be removed consisently in lib and example code in the same patch.Cristian, please make efforts to help this patchset be properly organized. A blind ack is not enough.
The RED code is not removed. It is simply the macro renamed to CMAN (Congestion Management) to include both RED and PIE.
Re: [dpdk-dev] [PATCH v19 1/5] sched: add PIE based congestion management
29/10/2021 16:06, Dumitrescu, Cristian:
Quoted 9 lines
From: Thomas Monjalon <[email protected]>
Quoted 8 lines
28/10/2021 12:17, Liguzinski, WojciechX:
Quoted 1 line
Implement PIE based congestion management based on rfc8033
An explanation is missing about why RED code is removed.
I don't know whether it deserves a separate commit,
but at least it should be removed consisently in lib and example code in the same patch.
Quoted 5 lines
Quoted 3 lines
Cristian, please make efforts to help this patchset be properly organized. A blind ack is not enough.
The RED code is not removed. It is simply the macro renamed to CMAN (Congestion Management) to include both RED and PIE.
OK, and where this macro is defined?
Why is there such #ifdef?
Even the API is conditionally compiled!
PATCH v19 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXpatch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v19 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXAdding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
PATCH v19 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXAdded PIE related information to documentation.
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 68 insertions(+), 12 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
PATCH v19 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXTests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -249,6 +250,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -300,6 +302,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -313,6 +316,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
v20 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (5):
sched: add PIE based congestion management
example/qos_sched: add PIE support
example/ip_pipeline: add PIE support
doc/guides/prog_guide: added PIE
app/test: add tests for PIE
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 259 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 19 files changed, 2189 insertions(+), 281 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v20 1/5 sched: add PIE based congestion management
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033
--
Changes in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patches
Changes in V19:
- ACKs included in patches
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 82 +++++ lib/sched/rte_pie.h | 393 +++++++++++++++++++++++ lib/sched/rte_sched.c | 259 ++++++++++----- lib/sched/rte_sched.h | 64 +++- lib/sched/version.map | 4 + 7 files changed, 719 insertions(+), 92 deletions(-) create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +82 -0
82 lines not on this page · raw message
lib/sched/rte_pie.h new file +393 -0
393 lines not on this page · raw message
lib/sched/rte_sched.c +186 -73
378 lines not on this page · raw message
lib/sched/rte_sched.h +49 -15
101 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v20 2/5 example/qos_sched: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
patch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v20 3/5 example/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Adding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
PATCH v20 4/5 doc/guides/prog_guide: added PIE
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Added PIE related information to documentation.
--- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +++++++++++++++++--- doc/guides/prog_guide/traffic_management.rst | 13 +++- 3 files changed, 68 insertions(+), 12 deletions(-)
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
Signature · 1 line
2.25.1
PATCH v20 5/5 app/test: add tests for PIE
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Tests for PIE code added to test application.
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++++++++++++++++++++++++++ lib/sched/rte_pie.c | 6 +- lib/sched/rte_pie.h | 17 +- 4 files changed, 1085 insertions(+), 7 deletions(-) create mode 100644 app/test/test_pie.c
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -249,6 +250,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -300,6 +302,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -313,6 +316,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
lib/sched/rte_pie.c +5 -1
@@ -13,7 +13,7 @@#pragma warning(disable:2259)/* conversion may lose significant bits */ #endif -void +int rte_pie_rt_data_init (struct rte_pie *pie) {if (pie ==NULL ) {
@@ -22,6 +22,8 @@ rte_pie_rt_data_init(struct rte_pie *pie)if (pie ==NULL )RTE_LOG (ERR ,SCHED ,"%s: Memory allocation fails\n" , __func__); + +return -1 ; } pie->active =0 ;
@@ -35,6 +37,8 @@ rte_pie_rt_data_init(struct rte_pie *pie) pie->qdelay_old =0 ; pie->drop_prob =0 ; pie->accu_prob =0 ; + +return 0 ; }int
lib/sched/rte_pie.h +11 -6
@@ -20,6 +20,7 @@ extern "C" {#include <rte_random.h> #include <rte_debug.h> +#include <rte_cycles.h> #define RTE_DQ_THRESHOLD 16384/**< Queue length threshold (2^14) * to start measurement cycle (bytes)
@@ -53,7 +54,7 @@ struct rte_pie_config { };/** -* RED run-time data +* PIE run-time data */ struct rte_pie {uint16_t active;/**< Flag for activating/deactivating pie */
@@ -74,8 +75,12 @@ struct rte_pie {* @brief Initialises run-time data * * @param pie [in,out] data pointer to PIE runtime data +* +* @return Operation status +* @retval 0 success +* @retval !0 error */ -void +int __rte_experimentalrte_pie_rt_data_init (struct rte_pie *pie);
@@ -113,7 +118,7 @@ rte_pie_config_init(struct rte_pie_config *pie_cfg,* @retval 0 enqueue the packet * @retval !0 drop the packet */ -static inline int +static int __rte_experimental rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg, struct rte_pie *pie,
@@ -145,7 +150,7 @@ rte_pie_enqueue_empty(const struct rte_pie_config *pie_cfg,* @param pie [in, out] data pointer to PIE runtime data * @param time [in] current time (measured in cpu cycles) */ -static inline void +static void __rte_experimental_calc_drop_probability (const struct rte_pie_config *pie_cfg,struct rte_pie *pie,uint64_t time)
@@ -155,7 +160,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,/* Note: can be implemented using integer multiply. * DQ_THRESHOLD is power of 2 value. */ -double current_qdelay = pie->qlen * (pie->avg_dq_time /RTE_DQ_THRESHOLD ); +uint64_t current_qdelay = pie->qlen * (pie->avg_dq_time >>14 );double p =RTE_ALPHA * (current_qdelay - qdelay_ref) +RTE_BETA * (current_qdelay - pie->qdelay_old);
@@ -181,7 +186,7 @@ _calc_drop_probability(const struct rte_pie_config *pie_cfg,double qdelay = qdelay_ref *0.5 ;/* Exponentially decay drop prob when congestion goes away */ -if (current_qdelay < qdelay && pie->qdelay_old < qdelay) +if ((double )current_qdelay < qdelay && pie->qdelay_old < qdelay) pie->drop_prob *=0.98 ;/* 1 - 1/64 is sufficient */ /* Bound drop probability */
Signature · 1 line
2.25.1
03/11/2021 00:57, Liguzinski, WojciechX:
Quoted 12 lines
From: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
Quoted 7 lines
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (5):
sched: add PIE based congestion management
Did you see the checkpatch issues on this patch?
http://mails.dpdk.org/archives/test-report/2021-November/238253.html
Quoted 1 line
example/qos_sched: add PIE support
The strict minimum is to explain why you add PIE and what the acronym means, inside the commit log.
Quoted 1 line
example/ip_pipeline: add PIE support
Title should follow same convention as history.
For examples, it start with "examples/" as the directory name.
Quoted 1 line
doc/guides/prog_guide: added PIE
doc should be squashed with code patches
Is there any doc update related to the examples? If not, it should be fully squashed with lib changes.
Quoted 1 line
app/test: add tests for PIE
If there is nothing special, it can be squashed with the lib patch.
Hi Thomas,
Thanks, I will apply your suggestions asap.
Wojtek
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Wednesday, November 3, 2021 6:53 PM
To: Liguzinski, WojciechX <[email protected]>
Cc: [email protected]; Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Ajmera, Megha <[email protected]>; Mcnamara, John <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v20 0/5] Add PIE support for HQoS library
03/11/2021 00:57, Liguzinski, WojciechX:
Quoted 12 lines
From: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the
network cause high latency and latency variation. Currently, it
supports RED for active queue management. However, more advanced queue
management is required to address this problem and provide desirable quality of service to users.This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
Quoted 7 lines
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation
notice is going to be prepared and sent.Wojciech Liguzinski (5):
sched: add PIE based congestion management
Did you see the checkpatch issues on this patch?
http://mails.dpdk.org/archives/test-report/2021-November/238253.html
Quoted 1 line
example/qos_sched: add PIE support
The strict minimum is to explain why you add PIE and what the acronym means, inside the commit log.
Quoted 1 line
example/ip_pipeline: add PIE support
Title should follow same convention as history.
For examples, it start with "examples/" as the directory name.
Quoted 1 line
doc/guides/prog_guide: added PIE
doc should be squashed with code patches Is there any doc update related to the examples? If not, it should be fully squashed with lib changes.
Quoted 1 line
app/test: add tests for PIE
If there is nothing special, it can be squashed with the lib patch.
v21 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (3):
sched: add PIE based congestion management
examples/qos_sched: add PIE support
examples/ip_pipeline: add PIE support
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 255 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 19 files changed, 2185 insertions(+), 281 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v21 1/3 sched: add PIE based congestion management
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.
Tests for PIE code added to test application.
Added PIE related information to documentation.
--
Changes in V21:
- Coding style fixed
- Patches reorganized according to comments
Changes in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patches
Changes in V19:
- ACKs included in patches
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 255 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 12 files changed, 1861 insertions(+), 104 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -249,6 +250,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -300,6 +302,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -313,6 +316,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +86 -0
86 lines not on this page · raw message
lib/sched/rte_pie.h new file +398 -0
398 lines not on this page · raw message
lib/sched/rte_sched.c +182 -73
373 lines not on this page · raw message
lib/sched/rte_sched.h +49 -15
101 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v21 2/3 examples/qos_sched: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
patch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v21 3/3 examples/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Adding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
v22 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (3):
sched: add PIE based congestion management
examples/qos_sched: add PIE support
examples/ip_pipeline: add PIE support
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 255 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 19 files changed, 2185 insertions(+), 281 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v22 1/3 sched: add PIE based congestion management
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.
Tests for PIE code added to test application.
Added PIE related information to documentation.
--
Changes in V22:
- Coding style fixed
Changes in V21:
- Coding style fixed
- Patches reorganized according to comments
Changes in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patches
Changes in V19:
- ACKs included in patches
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 255 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 12 files changed, 1861 insertions(+), 104 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -249,6 +250,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -300,6 +302,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -313,6 +316,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +86 -0
86 lines not on this page · raw message
lib/sched/rte_pie.h new file +398 -0
398 lines not on this page · raw message
lib/sched/rte_sched.c +182 -73
373 lines not on this page · raw message
lib/sched/rte_sched.h +49 -15
101 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
PATCH v22 2/3 examples/qos_sched: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
patch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v22 3/3 examples/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Adding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
v23 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (3):
sched: add PIE based congestion management
examples/qos_sched: add PIE support
examples/ip_pipeline: add PIE support
app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 1 - doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 254 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 19 files changed, 2184 insertions(+), 281 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.25.1
PATCH v23 1/3 sched: add PIE based congestion management
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.
Tests for PIE code added to test application.
Added PIE related information to documentation.
--
Changes in V23:
- Coding style fixed
Changes in V22:
- Coding style fixed
Changes in V21:
- Coding style fixed
- Patches reorganized according to comments
Changes in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patches
Changes in V19:
- ACKs included in patches
Changes in V18:
- Resolved merge conflict in lib/sched/meson.build after rebasing ontop of main
- Reverted whitespace change in app_thread.c - comment from Stephen Hemminger
Changes in V17:
- Corrected paragraph link naming in qos_framework.rst to fix CI builds
Changes in V16:
- Fixed 'title underline too short' error in qos_framework.rst
- Applied __rte_unused macro to parameters in rte_sched_port_pie_dequeue()
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 254 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 12 files changed, 1860 insertions(+), 104 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -250,6 +251,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -301,6 +303,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -314,6 +317,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +86 -0
86 lines not on this page · raw message
lib/sched/rte_pie.h new file +398 -0
398 lines not on this page · raw message
lib/sched/rte_sched.c +181 -73
372 lines not on this page · raw message
lib/sched/rte_sched.h +49 -15
101 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v23 1/3] sched: add PIE based congestion management
04/11/2021 12:03, Liguzinski, WojciechX:
Quoted 10 lines
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.
Quoted 8 lines
Tests for PIE code added to test application.
Added PIE related information to documentation.Signed-off-by Wojciech Liguzinski <[email protected]>Acked-by Jasvinder Singh <[email protected]>--
It should be 3 dashes to make the below hidden in git.
Quoted 38 lines
Changes in V23:
- Coding style fixedChanges in V22:
- Coding style fixedChanges in V21:
- Coding style fixed
- Patches reorganized according to commentsChanges in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patchesChanges in V19:
- ACKs included in patchesChanges in V18:
- Resolved merge conflict inlib/sched/meson.buildafter rebasing ontop of main
- Reverted whitespace change inapp_thread.c- comment from Stephen HemmingerChanges in V17:
- Corrected paragraph link naming inqos_framework.rstto fix CI buildsChanges in V16:
- Fixed 'title underline too short' error inqos_framework.rst
- Applied__rte_unusedmacro to parameters inrte_sched_port_pie_dequeue()--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++
Quoted 8 lines
lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 254 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 12 files changed, 1860 insertions(+), 104 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Adding this change to include the new test in sched library maintainership:
MAINTAINERS +1 -0
@@ -1428,6 +1428,7 @@ M: Cristian Dumitrescu <[email protected]> M: Jasvinder Singh <[email protected]> F: lib/sched/ F: doc/guides/prog_guide/qos_framework.rst +F: app/test/test_pie.c F: app/test/test_red.c F: app/test/test_sched.c F: examples/qos_sched/
Cristian, Jasvinder, I didn't see a lot of comments from you on this patch, so I assume you are OK with this change.
Re: [dpdk-dev] [PATCH v23 1/3] sched: add PIE based congestion management
Quoted 99 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, November 4, 2021 1:58 PM
To: Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>; Liguzinski, WojciechX <[email protected]>
Cc: [email protected]; Ajmera, Megha <[email protected]>; Liguzinski, WojciechX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v23 1/3] sched: add PIE based congestion management04/11/2021 12:03, Liguzinski, WojciechX:
Quoted 10 lines
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.Quoted 8 lines
Tests for PIE code added to test application.
Added PIE related information to documentation.Signed-off-by Wojciech Liguzinski <[email protected]>Acked-by Jasvinder Singh <[email protected]>--
It should be 3 dashes to make the below hidden in git.
Quoted 15 lines
Changes in V23:
- Coding style fixedChanges in V22:
- Coding style fixedChanges in V21:
- Coding style fixed
- Patches reorganized according to commentsChanges in V20:
- Removed API conditional compilation
- Added flag to indicate cman enabled/disabled
- Fixed submitter data in patchesQuoted 5 lines
Changes in V19:
- ACKs included in patchesChanges in V18:
- Resolved merge conflict inlib/sched/meson.buildafter rebasing ontop ofmain
Quoted 1 line
- Reverted whitespace change in
app_thread.c- comment from StephenHemminger
Quoted 7 lines
Changes in V17:
- Corrected paragraph link naming inqos_framework.rstto fix CI buildsChanges in V16:
- Fixed 'title underline too short' error inqos_framework.rst
- Applied__rte_unusedmacro to parameters in
rte_sched_port_pie_dequeue()Quoted 10 lines
--- app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++Quoted 8 lines
lib/sched/rte_pie.h | 398 +++++++ lib/sched/rte_sched.c | 254 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 12 files changed, 1860 insertions(+), 104 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.hAdding this change to include the new test in sched library maintainership:
MAINTAINERS +0
-0@@ -1428,6 +1428,7 @@ M: Cristian Dumitrescu<[email protected]>
M: Jasvinder Singh <[email protected]>
F:lib/sched/
F:doc/guides/prog_guide/qos_framework.rst
+F:app/test/test_pie.c
F:app/test/test_red.c
F:app/test/test_sched.c
F: examples/qos_sched/
Quoted 3 lines
Cristian, Jasvinder, I didn't see a lot of comments from you on this patch, so I assume you are OK with this change.
Hi Thomas,
Yes, I am.
Regards,
Cristian
PATCH v23 2/3 examples/qos_sched: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
patch add support enable PIE or RED by
parsing config file.
--- config/rte_config.h | 1 - examples/qos_sched/cfg_file.c | 127 +++++++++++++++------ examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 6 files changed, 250 insertions(+), 109 deletions(-)
config/rte_config.h +0 -1
@@ -89,7 +89,6 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
examples/qos_sched/cfg_file.c +94 -33
193 lines not on this page · raw message
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +17 -10
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +272,20 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v23 3/3 examples/ip_pipeline: add PIE support
In reply to Liguzinski, WojciechXFrom: Wojciech Liguzinski <[email protected]>
Adding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 142 +++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 68 deletions(-)
examples/ip_pipeline/tmgr.c +74 -68
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -25,74 +96,9 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), -#ifdef RTE_SCHED_RED -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, -#endif /* RTE_SCHED_RED */ +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
Signature · 1 line
2.25.1
v24 cover Add PIE support for HQoS library
In reply to Liguzinski, WojciechXlast changes to make this series "more acceptable":
- RTE_SCHED_CMAN in rte_config.h, replacing RTE_SCHED_RED
- test file listed in MAINTAINERS
- few whitespaces fixed
From: Wojciech Liguzinski <[email protected]>
DPDK sched library is equipped with mechanism that secures it from the bufferbloat problem which is a situation when excess buffers in the network cause high latency and latency variation. Currently, it supports RED for active queue management. However, more advanced queue management is required to address this problem and provide desirable quality of service to users.
This solution (RFC) proposes usage of new algorithm called "PIE" (Proportional Integral controller Enhanced) that can effectively and directly control queuing latency to address the bufferbloat problem.
The implementation of mentioned functionality includes modification of existing and adding a new set of data structures to the library, adding PIE related APIs. This affects structures in public API/ABI. That is why deprecation notice is going to be prepared and sent.
Wojciech Liguzinski (3):
sched: add PIE based congestion management examples/qos_sched: support PIE congestion management examples/ip_pipeline: support PIE congestion management
MAINTAINERS | 1 + app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 2 +- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 142 +-- examples/qos_sched/cfg_file.c | 127 ++- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 27 +- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++-- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 396 +++++++ lib/sched/rte_sched.c | 256 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 20 files changed, 2185 insertions(+), 282 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
Signature · 1 line
2.33.0
PATCH v24 1/3 sched: add PIE based congestion management
From: Wojciech Liguzinski <[email protected]>
Implement PIE based congestion management based on rfc8033.
The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively dropping packets randomly.
PIE is implemented as more advanced queue management is required to address the bufferbloat problem and provide desirable quality of service to users.
Tests for PIE code added to test application.
Added PIE related information to documentation.
--- MAINTAINERS | 1 + app/test/meson.build | 4 + app/test/test_pie.c | 1065 ++++++++++++++++++ config/rte_config.h | 2 +- doc/guides/prog_guide/glossary.rst | 3 + doc/guides/prog_guide/qos_framework.rst | 64 +- doc/guides/prog_guide/traffic_management.rst | 13 +- drivers/net/softnic/rte_eth_softnic_tm.c | 6 +- examples/ip_pipeline/tmgr.c | 4 +- examples/qos_sched/cfg_file.c | 6 +- examples/qos_sched/init.c | 4 +- lib/sched/meson.build | 3 +- lib/sched/rte_pie.c | 86 ++ lib/sched/rte_pie.h | 396 +++++++ lib/sched/rte_sched.c | 256 +++-- lib/sched/rte_sched.h | 64 +- lib/sched/version.map | 4 + 17 files changed, 1868 insertions(+), 113 deletions(-) create mode 100644 app/test/test_pie.c create mode 100644 lib/sched/rte_pie.c create mode 100644 lib/sched/rte_pie.h
MAINTAINERS +1 -0
@@ -1428,6 +1428,7 @@ M: Cristian Dumitrescu <[email protected]> M: Jasvinder Singh <[email protected]> F: lib/sched/ F: doc/guides/prog_guide/qos_framework.rst +F: app/test/test_pie.c F: app/test/test_red.c F: app/test/test_sched.c F: examples/qos_sched/
app/test/meson.build +4 -0
@@ -115,6 +115,7 @@ test_sources = files( 'test_reciprocal_division.c', 'test_reciprocal_division_perf.c', 'test_red.c', + 'test_pie.c', 'test_reorder.c', 'test_rib.c', 'test_rib6.c',
@@ -250,6 +251,7 @@ fast_tests = [ ['prefetch_autotest', true], ['rcu_qsbr_autotest', true], ['red_autotest', true], + ['pie_autotest', true], ['rib_autotest', true], ['rib6_autotest', true], ['ring_autotest', true],
@@ -301,6 +303,7 @@ perf_test_names = [ 'fib_slow_autotest', 'fib_perf_autotest', 'red_all', + 'pie_all', 'barrier_autotest', 'hash_multiwriter_autotest', 'timer_racecond_autotest',
@@ -314,6 +317,7 @@ perf_test_names = [ 'fib6_perf_autotest', 'rcu_qsbr_perf_autotest', 'red_perf', + 'pie_perf', 'distributor_perf_autotest', 'pmd_perf_autotest', 'stack_perf_autotest',
app/test/test_pie.c new file +1065 -0
1,065 lines not on this page · raw message
config/rte_config.h +1 -1
@@ -89,7 +89,7 @@#define RTE_MAX_LCORE_FREQS 64/* rte_sched defines */ -#undef RTE_SCHED_RED +#undef RTE_SCHED_CMAN#undef RTE_SCHED_COLLECT_STATS#undef RTE_SCHED_SUBPORT_TC_OV#define RTE_SCHED_PORT_N_GRINDERS 8
doc/guides/prog_guide/glossary.rst +3 -0
@@ -158,6 +158,9 @@ PCI PHY An abbreviation for the physical layer of the OSI model. +PIE + Proportional Integral Controller Enhanced (RFC8033) + pktmbuf An *mbuf* carrying a network packet.
doc/guides/prog_guide/qos_framework.rst +54 -10
116 lines not on this page · raw message
doc/guides/prog_guide/traffic_management.rst +11 -2
@@ -22,6 +22,7 @@ Main features: shared (by multiple nodes) shapers * Congestion management for hierarchy leaf nodes: algorithms of tail drop, head drop, WRED, private (per node) and shared (by multiple nodes) WRED contexts + and PIE. * Packet marking: IEEE 802.1q (VLAN DEI), IETF RFC 3168 (IPv4/IPv6 ECN for TCP and SCTP), IETF RFC 2597 (IPv4 / IPv6 DSCP)
@@ -103,8 +104,9 @@ Congestion Management Congestion management is used to control the admission of packets into a packet queue or group of packet queues on congestion. The congestion management algorithms that are supported are: Tail Drop, Head Drop and Weighted Random -Early Detection (WRED). They are made available for every leaf node in the -hierarchy, subject to the specific implementation supporting them. +Early Detection (WRED), Proportional Integral Controller Enhanced (PIE). +They are made available for every leaf node in the hierarchy, subject to +the specific implementation supporting them. On request of writing a new packet into the current queue while the queue is full, the Tail Drop algorithm drops the new packet while leaving the queue unmodified, as opposed to the Head Drop* algorithm, which drops the packet
@@ -128,6 +130,13 @@ The configuration of WRED private and shared contexts is done through the definition of WRED profiles. Any WRED profile can be used by one or several WRED contexts (either private or shared). +The Proportional Integral Controller Enhanced (PIE) algorithm works by proactively +dropping packets randomly. Calculated drop probability is updated periodically, +based on latency measured and desired and whether the queuing latency is currently +trending up or down. Queuing latency can be obtained using direct measurement or +on estimations calculated from the queue length and dequeue rate. The random drop +is triggered by a packet's arrival before enqueuing into a queue. + Packet Marking --------------
drivers/net/softnic/rte_eth_softnic_tm.c +3 -3
@@ -420,7 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,return 0 ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN #define WRED_SUPPORTED 1#else #define WRED_SUPPORTED 0
@@ -2306,7 +2306,7 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)return NULL ; } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN static void wred_profiles_set (struct rte_eth_dev *dev,uint32_t subport_id)
@@ -2321,7 +2321,7 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)for (tc_id =0 ; tc_id <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; tc_id++)for (color =RTE_COLOR_GREEN ; color <RTE_COLORS ; color++) {struct rte_red_params *dst = - &pp->red_params[tc_id][color]; + &pp->cman_params->red_params[tc_id][color];struct tm_wred_profile *src_wp =tm_tc_wred_profile_get (dev, tc_id); struct rte_tm_red_params *src =
examples/ip_pipeline/tmgr.c +2 -2
@@ -25,7 +25,7 @@ static const struct rte_sched_subport_params subport_params_default = { .pipe_profiles = pipe_profile, .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles =RTE_DIM (pipe_profile), -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN .red_params = {/* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -92,7 +92,7 @@ static const struct rte_sched_subport_params subport_params_default = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +#endif /* RTE_SCHED_CMAN */ };static struct tmgr_port_list tmgr_port_list;
examples/qos_sched/cfg_file.c +3 -3
@@ -242,7 +242,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpomemset (active_queues,0 ,sizeof (active_queues)); n_active_queues =0 ; -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN char sec_name[CFG_NAME_LEN ];struct rte_red_params red_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ][RTE_COLORS ];
@@ -315,7 +315,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } } -#endif /* RTE_SCHED_RED */ +#endif /* RTE_SCHED_CMAN */ for (i =0 ; i <MAX_SCHED_SUBPORTS ; i++) {char sec_name[CFG_NAME_LEN ];
@@ -393,7 +393,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } } -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN for (j =0 ; j <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; j++) {for (k =0 ; k <RTE_COLORS ; k++) { subport_params[i].red_params[j][k].min_th =
examples/qos_sched/init.c +2 -2
@@ -211,7 +211,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { .n_pipe_profiles = sizeof(pipe_profiles) / sizeof(struct rte_sched_pipe_params), .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , -#ifdef RTE_SCHED_RED +#ifdef RTE_SCHED_CMAN .red_params = {/* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,7 +278,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, -#endif /* RTE_SCHED_RED */ +#endif /* RTE_SCHED_CMAN */ }, };
lib/sched/meson.build +2 -1
@@ -7,11 +7,12 @@ if is_windows subdir_done() endif -sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c') +sources = files('rte_sched.c', 'rte_red.c', 'rte_approx.c', 'rte_pie.c') headers = files( 'rte_approx.h', 'rte_red.h', 'rte_sched.h', 'rte_sched_common.h', + 'rte_pie.h', ) deps += ['mbuf', 'meter']
lib/sched/rte_pie.c new file +86 -0
86 lines not on this page · raw message
lib/sched/rte_pie.h new file +396 -0
396 lines not on this page · raw message
lib/sched/rte_sched.c +182 -74
373 lines not on this page · raw message
lib/sched/rte_sched.h +49 -15
101 lines not on this page · raw message
lib/sched/version.map +4 -0
@@ -30,4 +30,8 @@ EXPERIMENTAL { # added in 20.11 rte_sched_port_subport_profile_add; + + # added in 21.11 + rte_pie_rt_data_init; + rte_pie_config_init; };
Signature · 1 line
2.33.0
PATCH v24 2/3 examples/qos_sched: support PIE congestion management
In reply to Thomas MonjalonFrom: Wojciech Liguzinski <[email protected]>
patch add support enable PIE or RED by
parsing config file.
--- examples/qos_sched/cfg_file.c | 121 +++++++++++++++----- examples/qos_sched/cfg_file.h | 5 + examples/qos_sched/init.c | 23 ++-- examples/qos_sched/main.h | 3 + examples/qos_sched/profile.cfg | 196 ++++++++++++++++++++++----------- 5 files changed, 245 insertions(+), 103 deletions(-)
examples/qos_sched/cfg_file.c +91 -30
@@ -229,6 +229,40 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,return 0 ; } +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p) +{ +int j, k; + subport_p->cman_params->cman_mode = cman_p.cman_mode; + +for (j =0 ; j <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; j++) { +if (subport_p->cman_params->cman_mode == +RTE_SCHED_CMAN_RED ) { +for (k =0 ; k <RTE_COLORS ; k++) { + subport_p->cman_params->red_params[j][k].min_th = + cman_p.red_params[j][k].min_th; + subport_p->cman_params->red_params[j][k].max_th = + cman_p.red_params[j][k].max_th; + subport_p->cman_params->red_params[j][k].maxp_inv = + cman_p.red_params[j][k].maxp_inv; + subport_p->cman_params->red_params[j][k].wq_log2 = + cman_p.red_params[j][k].wq_log2; + } + }else { + subport_p->cman_params->pie_params[j].qdelay_ref = + cman_p.pie_params[j].qdelay_ref; + subport_p->cman_params->pie_params[j].dp_update_interval = + cman_p.pie_params[j].dp_update_interval; + subport_p->cman_params->pie_params[j].max_burst = + cman_p.pie_params[j].max_burst; + subport_p->cman_params->pie_params[j].tailq_th = + cman_p.pie_params[j].tailq_th; + } + } +} +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport_params) {
@@ -243,24 +277,25 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo n_active_queues =0 ;#ifdef RTE_SCHED_CMAN -char sec_name[CFG_NAME_LEN ]; -struct rte_red_params red_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ][RTE_COLORS ]; +struct rte_sched_cman_params cman_params = { + .cman_mode =RTE_SCHED_CMAN_RED , + .red_params = { }, + }; -snprintf (sec_name,sizeof (sec_name),"red" ); - -if (rte_cfgfile_has_section (cfg, sec_name)) { +if (rte_cfgfile_has_section (cfg,"red" )) { + cman_params.cman_mode =RTE_SCHED_CMAN_RED ;for (i =0 ; i <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; i++) {char str[32 ]; -/* Parse WRED min thresholds */ -snprintf (str,sizeof (str),"tc %d wred min" , i); - entry =rte_cfgfile_get_entry (cfg, sec_name, str); +/* Parse RED min thresholds */ +snprintf (str,sizeof (str),"tc %d red min" , i); + entry =rte_cfgfile_get_entry (cfg,"red" , str);if (entry) {char *next;/* for each packet colour (green, yellow, red) */ for (j =0 ; j <RTE_COLORS ; j++) { - red_params[i][j].min_th + cman_params.red_params[i][j].min_th = (uint16_t )strtol (entry, &next,10 );if (next ==NULL )break ;
@@ -268,14 +303,14 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } -/* Parse WRED max thresholds */ -snprintf (str,sizeof (str),"tc %d wred max" , i); +/* Parse RED max thresholds */ +snprintf (str,sizeof (str),"tc %d red max" , i); entry =rte_cfgfile_get_entry (cfg,"red" , str);if (entry) {char *next;/* for each packet colour (green, yellow, red) */ for (j =0 ; j <RTE_COLORS ; j++) { - red_params[i][j].max_th + cman_params.red_params[i][j].max_th = (uint16_t )strtol (entry, &next,10 );if (next ==NULL )break ;
@@ -283,14 +318,14 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } -/* Parse WRED inverse mark probabilities */ -snprintf (str,sizeof (str),"tc %d wred inv prob" , i); +/* Parse RED inverse mark probabilities */ +snprintf (str,sizeof (str),"tc %d red inv prob" , i); entry =rte_cfgfile_get_entry (cfg,"red" , str);if (entry) {char *next;/* for each packet colour (green, yellow, red) */ for (j =0 ; j <RTE_COLORS ; j++) { - red_params[i][j].maxp_inv + cman_params.red_params[i][j].maxp_inv = (uint8_t )strtol (entry, &next,10 );if (next ==NULL )
@@ -299,14 +334,14 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } -/* Parse WRED EWMA filter weights */ -snprintf (str,sizeof (str),"tc %d wred weight" , i); +/* Parse RED EWMA filter weights */ +snprintf (str,sizeof (str),"tc %d red weight" , i); entry =rte_cfgfile_get_entry (cfg,"red" , str);if (entry) {char *next;/* for each packet colour (green, yellow, red) */ for (j =0 ; j <RTE_COLORS ; j++) { - red_params[i][j].wq_log2 + cman_params.red_params[i][j].wq_log2 = (uint8_t )strtol (entry, &next,10 );if (next ==NULL )break ;
@@ -315,6 +350,43 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } } + +if (rte_cfgfile_has_section (cfg,"pie" )) { + cman_params.cman_mode =RTE_SCHED_CMAN_PIE ; + +for (i =0 ; i <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; i++) { +char str[32 ]; + +/* Parse Queue Delay Ref value */ +snprintf (str,sizeof (str),"tc %d qdelay ref" , i); + entry =rte_cfgfile_get_entry (cfg,"pie" , str); +if (entry) + cman_params.pie_params[i].qdelay_ref = + (uint16_t )atoi (entry); + +/* Parse Max Burst value */ +snprintf (str,sizeof (str),"tc %d max burst" , i); + entry =rte_cfgfile_get_entry (cfg,"pie" , str); +if (entry) + cman_params.pie_params[i].max_burst = + (uint16_t )atoi (entry); + +/* Parse Update Interval Value */ +snprintf (str,sizeof (str),"tc %d update interval" , i); + entry =rte_cfgfile_get_entry (cfg,"pie" , str); +if (entry) + cman_params.pie_params[i].dp_update_interval = + (uint16_t )atoi (entry); + +/* Parse Tailq Threshold Value */ +snprintf (str,sizeof (str),"tc %d tailq th" , i); + entry =rte_cfgfile_get_entry (cfg,"pie" , str); +if (entry) + cman_params.pie_params[i].tailq_th = + (uint16_t )atoi (entry); + + } + }#endif /* RTE_SCHED_CMAN */ for (i =0 ; i <MAX_SCHED_SUBPORTS ; i++) {
@@ -394,18 +466,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } }#ifdef RTE_SCHED_CMAN -for (j =0 ; j <RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ; j++) { -for (k =0 ; k <RTE_COLORS ; k++) { - subport_params[i].red_params[j][k].min_th = - red_params[j][k].min_th; - subport_params[i].red_params[j][k].max_th = - red_params[j][k].max_th; - subport_params[i].red_params[j][k].maxp_inv = - red_params[j][k].maxp_inv; - subport_params[i].red_params[j][k].wq_log2 = - red_params[j][k].wq_log2; - } - } +set_subport_cman_params (subport_params+i, cman_params);#endif } }
examples/qos_sched/cfg_file.h +5 -0
@@ -12,6 +12,11 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);int cfg_load_pipe (struct rte_cfgfile *cfg,struct rte_sched_pipe_params *pipe); +#ifdef RTE_SCHED_CMAN +void set_subport_cman_params (struct rte_sched_subport_params *subport_p, +struct rte_sched_cman_params cman_p); +#endif +int cfg_load_subport (struct rte_cfgfile *cfg,struct rte_sched_subport_params *subport); int cfg_load_subport_profile(struct rte_cfgfile *cfg,
examples/qos_sched/init.c +15 -8
@@ -203,15 +203,9 @@ static struct rte_sched_subport_profile_params }, }; -struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { - { - .n_pipes_per_subport_enabled =4096 , - .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles =sizeof (pipe_profiles) / -sizeof (struct rte_sched_pipe_params ), - .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , #ifdef RTE_SCHED_CMAN +struct rte_sched_cman_params cman_params = { + .cman_mode = RTE_SCHED_CMAN_RED, .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
@@ -278,6 +272,19 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, +}; +#endif /* RTE_SCHED_CMAN */ + +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ] = { + { + .n_pipes_per_subport_enabled =4096 , + .qsize = {64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 ,64 }, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles =sizeof (pipe_profiles) / +sizeof (struct rte_sched_pipe_params ), + .n_max_pipe_profiles =MAX_SCHED_PIPE_PROFILES , +#ifdef RTE_SCHED_CMAN + .cman_params = &cman_params, #endif /* RTE_SCHED_CMAN */ }, };
examples/qos_sched/main.h +3 -0
@@ -153,6 +153,9 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];extern uint32_t n_active_queues;extern struct rte_sched_port_params port_params; +#ifdef RTE_SCHED_CMAN +extern struct rte_sched_cman_params cman_params; +#endif extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS ];int app_parse_args (int argc,char **argv);
examples/qos_sched/profile.cfg +131 -65
199 lines not on this page · raw message
Signature · 1 line
2.33.0
PATCH v24 3/3 examples/ip_pipeline: support PIE congestion management
In reply to Thomas MonjalonFrom: Wojciech Liguzinski <[email protected]>
Adding the PIE support for IP Pipeline
--- examples/ip_pipeline/tmgr.c | 138 +++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 66 deletions(-)
examples/ip_pipeline/tmgr.c +72 -66
@@ -17,6 +17,77 @@ static uint32_t n_subport_profiles;static struct rte_sched_pipe_params pipe_profile[TMGR_PIPE_PROFILE_MAX ]; +#ifdef RTE_SCHED_CMAN +static struct rte_sched_cman_params cman_params = { + .red_params = { +/* Traffic Class 0 Colors Green / Yellow / Red */ + [0 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [0 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 1 - Colors Green / Yellow / Red */ + [1 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [1 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 2 - Colors Green / Yellow / Red */ + [2 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [2 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 3 - Colors Green / Yellow / Red */ + [3 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [3 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 4 - Colors Green / Yellow / Red */ + [4 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [4 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 5 - Colors Green / Yellow / Red */ + [5 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [5 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 6 - Colors Green / Yellow / Red */ + [6 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [6 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 7 - Colors Green / Yellow / Red */ + [7 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [7 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 8 - Colors Green / Yellow / Red */ + [8 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [8 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 9 - Colors Green / Yellow / Red */ + [9 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [9 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 10 - Colors Green / Yellow / Red */ + [10 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [10 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 11 - Colors Green / Yellow / Red */ + [11 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [11 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + +/* Traffic Class 12 - Colors Green / Yellow / Red */ + [12 ][0 ] = {.min_th =48 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][1 ] = {.min_th =40 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + [12 ][2 ] = {.min_th =32 , .max_th =64 , .maxp_inv =10 , .wq_log2 =9 }, + }, +}; +#endif /* RTE_SCHED_CMAN */ +static uint32_t n_pipe_profiles;static const struct rte_sched_subport_params subport_params_default = {
@@ -26,72 +97,7 @@ static const struct rte_sched_subport_params subport_params_default = { .n_pipe_profiles = 0, /* filled at run time */ .n_max_pipe_profiles = RTE_DIM(pipe_profile), #ifdef RTE_SCHED_CMAN -.red_params = { -/* Traffic Class 0 Colors Green / Yellow / Red */ - [0][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [0][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 1 - Colors Green / Yellow / Red */ - [1][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [1][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 2 - Colors Green / Yellow / Red */ - [2][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [2][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 3 - Colors Green / Yellow / Red */ - [3][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [3][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 4 - Colors Green / Yellow / Red */ - [4][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [4][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 5 - Colors Green / Yellow / Red */ - [5][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [5][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 6 - Colors Green / Yellow / Red */ - [6][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [6][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 7 - Colors Green / Yellow / Red */ - [7][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [7][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 8 - Colors Green / Yellow / Red */ - [8][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [8][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 9 - Colors Green / Yellow / Red */ - [9][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [9][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 10 - Colors Green / Yellow / Red */ - [10][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [10][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 11 - Colors Green / Yellow / Red */ - [11][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [11][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - - /* Traffic Class 12 - Colors Green / Yellow / Red */ - [12][0] = {.min_th = 48, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][1] = {.min_th = 40, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, - }, + .cman_params = &cman_params,#endif /* RTE_SCHED_CMAN */ };
Signature · 1 line
2.33.0
04/11/2021 15:55, Thomas Monjalon:
Quoted 4 lines
last changes to make this series "more acceptable":
-RTE_SCHED_CMANinrte_config.h, replacingRTE_SCHED_RED
- test file listed inMAINTAINERS
- few whitespaces fixed
Applied this last version.
The maintainers of this library didn't help really.
Review of basic stuff and process well known by maintainers were not done. Even after doing these last changes myself, this library is still in a poor state. The most problematic is the big amount of dead code disabled in config/rte_config.h:
#undef RTE_SCHED_CMAN #undef RTE_SCHED_COLLECT_STATS #undef RTE_SCHED_SUBPORT_TC_OV #define RTE_SCHED_PORT_N_GRINDERS 8 #undef RTE_SCHED_VECTOR
I think the most appropriate going forward is to stop merging any feature in the libraries and examples related to sched and pipeline, until a proper resolution is done for this dead code.
Tips: make runtime options and properly document them.
Note: I probably won't reply to this thread until 21.11 is done, because I have other priorities and I don't want to hear about this for some time.