diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2017-08-15 16:37:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-30 10:19:19 +0200 |
commit | 7e1fe0062c24b1cdfb58fb494d03741a6b0a4ac8 (patch) | |
tree | 9b11ceb2906b3f2644efebde3c6d20f5ea217370 /net | |
parent | 114414b8547525709851b5901b41fda25f9382b1 (diff) | |
download | linux-stable-7e1fe0062c24b1cdfb58fb494d03741a6b0a4ac8.tar.gz linux-stable-7e1fe0062c24b1cdfb58fb494d03741a6b0a4ac8.tar.bz2 linux-stable-7e1fe0062c24b1cdfb58fb494d03741a6b0a4ac8.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/sch_sfq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 4431e2833e45..3f2c3eed04da 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -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); |