提交 cf5d74b8 编写于 作者: H Hoang Tran 提交者: David S. Miller

tcp: fix under-evaluated ssthresh in TCP Vegas

With the commit 76174004 (tcp: do not slow start when cwnd equals
ssthresh), the comparison to the reduced cwnd in tcp_vegas_ssthresh() would
under-evaluate the ssthresh.
Signed-off-by: NHoang Tran <hoang.tran@uclouvain.be>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5af48b59
...@@ -158,7 +158,7 @@ EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event); ...@@ -158,7 +158,7 @@ EXPORT_SYMBOL_GPL(tcp_vegas_cwnd_event);
static inline u32 tcp_vegas_ssthresh(struct tcp_sock *tp) static inline u32 tcp_vegas_ssthresh(struct tcp_sock *tp)
{ {
return min(tp->snd_ssthresh, tp->snd_cwnd-1); return min(tp->snd_ssthresh, tp->snd_cwnd);
} }
static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked) static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册