aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_yeah.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_yeah.c')
-rw-r--r--net/ipv4/tcp_yeah.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index 599b79b8eac0..cd7273218598 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -54,10 +54,8 @@ static void tcp_yeah_init(struct sock *sk)
54 /* Ensure the MD arithmetic works. This is somewhat pedantic, 54 /* Ensure the MD arithmetic works. This is somewhat pedantic,
55 * since I don't think we will see a cwnd this large. :) */ 55 * since I don't think we will see a cwnd this large. :) */
56 tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128); 56 tp->snd_cwnd_clamp = min_t(u32, tp->snd_cwnd_clamp, 0xffffffff/128);
57
58} 57}
59 58
60
61static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked, s32 rtt_us) 59static void tcp_yeah_pkts_acked(struct sock *sk, u32 pkts_acked, s32 rtt_us)
62{ 60{
63 const struct inet_connection_sock *icsk = inet_csk(sk); 61 const struct inet_connection_sock *icsk = inet_csk(sk);
@@ -84,7 +82,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked)
84 /* Scalable */ 82 /* Scalable */
85 83
86 tp->snd_cwnd_cnt += yeah->pkts_acked; 84 tp->snd_cwnd_cnt += yeah->pkts_acked;
87 if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)){ 85 if (tp->snd_cwnd_cnt > min(tp->snd_cwnd, TCP_SCALABLE_AI_CNT)) {
88 if (tp->snd_cwnd < tp->snd_cwnd_clamp) 86 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
89 tp->snd_cwnd++; 87 tp->snd_cwnd++;
90 tp->snd_cwnd_cnt = 0; 88 tp->snd_cwnd_cnt = 0;
@@ -120,7 +118,6 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked)
120 */ 118 */
121 119
122 if (after(ack, yeah->vegas.beg_snd_nxt)) { 120 if (after(ack, yeah->vegas.beg_snd_nxt)) {
123
124 /* We do the Vegas calculations only if we got enough RTT 121 /* We do the Vegas calculations only if we got enough RTT
125 * samples that we can be reasonably sure that we got 122 * samples that we can be reasonably sure that we got
126 * at least one RTT sample that wasn't from a delayed ACK. 123 * at least one RTT sample that wasn't from a delayed ACK.
@@ -189,7 +186,6 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked)
189 } 186 }
190 187
191 yeah->lastQ = queue; 188 yeah->lastQ = queue;
192
193 } 189 }
194 190
195 /* Save the extent of the current window so we can use this 191 /* Save the extent of the current window so we can use this
@@ -205,7 +201,8 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 acked)
205 } 201 }
206} 202}
207 203
208static u32 tcp_yeah_ssthresh(struct sock *sk) { 204static u32 tcp_yeah_ssthresh(struct sock *sk)
205{
209 const struct tcp_sock *tp = tcp_sk(sk); 206 const struct tcp_sock *tp = tcp_sk(sk);
210 struct yeah *yeah = inet_csk_ca(sk); 207 struct yeah *yeah = inet_csk_ca(sk);
211 u32 reduction; 208 u32 reduction;