]> git.baikalelectronics.ru Git - kernel.git/commit
codel: use u16 field instead of 31bits for rec_inv_sqrt
authorEric Dumazet <eric.dumazet@gmail.com>
Sat, 12 May 2012 21:23:23 +0000 (21:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 May 2012 22:32:56 +0000 (18:32 -0400)
commitf53bb7a1e7f6c8d1f8b4b42c78395ce95631c65a
tree93236fdb1d8f23afe44fc4b7366c1997787cb8cf
parent729f7dff12249f016f9f6868d49fa764432d80c2
codel: use u16 field instead of 31bits for rec_inv_sqrt

David pointed out gcc might generate poor code with 31bit fields.

Using u16 is more than enough and permits a better code output.

Also make the code intent more readable using constants, fixed point arithmetic
not being trivial for everybody.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/codel.h