mirror of
https://github.com/openwrt/openwrt.git
synced 2026-06-17 12:40:16 +04:00
8f638f9366
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>
113 lines
3.2 KiB
Diff
113 lines
3.2 KiB
Diff
From 060969bc048d2f85149b7f1a8bbb56e6b1434cae Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
|
|
Date: Tue, 13 Jan 2026 15:31:56 +0100
|
|
Subject: [PATCH 7/7] net/sched: cake: avoid separate allocation of struct
|
|
cake_sched_config
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Paolo pointed out that we can avoid separately allocating struct
|
|
cake_sched_config even in the non-mq case, by embedding it into struct
|
|
cake_sched_data. This reduces the complexity of the logic that swaps the
|
|
pointers and frees the old value, at the cost of adding 56 bytes to the
|
|
latter. Since cake_sched_data is already almost 17k bytes, this seems
|
|
like a reasonable tradeoff.
|
|
|
|
Suggested-by: Paolo Abeni <pabeni@redhat.com>
|
|
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
|
Fixes: bc0ce2bad36c ("net/sched: sch_cake: Factor out config variables into separate struct")
|
|
Link: https://patch.msgid.link/20260113143157.2581680-1-toke@redhat.com
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
net/sched/sch_cake.c | 29 ++++++-----------------------
|
|
1 file changed, 6 insertions(+), 23 deletions(-)
|
|
|
|
--- a/net/sched/sch_cake.c
|
|
+++ b/net/sched/sch_cake.c
|
|
@@ -221,6 +221,7 @@ struct cake_sched_data {
|
|
struct tcf_block *block;
|
|
struct cake_tin_data *tins;
|
|
struct cake_sched_config *config;
|
|
+ struct cake_sched_config initial_config;
|
|
|
|
struct cake_heap_entry overflow_heap[CAKE_QUEUES * CAKE_MAX_TINS];
|
|
|
|
@@ -2798,8 +2799,6 @@ static void cake_destroy(struct Qdisc *s
|
|
qdisc_watchdog_cancel(&q->watchdog);
|
|
tcf_block_put(q->block);
|
|
kvfree(q->tins);
|
|
- if (q->config && !q->config->is_shared)
|
|
- kvfree(q->config);
|
|
}
|
|
|
|
static void cake_config_init(struct cake_sched_config *q, bool is_shared)
|
|
@@ -2822,13 +2821,9 @@ static int cake_init(struct Qdisc *sch,
|
|
struct netlink_ext_ack *extack)
|
|
{
|
|
struct cake_sched_data *qd = qdisc_priv(sch);
|
|
- struct cake_sched_config *q;
|
|
+ struct cake_sched_config *q = &qd->initial_config;
|
|
int i, j, err;
|
|
|
|
- q = kzalloc(sizeof(*q), GFP_KERNEL);
|
|
- if (!q)
|
|
- return -ENOMEM;
|
|
-
|
|
cake_config_init(q, false);
|
|
|
|
sch->limit = 10240;
|
|
@@ -2840,14 +2835,13 @@ static int cake_init(struct Qdisc *sch,
|
|
|
|
if (opt) {
|
|
err = cake_change(sch, opt, extack);
|
|
-
|
|
if (err)
|
|
- goto err;
|
|
+ return err;
|
|
}
|
|
|
|
err = tcf_block_get(&qd->block, &qd->filter_list, sch, extack);
|
|
if (err)
|
|
- goto err;
|
|
+ return err;
|
|
|
|
quantum_div[0] = ~0;
|
|
for (i = 1; i <= CAKE_QUEUES; i++)
|
|
@@ -2855,10 +2849,8 @@ static int cake_init(struct Qdisc *sch,
|
|
|
|
qd->tins = kvcalloc(CAKE_MAX_TINS, sizeof(struct cake_tin_data),
|
|
GFP_KERNEL);
|
|
- if (!qd->tins) {
|
|
- err = -ENOMEM;
|
|
- goto err;
|
|
- }
|
|
+ if (!qd->tins)
|
|
+ return -ENOMEM;
|
|
|
|
for (i = 0; i < CAKE_MAX_TINS; i++) {
|
|
struct cake_tin_data *b = qd->tins + i;
|
|
@@ -2891,22 +2883,13 @@ static int cake_init(struct Qdisc *sch,
|
|
qd->last_checked_active = 0;
|
|
|
|
return 0;
|
|
-err:
|
|
- kvfree(qd->config);
|
|
- qd->config = NULL;
|
|
- return err;
|
|
}
|
|
|
|
static void cake_config_replace(struct Qdisc *sch, struct cake_sched_config *cfg)
|
|
{
|
|
struct cake_sched_data *qd = qdisc_priv(sch);
|
|
- struct cake_sched_config *q = qd->config;
|
|
|
|
qd->config = cfg;
|
|
-
|
|
- if (!q->is_shared)
|
|
- kvfree(q);
|
|
-
|
|
cake_reconfigure(sch);
|
|
}
|
|
|