timer.c (7a9787e1eba95a166265e6a260cf30af04ef0a99) timer.c (f74e91b6cca5889e667193c7e794186db73c2000)
1/*
2 * net/dccp/timer.c
3 *
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 73 unchanged lines hidden (view full) ---

82
83/*
84 * The DCCP retransmit timer.
85 */
86static void dccp_retransmit_timer(struct sock *sk)
87{
88 struct inet_connection_sock *icsk = inet_csk(sk);
89
1/*
2 * net/dccp/timer.c
3 *
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 73 unchanged lines hidden (view full) ---

82
83/*
84 * The DCCP retransmit timer.
85 */
86static void dccp_retransmit_timer(struct sock *sk)
87{
88 struct inet_connection_sock *icsk = inet_csk(sk);
89
90 /* retransmit timer is used for feature negotiation throughout
91 * connection. In this case, no packet is re-transmitted, but rather an
92 * ack is generated and pending changes are placed into its options.
93 */
94 if (sk->sk_send_head == NULL) {
95 dccp_pr_debug("feat negotiation retransmit timeout %p\n", sk);
96 if (sk->sk_state == DCCP_OPEN)
97 dccp_send_ack(sk);
98 goto backoff;
99 }
100
101 /*
102 * More than than 4MSL (8 minutes) has passed, a RESET(aborted) was
103 * sent, no need to retransmit, this sock is dead.
104 */
105 if (dccp_write_timeout(sk))
106 return;
107
108 /*

--- 12 unchanged lines hidden (view full) ---

121 icsk->icsk_retransmits = 1;
122 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
123 min(icsk->icsk_rto,
124 TCP_RESOURCE_PROBE_INTERVAL),
125 DCCP_RTO_MAX);
126 return;
127 }
128
90 /*
91 * More than than 4MSL (8 minutes) has passed, a RESET(aborted) was
92 * sent, no need to retransmit, this sock is dead.
93 */
94 if (dccp_write_timeout(sk))
95 return;
96
97 /*

--- 12 unchanged lines hidden (view full) ---

110 icsk->icsk_retransmits = 1;
111 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
112 min(icsk->icsk_rto,
113 TCP_RESOURCE_PROBE_INTERVAL),
114 DCCP_RTO_MAX);
115 return;
116 }
117
129backoff:
130 icsk->icsk_backoff++;
131
132 icsk->icsk_rto = min(icsk->icsk_rto << 1, DCCP_RTO_MAX);
133 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto,
134 DCCP_RTO_MAX);
135 if (icsk->icsk_retransmits > sysctl_dccp_retries1)
136 __sk_dst_reset(sk);
137}

--- 164 unchanged lines hidden ---
118 icsk->icsk_backoff++;
119
120 icsk->icsk_rto = min(icsk->icsk_rto << 1, DCCP_RTO_MAX);
121 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, icsk->icsk_rto,
122 DCCP_RTO_MAX);
123 if (icsk->icsk_retransmits > sysctl_dccp_retries1)
124 __sk_dst_reset(sk);
125}

--- 164 unchanged lines hidden ---