diff options
author | stephen hemminger <stephen@networkplumber.org> | 2014-08-30 02:32:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-01 21:12:45 -0400 |
commit | 688d1945bc89bd585ec67b5b83121f499e6290bb (patch) | |
tree | 3138045afe46d72e458c1cfb3dd2552b2acaf915 /net/ipv4/tcp_westwood.c | |
parent | d09d3038a336cbab6bde616ce44266c36c214f81 (diff) |
tcp: whitespace fixes
Fix places where there is space before tab, long lines, and
awkward if(){, double spacing etc. Add blank line after declaration/initialization.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c index b94a04ae2ed5..81911a92356c 100644 --- a/net/ipv4/tcp_westwood.c +++ b/net/ipv4/tcp_westwood.c | |||
@@ -42,7 +42,6 @@ struct westwood { | |||
42 | u8 reset_rtt_min; /* Reset RTT min to next RTT sample*/ | 42 | u8 reset_rtt_min; /* Reset RTT min to next RTT sample*/ |
43 | }; | 43 | }; |
44 | 44 | ||
45 | |||
46 | /* TCP Westwood functions and constants */ | 45 | /* TCP Westwood functions and constants */ |
47 | #define TCP_WESTWOOD_RTT_MIN (HZ/20) /* 50ms */ | 46 | #define TCP_WESTWOOD_RTT_MIN (HZ/20) /* 50ms */ |
48 | #define TCP_WESTWOOD_INIT_RTT (20*HZ) /* maybe too conservative?! */ | 47 | #define TCP_WESTWOOD_INIT_RTT (20*HZ) /* maybe too conservative?! */ |
@@ -153,7 +152,6 @@ static inline void update_rtt_min(struct westwood *w) | |||
153 | w->rtt_min = min(w->rtt, w->rtt_min); | 152 | w->rtt_min = min(w->rtt, w->rtt_min); |
154 | } | 153 | } |
155 | 154 | ||
156 | |||
157 | /* | 155 | /* |
158 | * @westwood_fast_bw | 156 | * @westwood_fast_bw |
159 | * It is called when we are in fast path. In particular it is called when | 157 | * It is called when we are in fast path. In particular it is called when |
@@ -208,7 +206,6 @@ static inline u32 westwood_acked_count(struct sock *sk) | |||
208 | return w->cumul_ack; | 206 | return w->cumul_ack; |
209 | } | 207 | } |
210 | 208 | ||
211 | |||
212 | /* | 209 | /* |
213 | * TCP Westwood | 210 | * TCP Westwood |
214 | * Here limit is evaluated as Bw estimation*RTTmin (for obtaining it | 211 | * Here limit is evaluated as Bw estimation*RTTmin (for obtaining it |
@@ -219,6 +216,7 @@ static u32 tcp_westwood_bw_rttmin(const struct sock *sk) | |||
219 | { | 216 | { |
220 | const struct tcp_sock *tp = tcp_sk(sk); | 217 | const struct tcp_sock *tp = tcp_sk(sk); |
221 | const struct westwood *w = inet_csk_ca(sk); | 218 | const struct westwood *w = inet_csk_ca(sk); |
219 | |||
222 | return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); | 220 | return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); |
223 | } | 221 | } |
224 | 222 | ||
@@ -254,12 +252,12 @@ static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event) | |||
254 | } | 252 | } |
255 | } | 253 | } |
256 | 254 | ||
257 | |||
258 | /* Extract info for Tcp socket info provided via netlink. */ | 255 | /* Extract info for Tcp socket info provided via netlink. */ |
259 | static void tcp_westwood_info(struct sock *sk, u32 ext, | 256 | static void tcp_westwood_info(struct sock *sk, u32 ext, |
260 | struct sk_buff *skb) | 257 | struct sk_buff *skb) |
261 | { | 258 | { |
262 | const struct westwood *ca = inet_csk_ca(sk); | 259 | const struct westwood *ca = inet_csk_ca(sk); |
260 | |||
263 | if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { | 261 | if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { |
264 | struct tcpvegas_info info = { | 262 | struct tcpvegas_info info = { |
265 | .tcpv_enabled = 1, | 263 | .tcpv_enabled = 1, |
@@ -271,7 +269,6 @@ static void tcp_westwood_info(struct sock *sk, u32 ext, | |||
271 | } | 269 | } |
272 | } | 270 | } |
273 | 271 | ||
274 | |||
275 | static struct tcp_congestion_ops tcp_westwood __read_mostly = { | 272 | static struct tcp_congestion_ops tcp_westwood __read_mostly = { |
276 | .init = tcp_westwood_init, | 273 | .init = tcp_westwood_init, |
277 | .ssthresh = tcp_reno_ssthresh, | 274 | .ssthresh = tcp_reno_ssthresh, |