aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c50
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 */
1886void 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.