Skip to contentSkip to conversation

Patch "net_sched/sfq: update hierarchical backlog when drop packet" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Aug 25, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net_sched/sfq: update hierarchical backlog when drop packet

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net_sched-sfq-update-hierarchical-backlog-when-drop-packet.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Aug 24 17:48:38 PDT 2017

From: Konstantin Khlebnikov <[email protected]>
Date: Tue, 15 Aug 2017 16:37:04 +0300
Subject: net_sched/sfq: update hierarchical backlog when drop packet

From: Konstantin Khlebnikov <[email protected]>

[ Upstream commit 325d5dc3f7e7c2840b65e4a2988c082c2c0025c5 ]

When sfq_enqueue() drops head packet or packet from another queue it have to update backlog at upper qdiscs too.

Fixes 2ccccf5fb43f ("net_sched: update hierarchical backlog too")
---
 net/sched/sch_sfq.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
net/sched/sch_sfq.c +4 -1
@@ -434,6 +434,7 @@ congestion_drop:
 		qdisc_drop(head, sch);
 
 		slot_queue_add(slot, skb);
+		qdisc_tree_reduce_backlog(sch, 0, delta);
 		return NET_XMIT_CN;
 	}
 
@@ -465,8 +466,10 @@ enqueue:
 	/* Return Congestion Notification only if we dropped a packet
 	 * from this flow.
 	 */
-	if (qlen != slot->qlen)
+	if (qlen != slot->qlen) {
+		qdisc_tree_reduce_backlog(sch, 0, dropped - qdisc_pkt_len(skb));
 		return NET_XMIT_CN;
+	}
 
 	/* As we dropped a packet, better let upper stack know this */
 	qdisc_tree_reduce_backlog(sch, 1, dropped);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/net_sched-remove-warning-from-qdisc_hash_add.patch queue-4.4/net_sched-fix-order-of-queue-length-updates-in-qdisc_replace.patch queue-4.4/net_sched-sfq-update-hierarchical-backlog-when-drop-packet.patch