French Administration has written a guideline that defines additional DSCP values for use in its networks.
Add new CAKE diffserv tables to take those new values into account and add CONFIG_NET_SCH_CAKE_DGSIC to select those tables instead of the default ones. The document is available at https://www.bo.sga.defense.gouv.fr/texte/signe/264219/N%C2%B0%2036/DEF/DGSIC.pdf or https://www.bo.sga.defense.gouv.fr/texte/264219/N%C2%B0%2036/DEF/DGSIC.html Signed-off-by: Christophe Leroy <christophe.le...@csgroup.eu> --- net/sched/Kconfig | 11 +++++++++++ net/sched/sch_cake.c | 42 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 1e8ab4749c6c..b99f247404e0 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig @@ -331,6 +331,17 @@ config NET_SCH_CAKE If unsure, say N. +config NET_SCH_CAKE_DGSIC + bool "CAKE: Follow French Administration's guideline DEF/DGSIC/36" + depends on NET_SCH_CAKE + help + Say Y here if you want to use the Common Applications Kept Enhanced + (CAKE) queue management algorithm in an environment that requires to + take into account additional DSCP values defined by the French + Administration in the guideline document identified DEF/DGSIC/36, + available at + https://www.bo.sga.defense.gouv.fr/texte/signe/264219/N%C2%B0%2036/DEF/DGSIC.pdf + config NET_SCH_FQ tristate "Fair Queue" help diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c index a43a58a73d09..3d9af3a68c05 100644 --- a/net/sched/sch_cake.c +++ b/net/sched/sch_cake.c @@ -322,6 +322,17 @@ static const u8 diffserv8[] = { 7, 2, 2, 2, 2, 2, 2, 2, }; +static const u8 diffserv8_dgsic[] = { + 2, 0, 1, 2, 4, 2, 2, 2, + 1, 1, 1, 2, 1, 1, 1, 2, + 5, 4, 4, 2, 4, 4, 4, 2, + 3, 3, 3, 2, 3, 3, 3, 2, + 6, 3, 3, 2, 3, 3, 3, 2, + 6, 6, 6, 2, 6, 6, 6, 2, + 7, 2, 2, 2, 2, 2, 2, 2, + 7, 2, 2, 2, 2, 2, 2, 2, +}; + static const u8 diffserv4[] = { 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, @@ -333,6 +344,17 @@ static const u8 diffserv4[] = { 3, 0, 0, 0, 0, 0, 0, 0, }; +static const u8 diffserv4_dgsic[] = { + 0, 1, 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 2, 2, 2, 0, 2, 2, 2, 0, + 2, 2, 2, 0, 2, 2, 2, 0, + 3, 2, 2, 0, 2, 2, 2, 0, + 3, 3, 3, 0, 3, 3, 3, 0, + 3, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, +}; + static const u8 diffserv3[] = { 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, @@ -344,6 +366,17 @@ static const u8 diffserv3[] = { 2, 0, 0, 0, 0, 0, 0, 0, }; +static const u8 diffserv3_dgsic[] = { + 0, 1, 0, 0, 2, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 0, 2, 2, 2, 0, + 2, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, +}; + static const u8 besteffort[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2409,7 +2442,8 @@ static int cake_config_diffserv8(struct Qdisc *sch) q->tin_cnt = 8; /* codepoint to class mapping */ - q->tin_index = diffserv8; + q->tin_index = IS_ENABLED(CONFIG_NET_SCH_CAKE_DGSIC) ? diffserv8_dgsic : + diffserv8; q->tin_order = normal_order; /* class characteristics */ @@ -2452,7 +2486,8 @@ static int cake_config_diffserv4(struct Qdisc *sch) q->tin_cnt = 4; /* codepoint to class mapping */ - q->tin_index = diffserv4; + q->tin_index = IS_ENABLED(CONFIG_NET_SCH_CAKE_DGSIC) ? diffserv4_dgsic : + diffserv4; q->tin_order = bulk_order; /* class characteristics */ @@ -2489,7 +2524,8 @@ static int cake_config_diffserv3(struct Qdisc *sch) q->tin_cnt = 3; /* codepoint to class mapping */ - q->tin_index = diffserv3; + q->tin_index = IS_ENABLED(CONFIG_NET_SCH_CAKE_DGSIC) ? diffserv3_dgsic : + diffserv3; q->tin_order = bulk_order; /* class characteristics */ -- 2.35.1 _______________________________________________ Cake mailing list Cake@lists.bufferbloat.net https://lists.bufferbloat.net/listinfo/cake