[openwrt/openwrt] generic: drop extra-old-deprecated pending fix patch for sch codel

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 29 10:00:03 PDT 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0f9af6dcd9fc3d752a546dbd20a9b3cd6a94a4eb

commit 0f9af6dcd9fc3d752a546dbd20a9b3cd6a94a4eb
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Apr 29 18:55:19 2025 +0200

    generic: drop extra-old-deprecated pending fix patch for sch codel
    
    Patch 620-net_sched-codel-do-not-defer-queue-length-update.patch is
    actually an ancient patch that somehow manage to be ported for 7 solid
    years.
    
    This comes from [1] where a fix patch was proposed. Nobody notice that
    the proposed patch was actually rejected upstream in favor of [2]. And
    the upstream fix patch is present in kernel from version 4.18.
    
    This means that we were actually fixing for a non existant bug and maybe
    introducing regression down the line.
    
    Drop the patch for good as we already have a fix for it in flace for a
    long time.
    
    [1] https://bugzilla.kernel.org/show_bug.cgi?id=109581
    [2] https://github.com/torvalds/linux/commit/35b42da69e35536da603a50e40aa6c41b2f7b0f8
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...ed-codel-do-not-defer-queue-length-update.patch | 86 ----------------------
 1 file changed, 86 deletions(-)

diff --git a/target/linux/generic/pending-6.6/620-net_sched-codel-do-not-defer-queue-length-update.patch b/target/linux/generic/pending-6.6/620-net_sched-codel-do-not-defer-queue-length-update.patch
deleted file mode 100644
index 4b4825ae3b..0000000000
--- a/target/linux/generic/pending-6.6/620-net_sched-codel-do-not-defer-queue-length-update.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From: Konstantin Khlebnikov <khlebnikov at yandex-team.ru>
-Date: Mon, 21 Aug 2017 11:14:14 +0300
-Subject: [PATCH] net_sched/codel: do not defer queue length update
-
-When codel wants to drop last packet in ->dequeue() it cannot call
-qdisc_tree_reduce_backlog() right away - it will notify parent qdisc
-about zero qlen and HTB/HFSC will deactivate class. The same class will
-be deactivated second time by caller of ->dequeue(). Currently codel and
-fq_codel defer update. This triggers warning in HFSC when it's qlen != 0
-but there is no active classes.
-
-This patch update parent queue length immediately: just temporary increase
-qlen around qdisc_tree_reduce_backlog() to prevent first class deactivation
-if we have skb to return.
-
-This might open another problem in HFSC - now operation peek could fail and
-deactivate parent class.
-
-Signed-off-by: Konstantin Khlebnikov <khlebnikov at yandex-team.ru>
-Link: https://bugzilla.kernel.org/show_bug.cgi?id=109581
----
-
---- a/net/sched/sch_codel.c
-+++ b/net/sched/sch_codel.c
-@@ -95,11 +95,17 @@ static struct sk_buff *codel_qdisc_deque
- 			    &q->stats, qdisc_pkt_len, codel_get_enqueue_time,
- 			    drop_func, dequeue_func);
- 
--	/* We cant call qdisc_tree_reduce_backlog() if our qlen is 0,
--	 * or HTB crashes. Defer it for next round.
-+	/* If our qlen is 0 qdisc_tree_reduce_backlog() will deactivate
-+	 * parent class, dequeue in parent qdisc will do the same if we
-+	 * return skb. Temporary increment qlen if we have skb.
- 	 */
--	if (q->stats.drop_count && sch->q.qlen) {
--		qdisc_tree_reduce_backlog(sch, q->stats.drop_count, q->stats.drop_len);
-+	if (q->stats.drop_count) {
-+		if (skb)
-+			sch->q.qlen++;
-+		qdisc_tree_reduce_backlog(sch, q->stats.drop_count,
-+					  q->stats.drop_len);
-+		if (skb)
-+			sch->q.qlen--;
- 		q->stats.drop_count = 0;
- 		q->stats.drop_len = 0;
- 	}
---- a/net/sched/sch_fq_codel.c
-+++ b/net/sched/sch_fq_codel.c
-@@ -304,6 +304,21 @@ begin:
- 			    &flow->cvars, &q->cstats, qdisc_pkt_len,
- 			    codel_get_enqueue_time, drop_func, dequeue_func);
- 
-+	/* If our qlen is 0 qdisc_tree_reduce_backlog() will deactivate
-+	 * parent class, dequeue in parent qdisc will do the same if we
-+	 * return skb. Temporary increment qlen if we have skb.
-+	 */
-+	if (q->cstats.drop_count) {
-+		if (skb)
-+			sch->q.qlen++;
-+		qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
-+					  q->cstats.drop_len);
-+		if (skb)
-+			sch->q.qlen--;
-+		q->cstats.drop_count = 0;
-+		q->cstats.drop_len = 0;
-+	}
-+
- 	if (!skb) {
- 		/* force a pass through old_flows to prevent starvation */
- 		if ((head == &q->new_flows) && !list_empty(&q->old_flows))
-@@ -314,15 +329,6 @@ begin:
- 	}
- 	qdisc_bstats_update(sch, skb);
- 	flow->deficit -= qdisc_pkt_len(skb);
--	/* We cant call qdisc_tree_reduce_backlog() if our qlen is 0,
--	 * or HTB crashes. Defer it for next round.
--	 */
--	if (q->cstats.drop_count && sch->q.qlen) {
--		qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
--					  q->cstats.drop_len);
--		q->cstats.drop_count = 0;
--		q->cstats.drop_len = 0;
--	}
- 	return skb;
- }
- 




More information about the lede-commits mailing list