summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2017-08-15 16:37:04 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-15 17:16:39 -0700
commit325d5dc3f7e7c2840b65e4a2988c082c2c0025c5 (patch)
treeede387bd3f12c88eb0b059e622ead1704d91ddb2 /net/sched
parent898904226b5a6dee657f23cf51e385f50da22596 (diff)
downloadop-kernel-dev-325d5dc3f7e7c2840b65e4a2988c082c2c0025c5.zip
op-kernel-dev-325d5dc3f7e7c2840b65e4a2988c082c2c0025c5.tar.gz
net_sched/sfq: update hierarchical backlog when drop packet
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>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_sfq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index f80ea2c..82469ef 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -437,6 +437,7 @@ congestion_drop:
qdisc_drop(head, sch, to_free);
slot_queue_add(slot, skb);
+ qdisc_tree_reduce_backlog(sch, 0, delta);
return NET_XMIT_CN;
}
@@ -468,8 +469,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);
OpenPOWER on IntegriCloud