Commit cf665a60 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Greg Kroah-Hartman

net_sched/sfq: update hierarchical backlog when drop packet


[ Upstream commit 325d5dc3 ]

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

Fixes: 2ccccf5f ("net_sched: update hierarchical backlog too")
Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 163db2c6
...@@ -435,6 +435,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) ...@@ -435,6 +435,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
qdisc_drop(head, sch, to_free); qdisc_drop(head, sch, to_free);
slot_queue_add(slot, skb); slot_queue_add(slot, skb);
qdisc_tree_reduce_backlog(sch, 0, delta);
return NET_XMIT_CN; return NET_XMIT_CN;
} }
...@@ -466,8 +467,10 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free) ...@@ -466,8 +467,10 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
/* Return Congestion Notification only if we dropped a packet /* Return Congestion Notification only if we dropped a packet
* from this flow. * 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; return NET_XMIT_CN;
}
/* As we dropped a packet, better let upper stack know this */ /* As we dropped a packet, better let upper stack know this */
qdisc_tree_reduce_backlog(sch, 1, dropped); qdisc_tree_reduce_backlog(sch, 1, dropped);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment