projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tcp: add tcp_in_slow_start helper
[cascardo/linux.git]
/
net
/
ipv4
/
tcp_vegas.c
diff --git
a/net/ipv4/tcp_vegas.c
b/net/ipv4/tcp_vegas.c
index
a6cea1d
..
13951c4
100644
(file)
--- a/
net/ipv4/tcp_vegas.c
+++ b/
net/ipv4/tcp_vegas.c
@@
-225,7
+225,7
@@
static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
*/
diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT;
*/
diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT;
- if (diff > gamma && t
p->snd_cwnd <= tp->snd_ssthresh
) {
+ if (diff > gamma && t
cp_in_slow_start(tp)
) {
/* Going too fast. Time to slow down
* and switch to congestion avoidance.
*/
/* Going too fast. Time to slow down
* and switch to congestion avoidance.
*/
@@
-240,7
+240,7
@@
static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1);
tp->snd_ssthresh = tcp_vegas_ssthresh(tp);
tp->snd_cwnd = min(tp->snd_cwnd, (u32)target_cwnd+1);
tp->snd_ssthresh = tcp_vegas_ssthresh(tp);
- } else if (t
p->snd_cwnd <= tp->snd_ssthresh
) {
+ } else if (t
cp_in_slow_start(tp)
) {
/* Slow start. */
tcp_slow_start(tp, acked);
} else {
/* Slow start. */
tcp_slow_start(tp, acked);
} else {
@@
-281,7
+281,7
@@
static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
vegas->minRTT = 0x7fffffff;
}
/* Use normal slow start */
vegas->minRTT = 0x7fffffff;
}
/* Use normal slow start */
- else if (t
p->snd_cwnd <= tp->snd_ssthresh
)
+ else if (t
cp_in_slow_start(tp)
)
tcp_slow_start(tp, acked);
}
tcp_slow_start(tp, acked);
}