]> git.karo-electronics.de Git - karo-tx-linux.git/commit
codel: refine one condition to avoid a nul rec_inv_sqrt
authorEric Dumazet <edumazet@google.com>
Sun, 29 Jul 2012 20:52:21 +0000 (20:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:38:39 +0000 (10:38 -0700)
commit5a67d241014549fbfa31825e2eb99f9df0d8d13e
tree027771424815696a85c54dbbabc001ac3b3bda4b
parentd61ed4631511b08d2e14924eab16a9ddaed44df6
codel: refine one condition to avoid a nul rec_inv_sqrt

[ Upstream commit 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8 ]

One condition before codel_Newton_step() was not good if
we never left the dropping state for a flow. As a result
rec_inv_sqrt was 0, instead of the ~0 initial value.

codel control law was then set to a very aggressive mode, dropping
many packets before reaching 'target' and recovering from this problem.

To keep codel_vars_init() as efficient as possible, refine
the condition to make sure rec_inv_sqrt initial value is correct

Many thanks to Anton Mich for discovering the issue and suggesting
a fix.

Reported-by: Anton Mich <lp2s1h@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/codel.h