aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_westwood.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:24:47 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:19:39 -0500
commite905a9edab7f4f14f9213b52234e4a346c690911 (patch)
tree9e52a5f47eec47c5685c347ff7af22290a10305b /net/ipv4/tcp_westwood.c
parent642656518b2e64fd59d9bbd15b6885cac5fe99b1 (diff)
[NET] IPV4: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_westwood.c')
-rw-r--r--net/ipv4/tcp_westwood.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 4f42a86c77f3..4e1b61032a9c 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -63,10 +63,10 @@ static void tcp_westwood_init(struct sock *sk)
63 struct westwood *w = inet_csk_ca(sk); 63 struct westwood *w = inet_csk_ca(sk);
64 64
65 w->bk = 0; 65 w->bk = 0;
66 w->bw_ns_est = 0; 66 w->bw_ns_est = 0;
67 w->bw_est = 0; 67 w->bw_est = 0;
68 w->accounted = 0; 68 w->accounted = 0;
69 w->cumul_ack = 0; 69 w->cumul_ack = 0;
70 w->reset_rtt_min = 1; 70 w->reset_rtt_min = 1;
71 w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT; 71 w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT;
72 w->rtt_win_sx = tcp_time_stamp; 72 w->rtt_win_sx = tcp_time_stamp;
@@ -121,7 +121,7 @@ static void westwood_update_window(struct sock *sk)
121 * to fix mismatch between tp->snd_una and w->snd_una for the first 121 * to fix mismatch between tp->snd_una and w->snd_una for the first
122 * bandwidth sample 122 * bandwidth sample
123 */ 123 */
124 if (w->first_ack) { 124 if (w->first_ack) {
125 w->snd_una = tcp_sk(sk)->snd_una; 125 w->snd_una = tcp_sk(sk)->snd_una;
126 w->first_ack = 0; 126 w->first_ack = 0;
127 } 127 }
@@ -147,7 +147,7 @@ static inline void update_rtt_min(struct westwood *w)
147{ 147{
148 if (w->reset_rtt_min) { 148 if (w->reset_rtt_min) {
149 w->rtt_min = w->rtt; 149 w->rtt_min = w->rtt;
150 w->reset_rtt_min = 0; 150 w->reset_rtt_min = 0;
151 } else 151 } else
152 w->rtt_min = min(w->rtt, w->rtt_min); 152 w->rtt_min = min(w->rtt, w->rtt_min);
153} 153}
@@ -183,15 +183,15 @@ static inline u32 westwood_acked_count(struct sock *sk)
183 183
184 w->cumul_ack = tp->snd_una - w->snd_una; 184 w->cumul_ack = tp->snd_una - w->snd_una;
185 185
186 /* If cumul_ack is 0 this is a dupack since it's not moving 186 /* If cumul_ack is 0 this is a dupack since it's not moving
187 * tp->snd_una. 187 * tp->snd_una.
188 */ 188 */
189 if (!w->cumul_ack) { 189 if (!w->cumul_ack) {
190 w->accounted += tp->mss_cache; 190 w->accounted += tp->mss_cache;
191 w->cumul_ack = tp->mss_cache; 191 w->cumul_ack = tp->mss_cache;
192 } 192 }
193 193
194 if (w->cumul_ack > tp->mss_cache) { 194 if (w->cumul_ack > tp->mss_cache) {
195 /* Partial or delayed ack */ 195 /* Partial or delayed ack */
196 if (w->accounted >= w->cumul_ack) { 196 if (w->accounted >= w->cumul_ack) {
197 w->accounted -= w->cumul_ack; 197 w->accounted -= w->cumul_ack;
@@ -237,7 +237,7 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event)
237 237
238 case CA_EVENT_FRTO: 238 case CA_EVENT_FRTO:
239 tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk); 239 tp->snd_ssthresh = tcp_westwood_bw_rttmin(sk);
240 /* Update RTT_min when next ack arrives */ 240 /* Update RTT_min when next ack arrives */
241 w->reset_rtt_min = 1; 241 w->reset_rtt_min = 1;
242 break; 242 break;
243 243