Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tcp: fix stretch ACK bugs in Veno

Change Veno to properly handle stretch ACKs in additive
increase mode by passing in the count of ACKed packets
to tcp_cong_avoid_ai().

Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Pengcheng Yang and committed by
David S. Miller
ca04f5d4 d861b5c7

+5 -4
+5 -4
net/ipv4/tcp_veno.c
··· 154 154 155 155 if (tcp_in_slow_start(tp)) { 156 156 /* Slow start. */ 157 - tcp_slow_start(tp, acked); 158 - goto done; 157 + acked = tcp_slow_start(tp, acked); 158 + if (!acked) 159 + goto done; 159 160 } 160 161 161 162 /* Congestion avoidance. */ ··· 164 163 /* In the "non-congestive state", increase cwnd 165 164 * every rtt. 166 165 */ 167 - tcp_cong_avoid_ai(tp, tp->snd_cwnd, 1); 166 + tcp_cong_avoid_ai(tp, tp->snd_cwnd, acked); 168 167 } else { 169 168 /* In the "congestive state", increase cwnd 170 169 * every other rtt. ··· 178 177 veno->inc = 1; 179 178 tp->snd_cwnd_cnt = 0; 180 179 } else 181 - tp->snd_cwnd_cnt++; 180 + tp->snd_cwnd_cnt += acked; 182 181 } 183 182 done: 184 183 if (tp->snd_cwnd < 2)