diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-02-22 01:59:58 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:23:02 -0400 |
commit | bdaae17da81db79b9aa4dfbf43305cfeef64f6a8 (patch) | |
tree | 5dce126ae84073646c15417c30bd1b6b13660784 /net | |
parent | 9ead9a1d385ae2c52a6dcf2828d84ce66be04fc2 (diff) |
[TCP] FRTO: Moved tcp_use_frto from tcp.h to tcp_input.c
In addition, removed inline.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c5be3d0465f5..fe96e176d85a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1236,6 +1236,19 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1236 | return flag; | 1236 | return flag; |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | int tcp_use_frto(const struct sock *sk) | ||
1240 | { | ||
1241 | const struct tcp_sock *tp = tcp_sk(sk); | ||
1242 | |||
1243 | /* F-RTO must be activated in sysctl and there must be some | ||
1244 | * unsent new data, and the advertised window should allow | ||
1245 | * sending it. | ||
1246 | */ | ||
1247 | return (sysctl_tcp_frto && sk->sk_send_head && | ||
1248 | !after(TCP_SKB_CB(sk->sk_send_head)->end_seq, | ||
1249 | tp->snd_una + tp->snd_wnd)); | ||
1250 | } | ||
1251 | |||
1239 | /* RTO occurred, but do not yet enter loss state. Instead, transmit two new | 1252 | /* RTO occurred, but do not yet enter loss state. Instead, transmit two new |
1240 | * segments to see from the next ACKs whether any data was really missing. | 1253 | * segments to see from the next ACKs whether any data was really missing. |
1241 | * If the RTO was spurious, new ACKs should arrive. | 1254 | * If the RTO was spurious, new ACKs should arrive. |