diff options
| author | David S. Miller <davem@nuts.davemloft.net> | 2004-04-21 08:47:05 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.davemloft.net> | 2004-04-21 08:47:05 -0700 |
| commit | 91a793870dd95b4b337339de10b87803fce3433c (patch) | |
| tree | b99a4226d61635db66f49012509578bcaca70d88 /include | |
| parent | 424be00c07439f26e2ff0cf9003e02abff2820b2 (diff) | |
[TCP]: Abstract out all settings of tcp_opt->ca_state into a function.
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 268da91f64dd..af427a279038 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1212,6 +1212,11 @@ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) return max(tp->snd_cwnd >> 1U, 2U); } +static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state) +{ + tp->ca_state = ca_state; +} + /* If cwnd > ssthresh, we may raise ssthresh to be half-way to cwnd. * The exception is rate halving phase, when cwnd is decreasing towards * ssthresh. @@ -1271,7 +1276,7 @@ static inline void tcp_enter_cwr(struct tcp_opt *tp) tp->prior_ssthresh = 0; if (tp->ca_state < TCP_CA_CWR) { __tcp_enter_cwr(tp); - tp->ca_state = TCP_CA_CWR; + tcp_set_ca_state(tp, TCP_CA_CWR); } } |
