Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b585b34 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Reported-by: default avatarLucas Nussbaum <lucas.nussbaum@loria.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17a6e9f1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -459,6 +459,10 @@ static int __init cubictcp_register(void)
	/* divide by bic_scale and by constant Srtt (100ms) */
	/* divide by bic_scale and by constant Srtt (100ms) */
	do_div(cube_factor, bic_scale * 10);
	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);
	return tcp_register_congestion_control(&cubictcp);
}
}