Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.91 Remove upstreamed patches: - airoha/patches-6.12/017-v6.13-net-airoha-Implement-BQL-support.patch[1] - airoha/patches-6.12/138-v7.1-net-airoha-Add-missing-RX_CPU_IDX-configuration-in-a.patch[2] - airoha/patches-6.12/149-v7.1-net-airoha-Move-ndesc-initialization-at-end-of-airoh.patch[3] - generic/backport-6.12/940-v7.1-net-dsa-realtek-rtl8365mb-fix-mode-mask-calculation.patch[5] Manually rebased patches: - airoha/patches-6.12/048-01-v6.15-net-airoha-Move-airoha_eth-driver-in-a-dedicated-fol.patch[1] - ath79/patches-6.12/800-leds-add-reset-controller-based-driver.patch[4] - bcm27xx/patches-6.12/950-0122-bcmgenet-Better-coalescing-parameter-defaults.patch[6] We also backported four patches to fix perf tool regression: - generic/backport-6.12/216-01-revert-perf-cgroup-update-metric-leader-in-evlist__e.patch - generic/backport-6.12/216-02-revert-perf-tool_pmu-fix-aggregation-on-duration_tim.patch - generic/backport-6.12/216-03-revert-perf-python-add-parse_events-function.patch - generic/backport-6.12/216-04-revert-perf-tool_pmu-factor-tool-events-into-their-o.patch All other patches are automatically refreshed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=ca24fcac1daaa5e8a667981d81986a3eb4b9fb04 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=f00037a99bc2332ef59dc85298b98b20af165904 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=d36be272adda7f313e39dd118086955d993bf6a7 [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=07d3611389ba7d78b80ea360a42ce32ab2521fbc [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=3354d6c62fd4baa7b32cbd80cc5a8aa3f2bd0656 [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.91&id=b84351dcc359667bc952131c1424b692ec83dce2 Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/23444 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
188 lines
5.9 KiB
Diff
188 lines
5.9 KiB
Diff
From 15c2715a52645fd8e6e18b7abc3449292d118c7c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Jonas=20K=C3=B6ppeler?= <j.koeppeler@tu-berlin.de>
|
|
Date: Thu, 26 Feb 2026 12:40:16 +0100
|
|
Subject: [PATCH] net/sched: sch_cake: fixup cake_mq rate adjustment for
|
|
diffserv config
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cake_mq's rate adjustment during the sync periods did not adjust the
|
|
rates for every tin in a diffserv config. This lead to inconsistencies
|
|
of rates between the tins. Fix this by setting the rates for all tins
|
|
during synchronization.
|
|
|
|
Fixes: 1bddd758bac2 ("net/sched: sch_cake: share shaper state across sub-instances of cake_mq")
|
|
Signed-off-by: Jonas Köppeler <j.koeppeler@tu-berlin.de>
|
|
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
|
|
Link: https://patch.msgid.link/20260226-cake-mq-skip-sync-bandwidth-unlimited-v1-2-01830bb4db87@tu-berlin.de
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
net/sched/sch_cake.c | 50 ++++++++++++++++++++------------------------
|
|
1 file changed, 23 insertions(+), 27 deletions(-)
|
|
|
|
--- a/net/sched/sch_cake.c
|
|
+++ b/net/sched/sch_cake.c
|
|
@@ -391,8 +391,8 @@ static const u32 inv_sqrt_cache[REC_INV_
|
|
1239850263, 1191209601, 1147878294, 1108955788
|
|
};
|
|
|
|
-static void cake_set_rate(struct cake_tin_data *b, u64 rate, u32 mtu,
|
|
- u64 target_ns, u64 rtt_est_ns);
|
|
+static void cake_configure_rates(struct Qdisc *sch, u64 rate, bool rate_adjust);
|
|
+
|
|
/* http://en.wikipedia.org/wiki/Methods_of_computing_square_roots
|
|
* new_invsqrt = (invsqrt / 2) * (3 - count * invsqrt^2)
|
|
*
|
|
@@ -2039,12 +2039,9 @@ static struct sk_buff *cake_dequeue(stru
|
|
if (num_active_qs > 1)
|
|
new_rate = div64_u64(q->config->rate_bps, num_active_qs);
|
|
|
|
- /* mtu = 0 is used to only update the rate and not mess with cobalt params */
|
|
- cake_set_rate(b, new_rate, 0, 0, 0);
|
|
+ cake_configure_rates(sch, new_rate, true);
|
|
q->last_checked_active = now;
|
|
q->active_queues = num_active_qs;
|
|
- q->rate_ns = b->tin_rate_ns;
|
|
- q->rate_shft = b->tin_rate_shft;
|
|
}
|
|
|
|
begin:
|
|
@@ -2362,12 +2359,10 @@ static void cake_set_rate(struct cake_ti
|
|
b->cparams.p_dec = 1 << 20; /* 1/4096 */
|
|
}
|
|
|
|
-static int cake_config_besteffort(struct Qdisc *sch)
|
|
+static int cake_config_besteffort(struct Qdisc *sch, u64 rate, u32 mtu)
|
|
{
|
|
struct cake_sched_data *q = qdisc_priv(sch);
|
|
struct cake_tin_data *b = &q->tins[0];
|
|
- u32 mtu = psched_mtu(qdisc_dev(sch));
|
|
- u64 rate = q->config->rate_bps;
|
|
|
|
q->tin_cnt = 1;
|
|
|
|
@@ -2381,12 +2376,10 @@ static int cake_config_besteffort(struct
|
|
return 0;
|
|
}
|
|
|
|
-static int cake_config_precedence(struct Qdisc *sch)
|
|
+static int cake_config_precedence(struct Qdisc *sch, u64 rate, u32 mtu)
|
|
{
|
|
/* convert high-level (user visible) parameters into internal format */
|
|
struct cake_sched_data *q = qdisc_priv(sch);
|
|
- u32 mtu = psched_mtu(qdisc_dev(sch));
|
|
- u64 rate = q->config->rate_bps;
|
|
u32 quantum = 256;
|
|
u32 i;
|
|
|
|
@@ -2457,7 +2450,7 @@ static int cake_config_precedence(struct
|
|
* Total 12 traffic classes.
|
|
*/
|
|
|
|
-static int cake_config_diffserv8(struct Qdisc *sch)
|
|
+static int cake_config_diffserv8(struct Qdisc *sch, u64 rate, u32 mtu)
|
|
{
|
|
/* Pruned list of traffic classes for typical applications:
|
|
*
|
|
@@ -2474,8 +2467,6 @@ static int cake_config_diffserv8(struct
|
|
*/
|
|
|
|
struct cake_sched_data *q = qdisc_priv(sch);
|
|
- u32 mtu = psched_mtu(qdisc_dev(sch));
|
|
- u64 rate = q->config->rate_bps;
|
|
u32 quantum = 256;
|
|
u32 i;
|
|
|
|
@@ -2505,7 +2496,7 @@ static int cake_config_diffserv8(struct
|
|
return 0;
|
|
}
|
|
|
|
-static int cake_config_diffserv4(struct Qdisc *sch)
|
|
+static int cake_config_diffserv4(struct Qdisc *sch, u64 rate, u32 mtu)
|
|
{
|
|
/* Further pruned list of traffic classes for four-class system:
|
|
*
|
|
@@ -2518,8 +2509,6 @@ static int cake_config_diffserv4(struct
|
|
*/
|
|
|
|
struct cake_sched_data *q = qdisc_priv(sch);
|
|
- u32 mtu = psched_mtu(qdisc_dev(sch));
|
|
- u64 rate = q->config->rate_bps;
|
|
u32 quantum = 1024;
|
|
|
|
q->tin_cnt = 4;
|
|
@@ -2547,7 +2536,7 @@ static int cake_config_diffserv4(struct
|
|
return 0;
|
|
}
|
|
|
|
-static int cake_config_diffserv3(struct Qdisc *sch)
|
|
+static int cake_config_diffserv3(struct Qdisc *sch, u64 rate, u32 mtu)
|
|
{
|
|
/* Simplified Diffserv structure with 3 tins.
|
|
* Latency Sensitive (CS7, CS6, EF, VA, TOS4)
|
|
@@ -2555,8 +2544,6 @@ static int cake_config_diffserv3(struct
|
|
* Low Priority (LE, CS1)
|
|
*/
|
|
struct cake_sched_data *q = qdisc_priv(sch);
|
|
- u32 mtu = psched_mtu(qdisc_dev(sch));
|
|
- u64 rate = q->config->rate_bps;
|
|
u32 quantum = 1024;
|
|
|
|
q->tin_cnt = 3;
|
|
@@ -2581,32 +2568,33 @@ static int cake_config_diffserv3(struct
|
|
return 0;
|
|
}
|
|
|
|
-static void cake_reconfigure(struct Qdisc *sch)
|
|
+static void cake_configure_rates(struct Qdisc *sch, u64 rate, bool rate_adjust)
|
|
{
|
|
+ u32 mtu = likely(rate_adjust) ? 0 : psched_mtu(qdisc_dev(sch));
|
|
struct cake_sched_data *qd = qdisc_priv(sch);
|
|
struct cake_sched_config *q = qd->config;
|
|
int c, ft;
|
|
|
|
switch (q->tin_mode) {
|
|
case CAKE_DIFFSERV_BESTEFFORT:
|
|
- ft = cake_config_besteffort(sch);
|
|
+ ft = cake_config_besteffort(sch, rate, mtu);
|
|
break;
|
|
|
|
case CAKE_DIFFSERV_PRECEDENCE:
|
|
- ft = cake_config_precedence(sch);
|
|
+ ft = cake_config_precedence(sch, rate, mtu);
|
|
break;
|
|
|
|
case CAKE_DIFFSERV_DIFFSERV8:
|
|
- ft = cake_config_diffserv8(sch);
|
|
+ ft = cake_config_diffserv8(sch, rate, mtu);
|
|
break;
|
|
|
|
case CAKE_DIFFSERV_DIFFSERV4:
|
|
- ft = cake_config_diffserv4(sch);
|
|
+ ft = cake_config_diffserv4(sch, rate, mtu);
|
|
break;
|
|
|
|
case CAKE_DIFFSERV_DIFFSERV3:
|
|
default:
|
|
- ft = cake_config_diffserv3(sch);
|
|
+ ft = cake_config_diffserv3(sch, rate, mtu);
|
|
break;
|
|
}
|
|
|
|
@@ -2617,6 +2605,14 @@ static void cake_reconfigure(struct Qdis
|
|
|
|
qd->rate_ns = qd->tins[ft].tin_rate_ns;
|
|
qd->rate_shft = qd->tins[ft].tin_rate_shft;
|
|
+}
|
|
+
|
|
+static void cake_reconfigure(struct Qdisc *sch)
|
|
+{
|
|
+ struct cake_sched_data *qd = qdisc_priv(sch);
|
|
+ struct cake_sched_config *q = qd->config;
|
|
+
|
|
+ cake_configure_rates(sch, qd->config->rate_bps, false);
|
|
|
|
if (q->buffer_config_limit) {
|
|
qd->buffer_limit = q->buffer_config_limit;
|