diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-11-25 00:11:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 00:11:55 -0500 |
commit | e1aa680fa40e7492260a09cb57d94002245cc8fe (patch) | |
tree | 67afc8d71c9de6f76036942cd442d628ae26a4f3 /net/ipv4/tcp_output.c | |
parent | 4a17fc3add594fcc1c778e93a95b6ecf47f630e5 (diff) |
tcp: move tcp_simple_retransmit to tcp_input
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 86ef98975e94..c069ecb81ea5 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1879,56 +1879,6 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to, | |||
1879 | } | 1879 | } |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | /* Do a simple retransmit without using the backoff mechanisms in | ||
1883 | * tcp_timer. This is used for path mtu discovery. | ||
1884 | * The socket is already locked here. | ||
1885 | */ | ||
1886 | void tcp_simple_retransmit(struct sock *sk) | ||
1887 | { | ||
1888 | const struct inet_connection_sock *icsk = inet_csk(sk); | ||
1889 | struct tcp_sock *tp = tcp_sk(sk); | ||
1890 | struct sk_buff *skb; | ||
1891 | unsigned int mss = tcp_current_mss(sk, 0); | ||
1892 | u32 prior_lost = tp->lost_out; | ||
1893 | |||
1894 | tcp_for_write_queue(skb, sk) { | ||
1895 | if (skb == tcp_send_head(sk)) | ||
1896 | break; | ||
1897 | if (skb->len > mss && | ||
1898 | !(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) { | ||
1899 | if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS) { | ||
1900 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; | ||
1901 | tp->retrans_out -= tcp_skb_pcount(skb); | ||
1902 | } | ||
1903 | tcp_skb_mark_lost_uncond_verify(tp, skb); | ||
1904 | } | ||
1905 | } | ||
1906 | |||
1907 | tcp_clear_retrans_hints_partial(tp); | ||
1908 | |||
1909 | if (prior_lost == tp->lost_out) | ||
1910 | return; | ||
1911 | |||
1912 | if (tcp_is_reno(tp)) | ||
1913 | tcp_limit_reno_sacked(tp); | ||
1914 | |||
1915 | tcp_verify_left_out(tp); | ||
1916 | |||
1917 | /* Don't muck with the congestion window here. | ||
1918 | * Reason is that we do not increase amount of _data_ | ||
1919 | * in network, but units changed and effective | ||
1920 | * cwnd/ssthresh really reduced now. | ||
1921 | */ | ||
1922 | if (icsk->icsk_ca_state != TCP_CA_Loss) { | ||
1923 | tp->high_seq = tp->snd_nxt; | ||
1924 | tp->snd_ssthresh = tcp_current_ssthresh(sk); | ||
1925 | tp->prior_ssthresh = 0; | ||
1926 | tp->undo_marker = 0; | ||
1927 | tcp_set_ca_state(sk, TCP_CA_Loss); | ||
1928 | } | ||
1929 | tcp_xmit_retransmit_queue(sk); | ||
1930 | } | ||
1931 | |||
1932 | /* This retransmits one SKB. Policy decisions and retransmit queue | 1882 | /* This retransmits one SKB. Policy decisions and retransmit queue |
1933 | * state updates are done by the caller. Returns non-zero if an | 1883 | * state updates are done by the caller. Returns non-zero if an |
1934 | * error occurred which prevented the send. | 1884 | * error occurred which prevented the send. |