Skip to content

Commit 7e1fe00

Browse files
koct9igregkh
authored andcommitted
net_sched/sfq: update hierarchical backlog when drop packet
[ 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") Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 114414b commit 7e1fe00

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

net/sched/sch_sfq.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
434434
qdisc_drop(head, sch);
435435

436436
slot_queue_add(slot, skb);
437+
qdisc_tree_reduce_backlog(sch, 0, delta);
437438
return NET_XMIT_CN;
438439
}
439440

@@ -465,8 +466,10 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
465466
/* Return Congestion Notification only if we dropped a packet
466467
* from this flow.
467468
*/
468-
if (qlen != slot->qlen)
469+
if (qlen != slot->qlen) {
470+
qdisc_tree_reduce_backlog(sch, 0, dropped - qdisc_pkt_len(skb));
469471
return NET_XMIT_CN;
472+
}
470473

471474
/* As we dropped a packet, better let upper stack know this */
472475
qdisc_tree_reduce_backlog(sch, 1, dropped);

0 commit comments

Comments
 (0)