blob: fa074d4420655695f98e8c83bb456739126d0b46 [file] [log] [blame]
Andrea Bittau2a91aa32006-03-20 17:41:47 -08001/*
2 * net/dccp/ccids/ccid2.c
3 *
4 * Copyright (c) 2005, 2006 Andrea Bittau <a.bittau@cs.ucl.ac.uk>
5 *
6 * Changes to meet Linux coding standards, and DCCP infrastructure fixes.
7 *
8 * Copyright (c) 2006 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25/*
Gerrit Renker0e64e942006-10-24 16:17:51 -070026 * This implementation should follow RFC 4341
Andrea Bittau2a91aa32006-03-20 17:41:47 -080027 */
Gerrit Renker86349c82008-09-04 07:30:19 +020028#include "../feat.h"
Andrea Bittau2a91aa32006-03-20 17:41:47 -080029#include "../ccid.h"
30#include "../dccp.h"
31#include "ccid2.h"
32
Gerrit Renker84116712006-11-20 18:26:03 -020033
34#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
Andrea Bittau2a91aa32006-03-20 17:41:47 -080035static int ccid2_debug;
Gerrit Renker84116712006-11-20 18:26:03 -020036#define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a)
Andrea Bittau2a91aa32006-03-20 17:41:47 -080037#else
Gerrit Renker84116712006-11-20 18:26:03 -020038#define ccid2_pr_debug(format, a...)
Andrea Bittau2a91aa32006-03-20 17:41:47 -080039#endif
40
Gerrit Renkercd1f7d32007-10-04 14:41:00 -070041static int ccid2_hc_tx_alloc_seq(struct ccid2_hc_tx_sock *hctx)
Andrea Bittau07978aa2006-09-19 13:13:37 -070042{
43 struct ccid2_seq *seqp;
44 int i;
45
46 /* check if we have space to preserve the pointer to the buffer */
Gerrit Renker1fb87502008-09-04 07:30:19 +020047 if (hctx->seqbufc >= sizeof(hctx->seqbuf) / sizeof(struct ccid2_seq *))
Andrea Bittau07978aa2006-09-19 13:13:37 -070048 return -ENOMEM;
49
50 /* allocate buffer and initialize linked list */
Gerrit Renkercd1f7d32007-10-04 14:41:00 -070051 seqp = kmalloc(CCID2_SEQBUF_LEN * sizeof(struct ccid2_seq), gfp_any());
Andrea Bittau07978aa2006-09-19 13:13:37 -070052 if (seqp == NULL)
53 return -ENOMEM;
54
Gerrit Renkercd1f7d32007-10-04 14:41:00 -070055 for (i = 0; i < (CCID2_SEQBUF_LEN - 1); i++) {
Andrea Bittau07978aa2006-09-19 13:13:37 -070056 seqp[i].ccid2s_next = &seqp[i + 1];
57 seqp[i + 1].ccid2s_prev = &seqp[i];
58 }
Gerrit Renkercd1f7d32007-10-04 14:41:00 -070059 seqp[CCID2_SEQBUF_LEN - 1].ccid2s_next = seqp;
60 seqp->ccid2s_prev = &seqp[CCID2_SEQBUF_LEN - 1];
Andrea Bittau07978aa2006-09-19 13:13:37 -070061
62 /* This is the first allocation. Initiate the head and tail. */
Gerrit Renker1fb87502008-09-04 07:30:19 +020063 if (hctx->seqbufc == 0)
64 hctx->seqh = hctx->seqt = seqp;
Andrea Bittau07978aa2006-09-19 13:13:37 -070065 else {
66 /* link the existing list with the one we just created */
Gerrit Renker1fb87502008-09-04 07:30:19 +020067 hctx->seqh->ccid2s_next = seqp;
68 seqp->ccid2s_prev = hctx->seqh;
Andrea Bittau07978aa2006-09-19 13:13:37 -070069
Gerrit Renker1fb87502008-09-04 07:30:19 +020070 hctx->seqt->ccid2s_prev = &seqp[CCID2_SEQBUF_LEN - 1];
71 seqp[CCID2_SEQBUF_LEN - 1].ccid2s_next = hctx->seqt;
Andrea Bittau07978aa2006-09-19 13:13:37 -070072 }
73
74 /* store the original pointer to the buffer so we can free it */
Gerrit Renker1fb87502008-09-04 07:30:19 +020075 hctx->seqbuf[hctx->seqbufc] = seqp;
76 hctx->seqbufc++;
Andrea Bittau07978aa2006-09-19 13:13:37 -070077
78 return 0;
79}
80
Gerrit Renker6b57c932006-11-28 19:55:06 -020081static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
Andrea Bittau2a91aa32006-03-20 17:41:47 -080082{
Gerrit Renker83337da2008-09-04 07:30:19 +020083 if (ccid2_cwnd_network_limited(ccid2_hc_tx_sk(sk)))
84 return CCID_PACKET_WILL_DEQUEUE_LATER;
85 return CCID_PACKET_SEND_AT_ONCE;
Andrea Bittau2a91aa32006-03-20 17:41:47 -080086}
87
Gerrit Renkerdf054e12007-11-24 21:32:53 -020088static void ccid2_change_l_ack_ratio(struct sock *sk, u32 val)
Andrea Bittau2a91aa32006-03-20 17:41:47 -080089{
90 struct dccp_sock *dp = dccp_sk(sk);
Gerrit Renker1fb87502008-09-04 07:30:19 +020091 u32 max_ratio = DIV_ROUND_UP(ccid2_hc_tx_sk(sk)->cwnd, 2);
Gerrit Renkerd50ad162007-11-24 21:40:24 -020092
Andrea Bittau2a91aa32006-03-20 17:41:47 -080093 /*
Gerrit Renkerd50ad162007-11-24 21:40:24 -020094 * Ensure that Ack Ratio does not exceed ceil(cwnd/2), which is (2) from
95 * RFC 4341, 6.1.2. We ignore the statement that Ack Ratio 2 is always
96 * acceptable since this causes starvation/deadlock whenever cwnd < 2.
97 * The same problem arises when Ack Ratio is 0 (ie. Ack Ratio disabled).
Andrea Bittau2a91aa32006-03-20 17:41:47 -080098 */
Gerrit Renkerd50ad162007-11-24 21:40:24 -020099 if (val == 0 || val > max_ratio) {
100 DCCP_WARN("Limiting Ack Ratio (%u) to %u\n", val, max_ratio);
101 val = max_ratio;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800102 }
Gerrit Renker86349c82008-09-04 07:30:19 +0200103 if (val > DCCPF_ACK_RATIO_MAX)
104 val = DCCPF_ACK_RATIO_MAX;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800105
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200106 if (val == dp->dccps_l_ack_ratio)
107 return;
108
Gerrit Renkerdf054e12007-11-24 21:32:53 -0200109 ccid2_pr_debug("changing local ack ratio to %u\n", val);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800110 dp->dccps_l_ack_ratio = val;
111}
112
Andrea Bittau593f16a2006-09-19 13:15:33 -0700113static void ccid2_change_srtt(struct ccid2_hc_tx_sock *hctx, long val)
114{
115 ccid2_pr_debug("change SRTT to %ld\n", val);
Gerrit Renker1fb87502008-09-04 07:30:19 +0200116 hctx->srtt = val;
Andrea Bittau593f16a2006-09-19 13:15:33 -0700117}
118
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800119static void ccid2_start_rto_timer(struct sock *sk);
120
121static void ccid2_hc_tx_rto_expire(unsigned long data)
122{
123 struct sock *sk = (struct sock *)data;
124 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
Gerrit Renker83337da2008-09-04 07:30:19 +0200125 const bool sender_was_blocked = ccid2_cwnd_network_limited(hctx);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800126 long s;
127
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800128 bh_lock_sock(sk);
129 if (sock_owned_by_user(sk)) {
Gerrit Renker1fb87502008-09-04 07:30:19 +0200130 sk_reset_timer(sk, &hctx->rtotimer, jiffies + HZ / 5);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800131 goto out;
132 }
133
134 ccid2_pr_debug("RTO_EXPIRE\n");
135
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800136 /* back-off timer */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200137 hctx->rto <<= 1;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800138
Gerrit Renker1fb87502008-09-04 07:30:19 +0200139 s = hctx->rto / HZ;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800140 if (s > 60)
Gerrit Renker1fb87502008-09-04 07:30:19 +0200141 hctx->rto = 60 * HZ;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800142
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800143 /* adjust pipe, cwnd etc */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200144 hctx->ssthresh = hctx->cwnd / 2;
145 if (hctx->ssthresh < 2)
146 hctx->ssthresh = 2;
147 hctx->cwnd = 1;
148 hctx->pipe = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800149
150 /* clear state about stuff we sent */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200151 hctx->seqt = hctx->seqh;
152 hctx->packets_acked = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800153
154 /* clear ack ratio state. */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200155 hctx->rpseq = 0;
156 hctx->rpdupack = -1;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800157 ccid2_change_l_ack_ratio(sk, 1);
Gerrit Renker83337da2008-09-04 07:30:19 +0200158
159 /* if we were blocked before, we may now send cwnd=1 packet */
160 if (sender_was_blocked)
161 tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet);
162 ccid2_start_rto_timer(sk);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800163out:
164 bh_unlock_sock(sk);
Andrea Bittau77ff72d2006-03-20 17:57:52 -0800165 sock_put(sk);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800166}
167
168static void ccid2_start_rto_timer(struct sock *sk)
169{
170 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
171
Gerrit Renker1fb87502008-09-04 07:30:19 +0200172 ccid2_pr_debug("setting RTO timeout=%ld\n", hctx->rto);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800173
Gerrit Renker1fb87502008-09-04 07:30:19 +0200174 BUG_ON(timer_pending(&hctx->rtotimer));
175 sk_reset_timer(sk, &hctx->rtotimer,
176 jiffies + hctx->rto);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800177}
178
Gerrit Renkerc506d912008-09-04 07:30:19 +0200179static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800180{
181 struct dccp_sock *dp = dccp_sk(sk);
182 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
Andrea Bittau07978aa2006-09-19 13:13:37 -0700183 struct ccid2_seq *next;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800184
Gerrit Renker1fb87502008-09-04 07:30:19 +0200185 hctx->pipe++;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800186
Gerrit Renker1fb87502008-09-04 07:30:19 +0200187 hctx->seqh->ccid2s_seq = dp->dccps_gss;
188 hctx->seqh->ccid2s_acked = 0;
189 hctx->seqh->ccid2s_sent = jiffies;
Andrea Bittau07978aa2006-09-19 13:13:37 -0700190
Gerrit Renker1fb87502008-09-04 07:30:19 +0200191 next = hctx->seqh->ccid2s_next;
Andrea Bittau07978aa2006-09-19 13:13:37 -0700192 /* check if we need to alloc more space */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200193 if (next == hctx->seqt) {
Gerrit Renker7d9e8932007-10-04 14:41:26 -0700194 if (ccid2_hc_tx_alloc_seq(hctx)) {
195 DCCP_CRIT("packet history - out of memory!");
196 /* FIXME: find a more graceful way to bail out */
197 return;
198 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200199 next = hctx->seqh->ccid2s_next;
200 BUG_ON(next == hctx->seqt);
Andrea Bittau07978aa2006-09-19 13:13:37 -0700201 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200202 hctx->seqh = next;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800203
Gerrit Renker1fb87502008-09-04 07:30:19 +0200204 ccid2_pr_debug("cwnd=%d pipe=%d\n", hctx->cwnd, hctx->pipe);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800205
Gerrit Renker900bfed2007-11-24 21:58:33 -0200206 /*
207 * FIXME: The code below is broken and the variables have been removed
208 * from the socket struct. The `ackloss' variable was always set to 0,
209 * and with arsent there are several problems:
210 * (i) it doesn't just count the number of Acks, but all sent packets;
211 * (ii) it is expressed in # of packets, not # of windows, so the
212 * comparison below uses the wrong formula: Appendix A of RFC 4341
213 * comes up with the number K = cwnd / (R^2 - R) of consecutive windows
214 * of data with no lost or marked Ack packets. If arsent were the # of
215 * consecutive Acks received without loss, then Ack Ratio needs to be
216 * decreased by 1 when
217 * arsent >= K * cwnd / R = cwnd^2 / (R^3 - R^2)
218 * where cwnd / R is the number of Acks received per window of data
219 * (cf. RFC 4341, App. A). The problems are that
220 * - arsent counts other packets as well;
221 * - the comparison uses a formula different from RFC 4341;
222 * - computing a cubic/quadratic equation each time is too complicated.
223 * Hence a different algorithm is needed.
224 */
225#if 0
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800226 /* Ack Ratio. Need to maintain a concept of how many windows we sent */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200227 hctx->arsent++;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800228 /* We had an ack loss in this window... */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200229 if (hctx->ackloss) {
230 if (hctx->arsent >= hctx->cwnd) {
231 hctx->arsent = 0;
232 hctx->ackloss = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800233 }
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800234 } else {
235 /* No acks lost up to now... */
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800236 /* decrease ack ratio if enough packets were sent */
237 if (dp->dccps_l_ack_ratio > 1) {
238 /* XXX don't calculate denominator each time */
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800239 int denom = dp->dccps_l_ack_ratio * dp->dccps_l_ack_ratio -
240 dp->dccps_l_ack_ratio;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800241
Gerrit Renker1fb87502008-09-04 07:30:19 +0200242 denom = hctx->cwnd * hctx->cwnd / denom;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800243
Gerrit Renker1fb87502008-09-04 07:30:19 +0200244 if (hctx->arsent >= denom) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800245 ccid2_change_l_ack_ratio(sk, dp->dccps_l_ack_ratio - 1);
Gerrit Renker1fb87502008-09-04 07:30:19 +0200246 hctx->arsent = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800247 }
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800248 } else {
249 /* we can't increase ack ratio further [1] */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200250 hctx->arsent = 0; /* or maybe set it to cwnd*/
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800251 }
252 }
Gerrit Renker900bfed2007-11-24 21:58:33 -0200253#endif
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800254
255 /* setup RTO timer */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200256 if (!timer_pending(&hctx->rtotimer))
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800257 ccid2_start_rto_timer(sk);
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800258
Andrea Bittau8d424f62006-09-19 13:12:44 -0700259#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800260 do {
Gerrit Renker1fb87502008-09-04 07:30:19 +0200261 struct ccid2_seq *seqp = hctx->seqt;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800262
Gerrit Renker1fb87502008-09-04 07:30:19 +0200263 while (seqp != hctx->seqh) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800264 ccid2_pr_debug("out seq=%llu acked=%d time=%lu\n",
Arnaldo Carvalho de Melo8109b022006-12-10 16:01:18 -0200265 (unsigned long long)seqp->ccid2s_seq,
Randy Dunlap234af482006-10-29 16:03:30 -0800266 seqp->ccid2s_acked, seqp->ccid2s_sent);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800267 seqp = seqp->ccid2s_next;
268 }
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800269 } while (0);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800270 ccid2_pr_debug("=========\n");
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800271#endif
272}
273
Andrea Bittau77ff72d2006-03-20 17:57:52 -0800274static void ccid2_hc_tx_kill_rto_timer(struct sock *sk)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800275{
Andrea Bittau77ff72d2006-03-20 17:57:52 -0800276 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
277
Gerrit Renker1fb87502008-09-04 07:30:19 +0200278 sk_stop_timer(sk, &hctx->rtotimer);
Andrea Bittau77ff72d2006-03-20 17:57:52 -0800279 ccid2_pr_debug("deleted RTO timer\n");
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800280}
281
282static inline void ccid2_new_ack(struct sock *sk,
YOSHIFUJI Hideakic9eaf172007-02-09 23:24:38 +0900283 struct ccid2_seq *seqp,
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800284 unsigned int *maxincr)
285{
286 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
287
Gerrit Renker1fb87502008-09-04 07:30:19 +0200288 if (hctx->cwnd < hctx->ssthresh) {
289 if (*maxincr > 0 && ++hctx->packets_acked == 2) {
290 hctx->cwnd += 1;
291 *maxincr -= 1;
292 hctx->packets_acked = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800293 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200294 } else if (++hctx->packets_acked >= hctx->cwnd) {
295 hctx->cwnd += 1;
296 hctx->packets_acked = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800297 }
298
299 /* update RTO */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200300 if (hctx->srtt == -1 ||
301 time_after(jiffies, hctx->lastrtt + hctx->srtt)) {
Andrea Bittau29651cd2006-09-19 13:06:46 -0700302 unsigned long r = (long)jiffies - (long)seqp->ccid2s_sent;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800303 int s;
304
305 /* first measurement */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200306 if (hctx->srtt == -1) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800307 ccid2_pr_debug("R: %lu Time=%lu seq=%llu\n",
Arnaldo Carvalho de Melo8109b022006-12-10 16:01:18 -0200308 r, jiffies,
Randy Dunlap234af482006-10-29 16:03:30 -0800309 (unsigned long long)seqp->ccid2s_seq);
Andrea Bittau593f16a2006-09-19 13:15:33 -0700310 ccid2_change_srtt(hctx, r);
Gerrit Renker1fb87502008-09-04 07:30:19 +0200311 hctx->rttvar = r >> 1;
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800312 } else {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800313 /* RTTVAR */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200314 long tmp = hctx->srtt - r;
Andrea Bittau593f16a2006-09-19 13:15:33 -0700315 long srtt;
316
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800317 if (tmp < 0)
318 tmp *= -1;
319
320 tmp >>= 2;
Gerrit Renker1fb87502008-09-04 07:30:19 +0200321 hctx->rttvar *= 3;
322 hctx->rttvar >>= 2;
323 hctx->rttvar += tmp;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800324
325 /* SRTT */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200326 srtt = hctx->srtt;
Andrea Bittau593f16a2006-09-19 13:15:33 -0700327 srtt *= 7;
328 srtt >>= 3;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800329 tmp = r >> 3;
Andrea Bittau593f16a2006-09-19 13:15:33 -0700330 srtt += tmp;
331 ccid2_change_srtt(hctx, srtt);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800332 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200333 s = hctx->rttvar << 2;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800334 /* clock granularity is 1 when based on jiffies */
335 if (!s)
336 s = 1;
Gerrit Renker1fb87502008-09-04 07:30:19 +0200337 hctx->rto = hctx->srtt + s;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800338
339 /* must be at least a second */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200340 s = hctx->rto / HZ;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800341 /* DCCP doesn't require this [but I like it cuz my code sux] */
342#if 1
343 if (s < 1)
Gerrit Renker1fb87502008-09-04 07:30:19 +0200344 hctx->rto = HZ;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800345#endif
346 /* max 60 seconds */
347 if (s > 60)
Gerrit Renker1fb87502008-09-04 07:30:19 +0200348 hctx->rto = HZ * 60;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800349
Gerrit Renker1fb87502008-09-04 07:30:19 +0200350 hctx->lastrtt = jiffies;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800351
352 ccid2_pr_debug("srtt: %ld rttvar: %ld rto: %ld (HZ=%d) R=%lu\n",
Gerrit Renker1fb87502008-09-04 07:30:19 +0200353 hctx->srtt, hctx->rttvar,
354 hctx->rto, HZ, r);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800355 }
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800356}
357
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200358static void ccid2_congestion_event(struct sock *sk, struct ccid2_seq *seqp)
Andrea Bittau374bcf32006-09-19 13:14:43 -0700359{
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200360 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
361
Gerrit Renker1fb87502008-09-04 07:30:19 +0200362 if (time_before(seqp->ccid2s_sent, hctx->last_cong)) {
Andrea Bittau374bcf32006-09-19 13:14:43 -0700363 ccid2_pr_debug("Multiple losses in an RTT---treating as one\n");
364 return;
365 }
366
Gerrit Renker1fb87502008-09-04 07:30:19 +0200367 hctx->last_cong = jiffies;
Andrea Bittau374bcf32006-09-19 13:14:43 -0700368
Gerrit Renker1fb87502008-09-04 07:30:19 +0200369 hctx->cwnd = hctx->cwnd / 2 ? : 1U;
370 hctx->ssthresh = max(hctx->cwnd, 2U);
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200371
372 /* Avoid spurious timeouts resulting from Ack Ratio > cwnd */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200373 if (dccp_sk(sk)->dccps_l_ack_ratio > hctx->cwnd)
374 ccid2_change_l_ack_ratio(sk, hctx->cwnd);
Andrea Bittau374bcf32006-09-19 13:14:43 -0700375}
376
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200377static int ccid2_hc_tx_parse_options(struct sock *sk, u8 packet_type,
378 u8 option, u8 *optval, u8 optlen)
379{
380 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
381
382 switch (option) {
383 case DCCPO_ACK_VECTOR_0:
384 case DCCPO_ACK_VECTOR_1:
385 return dccp_ackvec_parsed_add(&hctx->av_chunks, optval, optlen,
386 option - DCCPO_ACK_VECTOR_0);
387 }
388 return 0;
389}
390
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800391static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
392{
393 struct dccp_sock *dp = dccp_sk(sk);
394 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
Gerrit Renker83337da2008-09-04 07:30:19 +0200395 const bool sender_was_blocked = ccid2_cwnd_network_limited(hctx);
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200396 struct dccp_ackvec_parsed *avp;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800397 u64 ackno, seqno;
398 struct ccid2_seq *seqp;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800399 int done = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800400 unsigned int maxincr = 0;
401
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800402 /* check reverse path congestion */
403 seqno = DCCP_SKB_CB(skb)->dccpd_seq;
404
405 /* XXX this whole "algorithm" is broken. Need to fix it to keep track
406 * of the seqnos of the dupacks so that rpseq and rpdupack are correct
407 * -sorbo.
408 */
409 /* need to bootstrap */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200410 if (hctx->rpdupack == -1) {
411 hctx->rpdupack = 0;
412 hctx->rpseq = seqno;
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800413 } else {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800414 /* check if packet is consecutive */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200415 if (dccp_delta_seqno(hctx->rpseq, seqno) == 1)
416 hctx->rpseq = seqno;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800417 /* it's a later packet */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200418 else if (after48(seqno, hctx->rpseq)) {
419 hctx->rpdupack++;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800420
421 /* check if we got enough dupacks */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200422 if (hctx->rpdupack >= NUMDUPACK) {
423 hctx->rpdupack = -1; /* XXX lame */
424 hctx->rpseq = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800425
Gerrit Renkerdf054e12007-11-24 21:32:53 -0200426 ccid2_change_l_ack_ratio(sk, 2 * dp->dccps_l_ack_ratio);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800427 }
428 }
429 }
430
431 /* check forward path congestion */
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200432 if (dccp_packet_without_ack(skb))
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800433 return;
434
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200435 /* still didn't send out new data packets */
436 if (hctx->seqh == hctx->seqt)
437 goto done;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800438
439 ackno = DCCP_SKB_CB(skb)->dccpd_ack_seq;
Gerrit Renker1fb87502008-09-04 07:30:19 +0200440 if (after48(ackno, hctx->high_ack))
441 hctx->high_ack = ackno;
Andrea Bittau32aac182006-11-16 14:28:40 -0200442
Gerrit Renker1fb87502008-09-04 07:30:19 +0200443 seqp = hctx->seqt;
Andrea Bittau32aac182006-11-16 14:28:40 -0200444 while (before48(seqp->ccid2s_seq, ackno)) {
445 seqp = seqp->ccid2s_next;
Gerrit Renker1fb87502008-09-04 07:30:19 +0200446 if (seqp == hctx->seqh) {
447 seqp = hctx->seqh->ccid2s_prev;
Andrea Bittau32aac182006-11-16 14:28:40 -0200448 break;
449 }
450 }
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800451
Gerrit Renkera3020022007-11-24 22:10:29 -0200452 /*
453 * In slow-start, cwnd can increase up to a maximum of Ack Ratio/2
454 * packets per acknowledgement. Rounding up avoids that cwnd is not
455 * advanced when Ack Ratio is 1 and gives a slight edge otherwise.
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800456 */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200457 if (hctx->cwnd < hctx->ssthresh)
Gerrit Renkera3020022007-11-24 22:10:29 -0200458 maxincr = DIV_ROUND_UP(dp->dccps_l_ack_ratio, 2);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800459
460 /* go through all ack vectors */
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200461 list_for_each_entry(avp, &hctx->av_chunks, node) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800462 /* go through this ack vector */
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200463 for (; avp->len--; avp->vec++) {
464 u64 ackno_end_rl = SUB48(ackno,
465 dccp_ackvec_runlen(avp->vec));
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800466
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200467 ccid2_pr_debug("ackvec %llu |%u,%u|\n",
Randy Dunlap234af482006-10-29 16:03:30 -0800468 (unsigned long long)ackno,
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200469 dccp_ackvec_state(avp->vec) >> 6,
470 dccp_ackvec_runlen(avp->vec));
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800471 /* if the seqno we are analyzing is larger than the
472 * current ackno, then move towards the tail of our
473 * seqnos.
474 */
475 while (after48(seqp->ccid2s_seq, ackno)) {
Gerrit Renker1fb87502008-09-04 07:30:19 +0200476 if (seqp == hctx->seqt) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800477 done = 1;
478 break;
479 }
480 seqp = seqp->ccid2s_prev;
481 }
482 if (done)
483 break;
484
485 /* check all seqnos in the range of the vector
486 * run length
487 */
488 while (between48(seqp->ccid2s_seq,ackno_end_rl,ackno)) {
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200489 const u8 state = dccp_ackvec_state(avp->vec);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800490
491 /* new packet received or marked */
Gerrit Renkerff49e272008-09-04 07:30:19 +0200492 if (state != DCCPAV_NOT_RECEIVED &&
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800493 !seqp->ccid2s_acked) {
Gerrit Renkerff49e272008-09-04 07:30:19 +0200494 if (state == DCCPAV_ECN_MARKED)
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200495 ccid2_congestion_event(sk,
Andrea Bittau374bcf32006-09-19 13:14:43 -0700496 seqp);
Gerrit Renkerff49e272008-09-04 07:30:19 +0200497 else
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800498 ccid2_new_ack(sk, seqp,
499 &maxincr);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800500
501 seqp->ccid2s_acked = 1;
502 ccid2_pr_debug("Got ack for %llu\n",
Randy Dunlap234af482006-10-29 16:03:30 -0800503 (unsigned long long)seqp->ccid2s_seq);
Gerrit Renkere9803c02008-09-04 07:30:19 +0200504 hctx->pipe--;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800505 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200506 if (seqp == hctx->seqt) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800507 done = 1;
508 break;
509 }
Gerrit Renker3de54892007-11-24 20:37:48 -0200510 seqp = seqp->ccid2s_prev;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800511 }
512 if (done)
513 break;
514
Gerrit Renkercfbbeab2007-11-24 20:43:59 -0200515 ackno = SUB48(ackno_end_rl, 1);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800516 }
517 if (done)
518 break;
519 }
520
521 /* The state about what is acked should be correct now
522 * Check for NUMDUPACK
523 */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200524 seqp = hctx->seqt;
525 while (before48(seqp->ccid2s_seq, hctx->high_ack)) {
Andrea Bittau32aac182006-11-16 14:28:40 -0200526 seqp = seqp->ccid2s_next;
Gerrit Renker1fb87502008-09-04 07:30:19 +0200527 if (seqp == hctx->seqh) {
528 seqp = hctx->seqh->ccid2s_prev;
Andrea Bittau32aac182006-11-16 14:28:40 -0200529 break;
530 }
531 }
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800532 done = 0;
533 while (1) {
534 if (seqp->ccid2s_acked) {
535 done++;
Gerrit Renker63df18a2007-11-24 22:04:35 -0200536 if (done == NUMDUPACK)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800537 break;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800538 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200539 if (seqp == hctx->seqt)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800540 break;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800541 seqp = seqp->ccid2s_prev;
542 }
543
544 /* If there are at least 3 acknowledgements, anything unacknowledged
545 * below the last sequence number is considered lost
546 */
Gerrit Renker63df18a2007-11-24 22:04:35 -0200547 if (done == NUMDUPACK) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800548 struct ccid2_seq *last_acked = seqp;
549
550 /* check for lost packets */
551 while (1) {
552 if (!seqp->ccid2s_acked) {
Andrea Bittau374bcf32006-09-19 13:14:43 -0700553 ccid2_pr_debug("Packet lost: %llu\n",
Randy Dunlap234af482006-10-29 16:03:30 -0800554 (unsigned long long)seqp->ccid2s_seq);
Andrea Bittau374bcf32006-09-19 13:14:43 -0700555 /* XXX need to traverse from tail -> head in
556 * order to detect multiple congestion events in
557 * one ack vector.
558 */
Gerrit Renkerd50ad162007-11-24 21:40:24 -0200559 ccid2_congestion_event(sk, seqp);
Gerrit Renkere9803c02008-09-04 07:30:19 +0200560 hctx->pipe--;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800561 }
Gerrit Renker1fb87502008-09-04 07:30:19 +0200562 if (seqp == hctx->seqt)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800563 break;
564 seqp = seqp->ccid2s_prev;
565 }
566
Gerrit Renker1fb87502008-09-04 07:30:19 +0200567 hctx->seqt = last_acked;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800568 }
569
570 /* trim acked packets in tail */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200571 while (hctx->seqt != hctx->seqh) {
572 if (!hctx->seqt->ccid2s_acked)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800573 break;
574
Gerrit Renker1fb87502008-09-04 07:30:19 +0200575 hctx->seqt = hctx->seqt->ccid2s_next;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800576 }
577
Gerrit Renkere9803c02008-09-04 07:30:19 +0200578 /* restart RTO timer if not all outstanding data has been acked */
579 if (hctx->pipe == 0)
580 sk_stop_timer(sk, &hctx->rtotimer);
581 else
582 sk_reset_timer(sk, &hctx->rtotimer,
583 jiffies + hctx->rto);
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200584done:
Gerrit Renker83337da2008-09-04 07:30:19 +0200585 /* check if incoming Acks allow pending packets to be sent */
586 if (sender_was_blocked && !ccid2_cwnd_network_limited(hctx))
587 tasklet_schedule(&dccp_sk(sk)->dccps_xmitlet);
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200588 dccp_ackvec_parsed_cleanup(&hctx->av_chunks);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800589}
590
Arnaldo Carvalho de Melo91f0ebf2006-03-20 19:21:44 -0800591static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800592{
YOSHIFUJI Hideakic9eaf172007-02-09 23:24:38 +0900593 struct ccid2_hc_tx_sock *hctx = ccid_priv(ccid);
Gerrit Renkerb00d2bb2007-11-24 21:44:30 -0200594 struct dccp_sock *dp = dccp_sk(sk);
595 u32 max_ratio;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800596
Gerrit Renkerb00d2bb2007-11-24 21:44:30 -0200597 /* RFC 4341, 5: initialise ssthresh to arbitrarily high (max) value */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200598 hctx->ssthresh = ~0U;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800599
Gerrit Renkerb00d2bb2007-11-24 21:44:30 -0200600 /*
601 * RFC 4341, 5: "The cwnd parameter is initialized to at most four
602 * packets for new connections, following the rules from [RFC3390]".
603 * We need to convert the bytes of RFC3390 into the packets of RFC 4341.
604 */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200605 hctx->cwnd = clamp(4380U / dp->dccps_mss_cache, 2U, 4U);
Gerrit Renkerb00d2bb2007-11-24 21:44:30 -0200606
607 /* Make sure that Ack Ratio is enabled and within bounds. */
Gerrit Renker1fb87502008-09-04 07:30:19 +0200608 max_ratio = DIV_ROUND_UP(hctx->cwnd, 2);
Gerrit Renkerb00d2bb2007-11-24 21:44:30 -0200609 if (dp->dccps_l_ack_ratio == 0 || dp->dccps_l_ack_ratio > max_ratio)
610 dp->dccps_l_ack_ratio = max_ratio;
611
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800612 /* XXX init ~ to window size... */
Gerrit Renkercd1f7d32007-10-04 14:41:00 -0700613 if (ccid2_hc_tx_alloc_seq(hctx))
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800614 return -ENOMEM;
Arnaldo Carvalho de Melo91f0ebf2006-03-20 19:21:44 -0800615
Gerrit Renker1fb87502008-09-04 07:30:19 +0200616 hctx->rto = 3 * HZ;
Andrea Bittau593f16a2006-09-19 13:15:33 -0700617 ccid2_change_srtt(hctx, -1);
Gerrit Renker1fb87502008-09-04 07:30:19 +0200618 hctx->rttvar = -1;
619 hctx->rpdupack = -1;
620 hctx->last_cong = jiffies;
621 setup_timer(&hctx->rtotimer, ccid2_hc_tx_rto_expire, (unsigned long)sk);
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200622 INIT_LIST_HEAD(&hctx->av_chunks);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800623 return 0;
624}
625
626static void ccid2_hc_tx_exit(struct sock *sk)
627{
YOSHIFUJI Hideakic9eaf172007-02-09 23:24:38 +0900628 struct ccid2_hc_tx_sock *hctx = ccid2_hc_tx_sk(sk);
Andrea Bittau07978aa2006-09-19 13:13:37 -0700629 int i;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800630
Andrea Bittau77ff72d2006-03-20 17:57:52 -0800631 ccid2_hc_tx_kill_rto_timer(sk);
Andrea Bittau07978aa2006-09-19 13:13:37 -0700632
Gerrit Renker1fb87502008-09-04 07:30:19 +0200633 for (i = 0; i < hctx->seqbufc; i++)
634 kfree(hctx->seqbuf[i]);
635 hctx->seqbufc = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800636}
637
638static void ccid2_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
639{
640 const struct dccp_sock *dp = dccp_sk(sk);
641 struct ccid2_hc_rx_sock *hcrx = ccid2_hc_rx_sk(sk);
642
643 switch (DCCP_SKB_CB(skb)->dccpd_type) {
644 case DCCP_PKT_DATA:
645 case DCCP_PKT_DATAACK:
Gerrit Renker1fb87502008-09-04 07:30:19 +0200646 hcrx->data++;
647 if (hcrx->data >= dp->dccps_r_ack_ratio) {
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800648 dccp_send_ack(sk);
Gerrit Renker1fb87502008-09-04 07:30:19 +0200649 hcrx->data = 0;
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800650 }
651 break;
652 }
653}
654
Arnaldo Carvalho de Melo91f0ebf2006-03-20 19:21:44 -0800655static struct ccid_operations ccid2 = {
Gerrit Renkerc8bf4622008-09-04 07:30:19 +0200656 .ccid_id = DCCPC_CCID2,
657 .ccid_name = "TCP-like",
658 .ccid_owner = THIS_MODULE,
659 .ccid_hc_tx_obj_size = sizeof(struct ccid2_hc_tx_sock),
660 .ccid_hc_tx_init = ccid2_hc_tx_init,
661 .ccid_hc_tx_exit = ccid2_hc_tx_exit,
662 .ccid_hc_tx_send_packet = ccid2_hc_tx_send_packet,
663 .ccid_hc_tx_packet_sent = ccid2_hc_tx_packet_sent,
664 .ccid_hc_tx_parse_options = ccid2_hc_tx_parse_options,
665 .ccid_hc_tx_packet_recv = ccid2_hc_tx_packet_recv,
666 .ccid_hc_rx_obj_size = sizeof(struct ccid2_hc_rx_sock),
667 .ccid_hc_rx_packet_recv = ccid2_hc_rx_packet_recv,
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800668};
669
Gerrit Renker84116712006-11-20 18:26:03 -0200670#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
Gerrit Renker43264992008-08-23 13:28:27 +0200671module_param(ccid2_debug, bool, 0644);
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800672MODULE_PARM_DESC(ccid2_debug, "Enable debug messages");
Gerrit Renker84116712006-11-20 18:26:03 -0200673#endif
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800674
675static __init int ccid2_module_init(void)
676{
677 return ccid_register(&ccid2);
678}
679module_init(ccid2_module_init);
680
681static __exit void ccid2_module_exit(void)
682{
683 ccid_unregister(&ccid2);
684}
685module_exit(ccid2_module_exit);
686
687MODULE_AUTHOR("Andrea Bittau <a.bittau@cs.ucl.ac.uk>");
Arnaldo Carvalho de Meloc0c736d2006-03-20 22:05:37 -0800688MODULE_DESCRIPTION("DCCP TCP-Like (CCID2) CCID");
Andrea Bittau2a91aa32006-03-20 17:41:47 -0800689MODULE_LICENSE("GPL");
690MODULE_ALIAS("net-dccp-ccid-2");