fq_codel: fix memory limitation drift
authorEric Dumazet <edumazet@google.com>
Mon, 16 May 2016 01:16:38 +0000 (18:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 May 2016 01:54:24 +0000 (21:54 -0400)
commit77f57761466e9aef2b57acf8ce07df11bf360e34
tree5b60d91757574c917d979ff83c37f69671350c44
parentfd24d72ca9b52558b1511edc814951cdfe5f21cf
fq_codel: fix memory limitation drift

memory_usage must be decreased in dequeue_func(), not in
fq_codel_dequeue(), otherwise packets dropped by Codel algo
are missing this decrease.

Also we need to clear memory_usage in fq_codel_reset()

Fixes: 95b58430abe7 ("fq_codel: add memory limitation per queue")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_fq_codel.c