Commit 3b0e7dc0 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'tcp_cubic-fix-spurious-HYSTART_DELAY-on-RTT-decrease'



Neal Cardwell says:

====================
tcp_cubic: fix spurious HYSTART_DELAY on RTT decrease

This series fixes a long-standing bug in the TCP CUBIC
HYSTART_DELAY mechanim recently reported by Mirja Kuehlewind. The
code can cause a spurious exit of slow start in some particular
cases: upon an RTT decrease that happens on the 9th or later ACK
in a round trip. This series fixes the original Hystart code and
also the recent BPF implementation.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 29a30bac 7d21d54d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -432,10 +432,9 @@ static void hystart_update(struct sock *sk, u32 delay)

	if (hystart_detect & HYSTART_DELAY) {
		/* obtain the minimum delay of more than sampling packets */
		if (ca->sample_cnt < HYSTART_MIN_SAMPLES) {
		if (ca->curr_rtt > delay)
			ca->curr_rtt = delay;

		if (ca->sample_cnt < HYSTART_MIN_SAMPLES) {
			ca->sample_cnt++;
		} else {
			if (ca->curr_rtt > ca->delay_min +
+2 −3
Original line number Diff line number Diff line
@@ -480,10 +480,9 @@ static __always_inline void hystart_update(struct sock *sk, __u32 delay)

	if (hystart_detect & HYSTART_DELAY) {
		/* obtain the minimum delay of more than sampling packets */
		if (ca->sample_cnt < HYSTART_MIN_SAMPLES) {
		if (ca->curr_rtt > delay)
			ca->curr_rtt = delay;

		if (ca->sample_cnt < HYSTART_MIN_SAMPLES) {
			ca->sample_cnt++;
		} else {
			if (ca->curr_rtt > ca->delay_min +