aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:11:08 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:49:14 -0400
commit3f421baa4720b708022f8bcc52a61e5cd6f10bf8 (patch)
treee4201b1e2356cea8b7bd8d68dfba06e84002a77d /net/ipv4/tcp_output.c
parent463c84b97f24010a67cd871746d6a7e4c925a5f9 (diff)
[NET]: Just move the inet_connection_sock function from tcp sources
Completing the previous changeset, this also generalises tcp_v4_synq_add, renaming it to inet_csk_reqsk_queue_hash_add, already geing used in the DCCP tree, which I plan to merge RSN. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 6f0a7e30ceac..f458eacb5ef2 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1493,7 +1493,8 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
1493 if (skb == 1493 if (skb ==
1494 skb_peek(&sk->sk_write_queue)) 1494 skb_peek(&sk->sk_write_queue))
1495 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, 1495 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
1496 inet_csk(sk)->icsk_rto); 1496 inet_csk(sk)->icsk_rto,
1497 TCP_RTO_MAX);
1497 } 1498 }
1498 1499
1499 packet_cnt -= tcp_skb_pcount(skb); 1500 packet_cnt -= tcp_skb_pcount(skb);
@@ -1546,7 +1547,9 @@ void tcp_xmit_retransmit_queue(struct sock *sk)
1546 break; 1547 break;
1547 1548
1548 if (skb == skb_peek(&sk->sk_write_queue)) 1549 if (skb == skb_peek(&sk->sk_write_queue))
1549 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, inet_csk(sk)->icsk_rto); 1550 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
1551 inet_csk(sk)->icsk_rto,
1552 TCP_RTO_MAX);
1550 1553
1551 NET_INC_STATS_BH(LINUX_MIB_TCPFORWARDRETRANS); 1554 NET_INC_STATS_BH(LINUX_MIB_TCPFORWARDRETRANS);
1552 } 1555 }
@@ -1826,7 +1829,8 @@ int tcp_connect(struct sock *sk)
1826 TCP_INC_STATS(TCP_MIB_ACTIVEOPENS); 1829 TCP_INC_STATS(TCP_MIB_ACTIVEOPENS);
1827 1830
1828 /* Timer for repeating the SYN until an answer. */ 1831 /* Timer for repeating the SYN until an answer. */
1829 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, inet_csk(sk)->icsk_rto); 1832 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
1833 inet_csk(sk)->icsk_rto, TCP_RTO_MAX);
1830 return 0; 1834 return 0;
1831} 1835}
1832 1836
@@ -1901,7 +1905,8 @@ void tcp_send_ack(struct sock *sk)
1901 if (buff == NULL) { 1905 if (buff == NULL) {
1902 inet_csk_schedule_ack(sk); 1906 inet_csk_schedule_ack(sk);
1903 inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN; 1907 inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN;
1904 inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK, TCP_DELACK_MAX); 1908 inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
1909 TCP_DELACK_MAX, TCP_RTO_MAX);
1905 return; 1910 return;
1906 } 1911 }
1907 1912
@@ -2033,7 +2038,8 @@ void tcp_send_probe0(struct sock *sk)
2033 icsk->icsk_backoff++; 2038 icsk->icsk_backoff++;
2034 tp->probes_out++; 2039 tp->probes_out++;
2035 inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0, 2040 inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0,
2036 min(icsk->icsk_rto << icsk->icsk_backoff, TCP_RTO_MAX)); 2041 min(icsk->icsk_rto << icsk->icsk_backoff, TCP_RTO_MAX),
2042 TCP_RTO_MAX);
2037 } else { 2043 } else {
2038 /* If packet was not sent due to local congestion, 2044 /* If packet was not sent due to local congestion,
2039 * do not backoff and do not remember probes_out. 2045 * do not backoff and do not remember probes_out.
@@ -2045,7 +2051,8 @@ void tcp_send_probe0(struct sock *sk)
2045 tp->probes_out=1; 2051 tp->probes_out=1;
2046 inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0, 2052 inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0,
2047 min(icsk->icsk_rto << icsk->icsk_backoff, 2053 min(icsk->icsk_rto << icsk->icsk_backoff,
2048 TCP_RESOURCE_PROBE_INTERVAL)); 2054 TCP_RESOURCE_PROBE_INTERVAL),
2055 TCP_RTO_MAX);
2049 } 2056 }
2050} 2057}
2051 2058