diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-03-14 07:52:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-14 15:54:40 -0700 |
commit | 3b585b34493ec9db382d6c325d4ed77b9eb2d2a5 (patch) | |
tree | e3208425d46953bb587b2db6dfb521064f127aed /net/ipv4/tcp_cubic.c | |
parent | 17a6e9f1aa9ba07ca13a1eaf1e631e743af50cca (diff) | |
download | kernel_goldelico_gta04-3b585b34493ec9db382d6c325d4ed77b9eb2d2a5.zip kernel_goldelico_gta04-3b585b34493ec9db382d6c325d4ed77b9eb2d2a5.tar.gz kernel_goldelico_gta04-3b585b34493ec9db382d6c325d4ed77b9eb2d2a5.tar.bz2 |
tcp_cubic: enable high resolution ack time if needed
This is a refined version of an earlier patch by Lucas Nussbaum.
Cubic needs RTT values in milliseconds. If HZ < 1000 then
the values will be too coarse.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Lucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cubic.c')
-rw-r--r-- | net/ipv4/tcp_cubic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index f4fb2d4..5e0491d 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -459,6 +459,10 @@ static int __init cubictcp_register(void) /* divide by bic_scale and by constant Srtt (100ms) */ do_div(cube_factor, bic_scale * 10); + /* hystart needs ms clock resolution */ + if (hystart && HZ < 1000) + cubictcp.flags |= TCP_CONG_RTT_STAMP; + return tcp_register_congestion_control(&cubictcp); } |