diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-16 19:15:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-17 14:59:59 -0400 |
commit | a2a385d627e1549da4b43a8b3dfe370589766e1c (patch) | |
tree | d61e9913497c6c14406032f6a0822738707f1abf /net/ipv4/tcp_hybla.c | |
parent | e005d193d55ee5f757b13306112d8c23aac27a88 (diff) |
tcp: bool conversions
bool conversions where possible.
__inline__ -> inline
space cleanups
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_hybla.c')
-rw-r--r-- | net/ipv4/tcp_hybla.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c index fe3ecf484b44..57bdd17dff4d 100644 --- a/net/ipv4/tcp_hybla.c +++ b/net/ipv4/tcp_hybla.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | /* Tcp Hybla structure. */ | 16 | /* Tcp Hybla structure. */ |
17 | struct hybla { | 17 | struct hybla { |
18 | u8 hybla_en; | 18 | bool hybla_en; |
19 | u32 snd_cwnd_cents; /* Keeps increment values when it is <1, <<7 */ | 19 | u32 snd_cwnd_cents; /* Keeps increment values when it is <1, <<7 */ |
20 | u32 rho; /* Rho parameter, integer part */ | 20 | u32 rho; /* Rho parameter, integer part */ |
21 | u32 rho2; /* Rho * Rho, integer part */ | 21 | u32 rho2; /* Rho * Rho, integer part */ |
@@ -24,8 +24,7 @@ struct hybla { | |||
24 | u32 minrtt; /* Minimum smoothed round trip time value seen */ | 24 | u32 minrtt; /* Minimum smoothed round trip time value seen */ |
25 | }; | 25 | }; |
26 | 26 | ||
27 | /* Hybla reference round trip time (default= 1/40 sec = 25 ms), | 27 | /* Hybla reference round trip time (default= 1/40 sec = 25 ms), in ms */ |
28 | expressed in jiffies */ | ||
29 | static int rtt0 = 25; | 28 | static int rtt0 = 25; |
30 | module_param(rtt0, int, 0644); | 29 | module_param(rtt0, int, 0644); |
31 | MODULE_PARM_DESC(rtt0, "reference rout trip time (ms)"); | 30 | MODULE_PARM_DESC(rtt0, "reference rout trip time (ms)"); |
@@ -39,7 +38,7 @@ static inline void hybla_recalc_param (struct sock *sk) | |||
39 | ca->rho_3ls = max_t(u32, tcp_sk(sk)->srtt / msecs_to_jiffies(rtt0), 8); | 38 | ca->rho_3ls = max_t(u32, tcp_sk(sk)->srtt / msecs_to_jiffies(rtt0), 8); |
40 | ca->rho = ca->rho_3ls >> 3; | 39 | ca->rho = ca->rho_3ls >> 3; |
41 | ca->rho2_7ls = (ca->rho_3ls * ca->rho_3ls) << 1; | 40 | ca->rho2_7ls = (ca->rho_3ls * ca->rho_3ls) << 1; |
42 | ca->rho2 = ca->rho2_7ls >>7; | 41 | ca->rho2 = ca->rho2_7ls >> 7; |
43 | } | 42 | } |
44 | 43 | ||
45 | static void hybla_init(struct sock *sk) | 44 | static void hybla_init(struct sock *sk) |
@@ -52,7 +51,7 @@ static void hybla_init(struct sock *sk) | |||
52 | ca->rho_3ls = 0; | 51 | ca->rho_3ls = 0; |
53 | ca->rho2_7ls = 0; | 52 | ca->rho2_7ls = 0; |
54 | ca->snd_cwnd_cents = 0; | 53 | ca->snd_cwnd_cents = 0; |
55 | ca->hybla_en = 1; | 54 | ca->hybla_en = true; |
56 | tp->snd_cwnd = 2; | 55 | tp->snd_cwnd = 2; |
57 | tp->snd_cwnd_clamp = 65535; | 56 | tp->snd_cwnd_clamp = 65535; |
58 | 57 | ||
@@ -67,6 +66,7 @@ static void hybla_init(struct sock *sk) | |||
67 | static void hybla_state(struct sock *sk, u8 ca_state) | 66 | static void hybla_state(struct sock *sk, u8 ca_state) |
68 | { | 67 | { |
69 | struct hybla *ca = inet_csk_ca(sk); | 68 | struct hybla *ca = inet_csk_ca(sk); |
69 | |||
70 | ca->hybla_en = (ca_state == TCP_CA_Open); | 70 | ca->hybla_en = (ca_state == TCP_CA_Open); |
71 | } | 71 | } |
72 | 72 | ||