blob: 39980d1f53523d9a39e55f21fbb3b0f4f15dd856 [file] [log] [blame]
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -03001/*
2 * net/dccp/ccids/lib/loss_interval.c
3 *
Gerrit Renker8a9c7e92007-12-12 13:50:51 -02004 * Copyright (c) 2007 The University of Aberdeen, Scotland, UK
Ian McDonaldb2f41ff2007-05-28 12:23:29 -03005 * Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand.
6 * Copyright (c) 2005-7 Ian McDonald <ian.mcdonald@jandi.co.nz>
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -03007 * Copyright (c) 2005 Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
Ian McDonald66a377c2006-08-26 23:40:50 -070014#include <net/sock.h>
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -030015#include "tfrc.h"
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -030016
Arnaldo Carvalho de Melodd36a9a2007-05-28 18:56:44 -030017#define DCCP_LI_HIST_IVAL_F_LENGTH 8
18
19struct dccp_li_hist_entry {
20 struct list_head dccplih_node;
21 u64 dccplih_seqno:48,
22 dccplih_win_count:4;
23 u32 dccplih_interval;
24};
25
Gerrit Renker8a9c7e92007-12-12 13:50:51 -020026static struct kmem_cache *tfrc_lh_slab __read_mostly;
27/* Loss Interval weights from [RFC 3448, 5.4], scaled by 10 */
28static const int tfrc_lh_weights[NINTERVAL] = { 10, 10, 10, 10, 8, 6, 4, 2 };
29
30/* implements LIFO semantics on the array */
31static inline u8 LIH_INDEX(const u8 ctr)
32{
33 return (LIH_SIZE - 1 - (ctr % LIH_SIZE));
34}
35
36/* the `counter' index always points at the next entry to be populated */
37static inline struct tfrc_loss_interval *tfrc_lh_peek(struct tfrc_loss_hist *lh)
38{
39 return lh->counter ? lh->ring[LIH_INDEX(lh->counter - 1)] : NULL;
40}
41
42/* given i with 0 <= i <= k, return I_i as per the rfc3448bis notation */
43static inline u32 tfrc_lh_get_interval(struct tfrc_loss_hist *lh, const u8 i)
44{
45 BUG_ON(i >= lh->counter);
46 return lh->ring[LIH_INDEX(lh->counter - i - 1)]->li_length;
47}
48
49/*
50 * On-demand allocation and de-allocation of entries
51 */
52static struct tfrc_loss_interval *tfrc_lh_demand_next(struct tfrc_loss_hist *lh)
53{
54 if (lh->ring[LIH_INDEX(lh->counter)] == NULL)
55 lh->ring[LIH_INDEX(lh->counter)] = kmem_cache_alloc(tfrc_lh_slab,
56 GFP_ATOMIC);
57 return lh->ring[LIH_INDEX(lh->counter)];
58}
59
60void tfrc_lh_cleanup(struct tfrc_loss_hist *lh)
61{
62 if (!tfrc_lh_is_initialised(lh))
63 return;
64
65 for (lh->counter = 0; lh->counter < LIH_SIZE; lh->counter++)
66 if (lh->ring[LIH_INDEX(lh->counter)] != NULL) {
67 kmem_cache_free(tfrc_lh_slab,
68 lh->ring[LIH_INDEX(lh->counter)]);
69 lh->ring[LIH_INDEX(lh->counter)] = NULL;
70 }
71}
72EXPORT_SYMBOL_GPL(tfrc_lh_cleanup);
73
Adrian Bunk4fda25a2007-07-09 13:18:57 -070074static struct kmem_cache *dccp_li_cachep __read_mostly;
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030075
76static inline struct dccp_li_hist_entry *dccp_li_hist_entry_new(const gfp_t prio)
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -030077{
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030078 return kmem_cache_alloc(dccp_li_cachep, prio);
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -030079}
80
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030081static inline void dccp_li_hist_entry_delete(struct dccp_li_hist_entry *entry)
Arnaldo Carvalho de Meloc70b7292007-05-28 18:25:12 -030082{
83 if (entry != NULL)
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030084 kmem_cache_free(dccp_li_cachep, entry);
Arnaldo Carvalho de Meloc70b7292007-05-28 18:25:12 -030085}
86
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030087void dccp_li_hist_purge(struct list_head *list)
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -030088{
89 struct dccp_li_hist_entry *entry, *next;
90
91 list_for_each_entry_safe(entry, next, list, dccplih_node) {
92 list_del_init(&entry->dccplih_node);
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -030093 kmem_cache_free(dccp_li_cachep, entry);
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -030094 }
95}
96
97EXPORT_SYMBOL_GPL(dccp_li_hist_purge);
98
99/* Weights used to calculate loss event rate */
100/*
101 * These are integers as per section 8 of RFC3448. We can then divide by 4 *
102 * when we use it.
103 */
104static const int dccp_li_hist_w[DCCP_LI_HIST_IVAL_F_LENGTH] = {
105 4, 4, 4, 4, 3, 2, 1, 1,
106};
107
108u32 dccp_li_hist_calc_i_mean(struct list_head *list)
109{
110 struct dccp_li_hist_entry *li_entry, *li_next;
111 int i = 0;
112 u32 i_tot;
113 u32 i_tot0 = 0;
114 u32 i_tot1 = 0;
115 u32 w_tot = 0;
116
117 list_for_each_entry_safe(li_entry, li_next, list, dccplih_node) {
Ian McDonald551dc5f2007-03-20 14:46:52 -0300118 if (li_entry->dccplih_interval != ~0U) {
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300119 i_tot0 += li_entry->dccplih_interval * dccp_li_hist_w[i];
120 w_tot += dccp_li_hist_w[i];
Ian McDonald66a377c2006-08-26 23:40:50 -0700121 if (i != 0)
122 i_tot1 += li_entry->dccplih_interval * dccp_li_hist_w[i - 1];
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300123 }
124
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300125
126 if (++i > DCCP_LI_HIST_IVAL_F_LENGTH)
127 break;
128 }
129
130 if (i != DCCP_LI_HIST_IVAL_F_LENGTH)
131 return 0;
132
133 i_tot = max(i_tot0, i_tot1);
134
Ian McDonald66a377c2006-08-26 23:40:50 -0700135 if (!w_tot) {
Gerrit Renker59348b12006-11-20 18:39:23 -0200136 DCCP_WARN("w_tot = 0\n");
Ian McDonald66a377c2006-08-26 23:40:50 -0700137 return 1;
138 }
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300139
Ian McDonald66a377c2006-08-26 23:40:50 -0700140 return i_tot / w_tot;
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300141}
142
143EXPORT_SYMBOL_GPL(dccp_li_hist_calc_i_mean);
144
Gerrit Renker8a9c7e92007-12-12 13:50:51 -0200145static void tfrc_lh_calc_i_mean(struct tfrc_loss_hist *lh)
146{
147 u32 i_i, i_tot0 = 0, i_tot1 = 0, w_tot = 0;
148 int i, k = tfrc_lh_length(lh) - 1; /* k is as in rfc3448bis, 5.4 */
149
150 for (i=0; i <= k; i++) {
151 i_i = tfrc_lh_get_interval(lh, i);
152
153 if (i < k) {
154 i_tot0 += i_i * tfrc_lh_weights[i];
155 w_tot += tfrc_lh_weights[i];
156 }
157 if (i > 0)
158 i_tot1 += i_i * tfrc_lh_weights[i-1];
159 }
160
161 BUG_ON(w_tot == 0);
162 lh->i_mean = max(i_tot0, i_tot1) / w_tot;
163}
164
165/**
166 * tfrc_lh_update_i_mean - Update the `open' loss interval I_0
167 * For recomputing p: returns `true' if p > p_prev <=> 1/p < 1/p_prev
168 */
169u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *skb)
170{
171 struct tfrc_loss_interval *cur = tfrc_lh_peek(lh);
172 u32 old_i_mean = lh->i_mean;
173 s64 length;
174
175 if (cur == NULL) /* not initialised */
176 return 0;
177
178 length = dccp_delta_seqno(cur->li_seqno, DCCP_SKB_CB(skb)->dccpd_seq);
179
180 if (length - cur->li_length <= 0) /* duplicate or reordered */
181 return 0;
182
183 if (SUB16(dccp_hdr(skb)->dccph_ccval, cur->li_ccval) > 4)
184 /*
185 * Implements RFC 4342, 10.2:
186 * If a packet S (skb) exists whose seqno comes `after' the one
187 * starting the current loss interval (cur) and if the modulo-16
188 * distance from C(cur) to C(S) is greater than 4, consider all
189 * subsequent packets as belonging to a new loss interval. This
190 * test is necessary since CCVal may wrap between intervals.
191 */
192 cur->li_is_closed = 1;
193
194 if (tfrc_lh_length(lh) == 1) /* due to RFC 3448, 6.3.1 */
195 return 0;
196
197 cur->li_length = length;
198 tfrc_lh_calc_i_mean(lh);
199
200 return (lh->i_mean < old_i_mean);
201}
202EXPORT_SYMBOL_GPL(tfrc_lh_update_i_mean);
203
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300204static int dccp_li_hist_interval_new(struct list_head *list,
Arnaldo Carvalho de Melo8c281782007-05-28 18:21:53 -0300205 const u64 seq_loss, const u8 win_loss)
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300206{
Ian McDonald66a377c2006-08-26 23:40:50 -0700207 struct dccp_li_hist_entry *entry;
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300208 int i;
209
Ian McDonald66a377c2006-08-26 23:40:50 -0700210 for (i = 0; i < DCCP_LI_HIST_IVAL_F_LENGTH; i++) {
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300211 entry = dccp_li_hist_entry_new(GFP_ATOMIC);
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300212 if (entry == NULL) {
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300213 dccp_li_hist_purge(list);
Gerrit Renker59348b12006-11-20 18:39:23 -0200214 DCCP_BUG("loss interval list entry is NULL");
Ian McDonald66a377c2006-08-26 23:40:50 -0700215 return 0;
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300216 }
Ian McDonald66a377c2006-08-26 23:40:50 -0700217 entry->dccplih_interval = ~0;
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300218 list_add(&entry->dccplih_node, list);
219 }
220
221 entry->dccplih_seqno = seq_loss;
222 entry->dccplih_win_count = win_loss;
Ian McDonald66a377c2006-08-26 23:40:50 -0700223 return 1;
Arnaldo Carvalho de Meloae6706f2005-08-27 23:03:09 -0300224}
225
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300226/* calculate first loss interval
227 *
228 * returns estimated loss interval in usecs */
229static u32 dccp_li_calc_first_li(struct sock *sk,
230 struct list_head *hist_list,
Arnaldo Carvalho de Meloe7c23352007-08-19 17:17:51 -0700231 ktime_t last_feedback,
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300232 u16 s, u32 bytes_recv,
233 u32 previous_x_recv)
234{
Arnaldo Carvalho de Melob84a2182007-12-06 13:18:11 -0200235/*
236 * FIXME:
237 * Will be rewritten in the upcoming new loss intervals code.
238 * Has to be commented ou because it relies on the old rx history
239 * data structures
240 */
241#if 0
Arnaldo Carvalho de Melod58d1af2007-12-06 12:28:39 -0200242 struct tfrc_rx_hist_entry *entry, *next, *tail = NULL;
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300243 u32 x_recv, p;
244 suseconds_t rtt, delta;
Arnaldo Carvalho de Meloe7c23352007-08-19 17:17:51 -0700245 ktime_t tstamp = ktime_set(0, 0);
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300246 int interval = 0;
247 int win_count = 0;
248 int step = 0;
249 u64 fval;
250
Arnaldo Carvalho de Melod58d1af2007-12-06 12:28:39 -0200251 list_for_each_entry_safe(entry, next, hist_list, tfrchrx_node) {
252 if (tfrc_rx_hist_entry_data_packet(entry)) {
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300253 tail = entry;
254
255 switch (step) {
256 case 0:
Arnaldo Carvalho de Melod58d1af2007-12-06 12:28:39 -0200257 tstamp = entry->tfrchrx_tstamp;
258 win_count = entry->tfrchrx_ccval;
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300259 step = 1;
260 break;
261 case 1:
Arnaldo Carvalho de Melod58d1af2007-12-06 12:28:39 -0200262 interval = win_count - entry->tfrchrx_ccval;
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300263 if (interval < 0)
264 interval += TFRC_WIN_COUNT_LIMIT;
265 if (interval > 4)
266 goto found;
267 break;
268 }
269 }
270 }
271
272 if (unlikely(step == 0)) {
273 DCCP_WARN("%s(%p), packet history has no data packets!\n",
274 dccp_role(sk), sk);
275 return ~0;
276 }
277
278 if (unlikely(interval == 0)) {
Joe Perches4756daa2007-11-19 23:46:02 -0800279 DCCP_WARN("%s(%p), Could not find a win_count interval > 0. "
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300280 "Defaulting to 1\n", dccp_role(sk), sk);
281 interval = 1;
282 }
283found:
284 if (!tail) {
285 DCCP_CRIT("tail is null\n");
286 return ~0;
287 }
288
Arnaldo Carvalho de Melod58d1af2007-12-06 12:28:39 -0200289 delta = ktime_us_delta(tstamp, tail->tfrchrx_tstamp);
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300290 DCCP_BUG_ON(delta < 0);
291
292 rtt = delta * 4 / interval;
293 dccp_pr_debug("%s(%p), approximated RTT to %dus\n",
294 dccp_role(sk), sk, (int)rtt);
295
296 /*
297 * Determine the length of the first loss interval via inverse lookup.
298 * Assume that X_recv can be computed by the throughput equation
299 * s
300 * X_recv = --------
301 * R * fval
302 * Find some p such that f(p) = fval; return 1/p [RFC 3448, 6.3.1].
303 */
304 if (rtt == 0) { /* would result in divide-by-zero */
305 DCCP_WARN("RTT==0\n");
306 return ~0;
307 }
308
Arnaldo Carvalho de Meloe7c23352007-08-19 17:17:51 -0700309 delta = ktime_us_delta(ktime_get_real(), last_feedback);
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300310 DCCP_BUG_ON(delta <= 0);
311
312 x_recv = scaled_div32(bytes_recv, delta);
313 if (x_recv == 0) { /* would also trigger divide-by-zero */
314 DCCP_WARN("X_recv==0\n");
315 if (previous_x_recv == 0) {
316 DCCP_BUG("stored value of X_recv is zero");
317 return ~0;
318 }
319 x_recv = previous_x_recv;
320 }
321
322 fval = scaled_div(s, rtt);
323 fval = scaled_div32(fval, x_recv);
324 p = tfrc_calc_x_reverse_lookup(fval);
325
326 dccp_pr_debug("%s(%p), receive rate=%u bytes/s, implied "
327 "loss rate=%u\n", dccp_role(sk), sk, x_recv, p);
328
Arnaldo Carvalho de Melob84a2182007-12-06 13:18:11 -0200329 if (p != 0)
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300330 return 1000000 / p;
Arnaldo Carvalho de Melob84a2182007-12-06 13:18:11 -0200331#endif
332 return ~0;
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300333}
334
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300335void dccp_li_update_li(struct sock *sk,
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300336 struct list_head *li_hist_list,
337 struct list_head *hist_list,
Arnaldo Carvalho de Meloe7c23352007-08-19 17:17:51 -0700338 ktime_t last_feedback, u16 s, u32 bytes_recv,
YOSHIFUJI Hideaki23248002007-07-19 10:43:28 +0900339 u32 previous_x_recv, u64 seq_loss, u8 win_loss)
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300340{
341 struct dccp_li_hist_entry *head;
342 u64 seq_temp;
343
344 if (list_empty(li_hist_list)) {
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300345 if (!dccp_li_hist_interval_new(li_hist_list, seq_loss,
346 win_loss))
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300347 return;
348
349 head = list_entry(li_hist_list->next, struct dccp_li_hist_entry,
350 dccplih_node);
351 head->dccplih_interval = dccp_li_calc_first_li(sk, hist_list,
352 last_feedback,
353 s, bytes_recv,
354 previous_x_recv);
355 } else {
356 struct dccp_li_hist_entry *entry;
357 struct list_head *tail;
358
359 head = list_entry(li_hist_list->next, struct dccp_li_hist_entry,
360 dccplih_node);
361 /* FIXME win count check removed as was wrong */
362 /* should make this check with receive history */
363 /* and compare there as per section 10.2 of RFC4342 */
364
365 /* new loss event detected */
366 /* calculate last interval length */
367 seq_temp = dccp_delta_seqno(head->dccplih_seqno, seq_loss);
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300368 entry = dccp_li_hist_entry_new(GFP_ATOMIC);
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300369
370 if (entry == NULL) {
371 DCCP_BUG("out of memory - can not allocate entry");
372 return;
373 }
374
375 list_add(&entry->dccplih_node, li_hist_list);
376
377 tail = li_hist_list->prev;
378 list_del(tail);
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300379 kmem_cache_free(dccp_li_cachep, tail);
Arnaldo Carvalho de Melocc0a9102007-06-14 17:41:28 -0300380
381 /* Create the newest interval */
382 entry->dccplih_seqno = seq_loss;
383 entry->dccplih_interval = seq_temp;
384 entry->dccplih_win_count = win_loss;
385 }
386}
387
388EXPORT_SYMBOL_GPL(dccp_li_update_li);
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300389
Gerrit Renker8a9c7e92007-12-12 13:50:51 -0200390/* Determine if `new_loss' does begin a new loss interval [RFC 4342, 10.2] */
391static inline u8 tfrc_lh_is_new_loss(struct tfrc_loss_interval *cur,
392 struct tfrc_rx_hist_entry *new_loss)
393{
394 return dccp_delta_seqno(cur->li_seqno, new_loss->tfrchrx_seqno) > 0 &&
395 (cur->li_is_closed || SUB16(new_loss->tfrchrx_ccval, cur->li_ccval) > 4);
396}
397
398/** tfrc_lh_interval_add - Insert new record into the Loss Interval database
399 * @lh: Loss Interval database
400 * @rh: Receive history containing a fresh loss event
401 * @calc_first_li: Caller-dependent routine to compute length of first interval
402 * @sk: Used by @calc_first_li in caller-specific way (subtyping)
403 * Updates I_mean and returns 1 if a new interval has in fact been added to @lh.
404 */
405int tfrc_lh_interval_add(struct tfrc_loss_hist *lh, struct tfrc_rx_hist *rh,
406 u32 (*calc_first_li)(struct sock *), struct sock *sk)
407{
408 struct tfrc_loss_interval *cur = tfrc_lh_peek(lh), *new;
409
410 if (cur != NULL && !tfrc_lh_is_new_loss(cur, tfrc_rx_hist_loss_prev(rh)))
411 return 0;
412
413 new = tfrc_lh_demand_next(lh);
414 if (unlikely(new == NULL)) {
415 DCCP_CRIT("Cannot allocate/add loss record.");
416 return 0;
417 }
418
419 new->li_seqno = tfrc_rx_hist_loss_prev(rh)->tfrchrx_seqno;
420 new->li_ccval = tfrc_rx_hist_loss_prev(rh)->tfrchrx_ccval;
421 new->li_is_closed = 0;
422
423 if (++lh->counter == 1)
424 lh->i_mean = new->li_length = (*calc_first_li)(sk);
425 else {
426 cur->li_length = dccp_delta_seqno(cur->li_seqno, new->li_seqno);
427 new->li_length = dccp_delta_seqno(new->li_seqno,
428 tfrc_rx_hist_last_rcv(rh)->tfrchrx_seqno);
429 if (lh->counter > (2*LIH_SIZE))
430 lh->counter -= LIH_SIZE;
431
432 tfrc_lh_calc_i_mean(lh);
433 }
434 return 1;
435}
436EXPORT_SYMBOL_GPL(tfrc_lh_interval_add);
437
Arnaldo Carvalho de Melo276f2ed2007-11-28 11:15:40 -0200438int __init dccp_li_init(void)
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300439{
440 dccp_li_cachep = kmem_cache_create("dccp_li_hist",
441 sizeof(struct dccp_li_hist_entry),
Paul Mundt20c2df82007-07-20 10:11:58 +0900442 0, SLAB_HWCACHE_ALIGN, NULL);
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300443 return dccp_li_cachep == NULL ? -ENOBUFS : 0;
444}
445
Arnaldo Carvalho de Melo276f2ed2007-11-28 11:15:40 -0200446void dccp_li_exit(void)
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300447{
Arnaldo Carvalho de Melo276f2ed2007-11-28 11:15:40 -0200448 if (dccp_li_cachep != NULL) {
449 kmem_cache_destroy(dccp_li_cachep);
450 dccp_li_cachep = NULL;
451 }
Arnaldo Carvalho de Melocc4d6a32007-05-28 18:53:08 -0300452}