compat-2.6.h: include generated config.h
[~tnikolova/compat/.git] / compat / sch_fq_codel.c
1 /*
2  * Fair Queue CoDel discipline
3  *
4  *      This program is free software; you can redistribute it and/or
5  *      modify it under the terms of the GNU General Public License
6  *      as published by the Free Software Foundation; either version
7  *      2 of the License, or (at your option) any later version.
8  *
9  *  Copyright (C) 2012 Eric Dumazet <edumazet@google.com>
10  */
11
12 #include <linux/module.h>
13 #include <linux/types.h>
14 #include <linux/kernel.h>
15 #include <linux/jiffies.h>
16 #include <linux/string.h>
17 #include <linux/in.h>
18 #include <linux/errno.h>
19 #include <linux/init.h>
20 #include <linux/skbuff.h>
21 #include <linux/jhash.h>
22 #include <linux/slab.h>
23 #include <linux/vmalloc.h>
24 #include <net/netlink.h>
25 #include <net/pkt_sched.h>
26 #include <net/flow_keys.h>
27 #include <net/codel.h>
28
29 /*      Fair Queue CoDel.
30  *
31  * Principles :
32  * Packets are classified (internal classifier or external) on flows.
33  * This is a Stochastic model (as we use a hash, several flows
34  *                             might be hashed on same slot)
35  * Each flow has a CoDel managed queue.
36  * Flows are linked onto two (Round Robin) lists,
37  * so that new flows have priority on old ones.
38  *
39  * For a given flow, packets are not reordered (CoDel uses a FIFO)
40  * head drops only.
41  * ECN capability is on by default.
42  * Low memory footprint (64 bytes per flow)
43  */
44
45 struct fq_codel_flow {
46         struct sk_buff    *head;
47         struct sk_buff    *tail;
48         struct list_head  flowchain;
49         int               deficit;
50         u32               dropped; /* number of drops (or ECN marks) on this flow */
51         struct codel_vars cvars;
52 }; /* please try to keep this structure <= 64 bytes */
53
54 struct fq_codel_sched_data {
55         struct tcf_proto *filter_list;  /* optional external classifier */
56         struct fq_codel_flow *flows;    /* Flows table [flows_cnt] */
57         u32             *backlogs;      /* backlog table [flows_cnt] */
58         u32             flows_cnt;      /* number of flows */
59         u32             perturbation;   /* hash perturbation */
60         u32             quantum;        /* psched_mtu(qdisc_dev(sch)); */
61         struct codel_params cparams;
62         struct codel_stats cstats;
63         u32             drop_overlimit;
64         u32             new_flow_count;
65
66         struct list_head new_flows;     /* list of new flows */
67         struct list_head old_flows;     /* list of old flows */
68 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
69         u32 limit;
70 #endif
71 };
72
73 static unsigned int fq_codel_hash(const struct fq_codel_sched_data *q,
74                                   const struct sk_buff *skb)
75 {
76         struct flow_keys keys;
77         unsigned int hash;
78
79         skb_flow_dissect(skb, &keys);
80         hash = jhash_3words((__force u32)keys.dst,
81                             (__force u32)keys.src ^ keys.ip_proto,
82                             (__force u32)keys.ports, q->perturbation);
83         return ((u64)hash * q->flows_cnt) >> 32;
84 }
85
86 static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
87                                       int *qerr)
88 {
89         struct fq_codel_sched_data *q = qdisc_priv(sch);
90         struct tcf_result res;
91         int result;
92
93         if (TC_H_MAJ(skb->priority) == sch->handle &&
94             TC_H_MIN(skb->priority) > 0 &&
95             TC_H_MIN(skb->priority) <= q->flows_cnt)
96                 return TC_H_MIN(skb->priority);
97
98         if (!q->filter_list)
99                 return fq_codel_hash(q, skb) + 1;
100
101         *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
102         result = tc_classify(skb, q->filter_list, &res);
103         if (result >= 0) {
104 #ifdef CONFIG_NET_CLS_ACT
105                 switch (result) {
106                 case TC_ACT_STOLEN:
107                 case TC_ACT_QUEUED:
108                         *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
109                 case TC_ACT_SHOT:
110                         return 0;
111                 }
112 #endif
113                 if (TC_H_MIN(res.classid) <= q->flows_cnt)
114                         return TC_H_MIN(res.classid);
115         }
116         return 0;
117 }
118
119 /* helper functions : might be changed when/if skb use a standard list_head */
120
121 /* remove one skb from head of slot queue */
122 static inline struct sk_buff *dequeue_head(struct fq_codel_flow *flow)
123 {
124         struct sk_buff *skb = flow->head;
125
126         flow->head = skb->next;
127         skb->next = NULL;
128         return skb;
129 }
130
131 /* add skb to flow queue (tail add) */
132 static inline void flow_queue_add(struct fq_codel_flow *flow,
133                                   struct sk_buff *skb)
134 {
135         if (flow->head == NULL)
136                 flow->head = skb;
137         else
138                 flow->tail->next = skb;
139         flow->tail = skb;
140         skb->next = NULL;
141 }
142
143 static unsigned int fq_codel_drop(struct Qdisc *sch)
144 {
145         struct fq_codel_sched_data *q = qdisc_priv(sch);
146         struct sk_buff *skb;
147         unsigned int maxbacklog = 0, idx = 0, i, len;
148         struct fq_codel_flow *flow;
149
150         /* Queue is full! Find the fat flow and drop packet from it.
151          * This might sound expensive, but with 1024 flows, we scan
152          * 4KB of memory, and we dont need to handle a complex tree
153          * in fast path (packet queue/enqueue) with many cache misses.
154          */
155         for (i = 0; i < q->flows_cnt; i++) {
156                 if (q->backlogs[i] > maxbacklog) {
157                         maxbacklog = q->backlogs[i];
158                         idx = i;
159                 }
160         }
161         flow = &q->flows[idx];
162         skb = dequeue_head(flow);
163         len = qdisc_pkt_len(skb);
164         q->backlogs[idx] -= len;
165         kfree_skb(skb);
166         sch->q.qlen--;
167         sch->qstats.drops++;
168         sch->qstats.backlog -= len;
169         flow->dropped++;
170         return idx;
171 }
172
173 static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch)
174 {
175         struct fq_codel_sched_data *q = qdisc_priv(sch);
176         unsigned int idx;
177         struct fq_codel_flow *flow;
178         int uninitialized_var(ret);
179
180         idx = fq_codel_classify(skb, sch, &ret);
181         if (idx == 0) {
182                 if (ret & __NET_XMIT_BYPASS)
183                         sch->qstats.drops++;
184                 kfree_skb(skb);
185                 return ret;
186         }
187         idx--;
188
189         codel_set_enqueue_time(skb);
190         flow = &q->flows[idx];
191         flow_queue_add(flow, skb);
192         q->backlogs[idx] += qdisc_pkt_len(skb);
193         sch->qstats.backlog += qdisc_pkt_len(skb);
194
195         if (list_empty(&flow->flowchain)) {
196                 list_add_tail(&flow->flowchain, &q->new_flows);
197                 codel_vars_init(&flow->cvars);
198                 q->new_flow_count++;
199                 flow->deficit = q->quantum;
200                 flow->dropped = 0;
201         }
202 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
203         if (++sch->q.qlen < q->limit)
204 #else
205         if (++sch->q.qlen < sch->limit)
206 #endif
207                 return NET_XMIT_SUCCESS;
208
209         q->drop_overlimit++;
210         /* Return Congestion Notification only if we dropped a packet
211          * from this flow.
212          */
213         if (fq_codel_drop(sch) == idx)
214                 return NET_XMIT_CN;
215
216         /* As we dropped a packet, better let upper stack know this */
217         qdisc_tree_decrease_qlen(sch, 1);
218         return NET_XMIT_SUCCESS;
219 }
220
221 /* This is the specific function called from codel_dequeue()
222  * to dequeue a packet from queue. Note: backlog is handled in
223  * codel, we dont need to reduce it here.
224  */
225 static struct sk_buff *dequeue(struct codel_vars *vars, struct Qdisc *sch)
226 {
227         struct fq_codel_sched_data *q = qdisc_priv(sch);
228         struct fq_codel_flow *flow;
229         struct sk_buff *skb = NULL;
230
231         flow = container_of(vars, struct fq_codel_flow, cvars);
232         if (flow->head) {
233                 skb = dequeue_head(flow);
234                 q->backlogs[flow - q->flows] -= qdisc_pkt_len(skb);
235                 sch->q.qlen--;
236         }
237         return skb;
238 }
239
240 static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
241 {
242         struct fq_codel_sched_data *q = qdisc_priv(sch);
243         struct sk_buff *skb;
244         struct fq_codel_flow *flow;
245         struct list_head *head;
246         u32 prev_drop_count, prev_ecn_mark;
247
248 begin:
249         head = &q->new_flows;
250         if (list_empty(head)) {
251                 head = &q->old_flows;
252                 if (list_empty(head))
253                         return NULL;
254         }
255         flow = list_first_entry(head, struct fq_codel_flow, flowchain);
256
257         if (flow->deficit <= 0) {
258                 flow->deficit += q->quantum;
259                 list_move_tail(&flow->flowchain, &q->old_flows);
260                 goto begin;
261         }
262
263         prev_drop_count = q->cstats.drop_count;
264         prev_ecn_mark = q->cstats.ecn_mark;
265
266         skb = codel_dequeue(sch, &q->cparams, &flow->cvars, &q->cstats,
267                             dequeue);
268
269         flow->dropped += q->cstats.drop_count - prev_drop_count;
270         flow->dropped += q->cstats.ecn_mark - prev_ecn_mark;
271
272         if (!skb) {
273                 /* force a pass through old_flows to prevent starvation */
274                 if ((head == &q->new_flows) && !list_empty(&q->old_flows))
275                         list_move_tail(&flow->flowchain, &q->old_flows);
276                 else
277                         list_del_init(&flow->flowchain);
278                 goto begin;
279         }
280         qdisc_bstats_update(sch, skb);
281         flow->deficit -= qdisc_pkt_len(skb);
282         /* We cant call qdisc_tree_decrease_qlen() if our qlen is 0,
283          * or HTB crashes. Defer it for next round.
284          */
285         if (q->cstats.drop_count && sch->q.qlen) {
286                 qdisc_tree_decrease_qlen(sch, q->cstats.drop_count);
287                 q->cstats.drop_count = 0;
288         }
289         return skb;
290 }
291
292 static void fq_codel_reset(struct Qdisc *sch)
293 {
294         struct sk_buff *skb;
295
296         while ((skb = fq_codel_dequeue(sch)) != NULL)
297                 kfree_skb(skb);
298 }
299
300 static const struct nla_policy fq_codel_policy[TCA_FQ_CODEL_MAX + 1] = {
301         [TCA_FQ_CODEL_TARGET]   = { .type = NLA_U32 },
302         [TCA_FQ_CODEL_LIMIT]    = { .type = NLA_U32 },
303         [TCA_FQ_CODEL_INTERVAL] = { .type = NLA_U32 },
304         [TCA_FQ_CODEL_ECN]      = { .type = NLA_U32 },
305         [TCA_FQ_CODEL_FLOWS]    = { .type = NLA_U32 },
306         [TCA_FQ_CODEL_QUANTUM]  = { .type = NLA_U32 },
307 };
308
309 static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt)
310 {
311         struct fq_codel_sched_data *q = qdisc_priv(sch);
312         struct nlattr *tb[TCA_FQ_CODEL_MAX + 1];
313         int err;
314
315         if (!opt)
316                 return -EINVAL;
317
318         err = nla_parse_nested(tb, TCA_FQ_CODEL_MAX, opt, fq_codel_policy);
319         if (err < 0)
320                 return err;
321         if (tb[TCA_FQ_CODEL_FLOWS]) {
322                 if (q->flows)
323                         return -EINVAL;
324                 q->flows_cnt = nla_get_u32(tb[TCA_FQ_CODEL_FLOWS]);
325                 if (!q->flows_cnt ||
326                     q->flows_cnt > 65536)
327                         return -EINVAL;
328         }
329         sch_tree_lock(sch);
330
331         if (tb[TCA_FQ_CODEL_TARGET]) {
332                 u64 target = nla_get_u32(tb[TCA_FQ_CODEL_TARGET]);
333
334                 q->cparams.target = (target * NSEC_PER_USEC) >> CODEL_SHIFT;
335         }
336
337         if (tb[TCA_FQ_CODEL_INTERVAL]) {
338                 u64 interval = nla_get_u32(tb[TCA_FQ_CODEL_INTERVAL]);
339
340                 q->cparams.interval = (interval * NSEC_PER_USEC) >> CODEL_SHIFT;
341         }
342
343         if (tb[TCA_FQ_CODEL_LIMIT])
344 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
345                 q->limit = nla_get_u32(tb[TCA_FQ_CODEL_LIMIT]);
346 #else
347                 sch->limit = nla_get_u32(tb[TCA_FQ_CODEL_LIMIT]);
348 #endif
349
350         if (tb[TCA_FQ_CODEL_ECN])
351                 q->cparams.ecn = !!nla_get_u32(tb[TCA_FQ_CODEL_ECN]);
352
353         if (tb[TCA_FQ_CODEL_QUANTUM])
354                 q->quantum = max(256U, nla_get_u32(tb[TCA_FQ_CODEL_QUANTUM]));
355
356 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
357         while (sch->q.qlen > q->limit) {
358 #else
359         while (sch->q.qlen > sch->limit) {
360 #endif
361                 struct sk_buff *skb = fq_codel_dequeue(sch);
362
363                 kfree_skb(skb);
364                 q->cstats.drop_count++;
365         }
366         qdisc_tree_decrease_qlen(sch, q->cstats.drop_count);
367         q->cstats.drop_count = 0;
368
369         sch_tree_unlock(sch);
370         return 0;
371 }
372
373 static void *fq_codel_zalloc(size_t sz)
374 {
375         void *ptr = kzalloc(sz, GFP_KERNEL | __GFP_NOWARN);
376
377         if (!ptr)
378                 ptr = vzalloc(sz);
379         return ptr;
380 }
381
382 static void fq_codel_free(void *addr)
383 {
384         if (addr) {
385                 if (is_vmalloc_addr(addr))
386                         vfree(addr);
387                 else
388                         kfree(addr);
389         }
390 }
391
392 static void fq_codel_destroy(struct Qdisc *sch)
393 {
394         struct fq_codel_sched_data *q = qdisc_priv(sch);
395
396 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
397         tcf_destroy_chain(&q->filter_list);
398 #else
399         tcf_destroy_chain(q->filter_list);
400 #endif
401         fq_codel_free(q->backlogs);
402         fq_codel_free(q->flows);
403 }
404
405 static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt)
406 {
407         struct fq_codel_sched_data *q = qdisc_priv(sch);
408         int i;
409
410 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
411         q->limit = 10*1024;
412 #else
413         sch->limit = 10*1024;
414 #endif
415         q->flows_cnt = 1024;
416         q->quantum = psched_mtu(qdisc_dev(sch));
417         q->perturbation = net_random();
418         INIT_LIST_HEAD(&q->new_flows);
419         INIT_LIST_HEAD(&q->old_flows);
420         codel_params_init(&q->cparams);
421         codel_stats_init(&q->cstats);
422         q->cparams.ecn = true;
423
424         if (opt) {
425                 int err = fq_codel_change(sch, opt);
426                 if (err)
427                         return err;
428         }
429
430         if (!q->flows) {
431                 q->flows = fq_codel_zalloc(q->flows_cnt *
432                                            sizeof(struct fq_codel_flow));
433                 if (!q->flows)
434                         return -ENOMEM;
435                 q->backlogs = fq_codel_zalloc(q->flows_cnt * sizeof(u32));
436                 if (!q->backlogs) {
437                         fq_codel_free(q->flows);
438                         return -ENOMEM;
439                 }
440                 for (i = 0; i < q->flows_cnt; i++) {
441                         struct fq_codel_flow *flow = q->flows + i;
442
443                         INIT_LIST_HEAD(&flow->flowchain);
444                 }
445         }
446 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
447         if (q->limit >= 1)
448 #else
449         if (sch->limit >= 1)
450 #endif
451                 sch->flags |= TCQ_F_CAN_BYPASS;
452         else
453                 sch->flags &= ~TCQ_F_CAN_BYPASS;
454         return 0;
455 }
456
457 static int fq_codel_dump(struct Qdisc *sch, struct sk_buff *skb)
458 {
459         struct fq_codel_sched_data *q = qdisc_priv(sch);
460         struct nlattr *opts;
461
462         opts = nla_nest_start(skb, TCA_OPTIONS);
463         if (opts == NULL)
464                 goto nla_put_failure;
465
466         if (nla_put_u32(skb, TCA_FQ_CODEL_TARGET,
467                         codel_time_to_us(q->cparams.target)) ||
468             nla_put_u32(skb, TCA_FQ_CODEL_LIMIT,
469 #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,39))
470                         q->limit) ||
471 #else
472                         sch->limit) ||
473 #endif
474             nla_put_u32(skb, TCA_FQ_CODEL_INTERVAL,
475                         codel_time_to_us(q->cparams.interval)) ||
476             nla_put_u32(skb, TCA_FQ_CODEL_ECN,
477                         q->cparams.ecn) ||
478             nla_put_u32(skb, TCA_FQ_CODEL_QUANTUM,
479                         q->quantum) ||
480             nla_put_u32(skb, TCA_FQ_CODEL_FLOWS,
481                         q->flows_cnt))
482                 goto nla_put_failure;
483
484         nla_nest_end(skb, opts);
485         return skb->len;
486
487 nla_put_failure:
488         return -1;
489 }
490
491 static int fq_codel_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
492 {
493         struct fq_codel_sched_data *q = qdisc_priv(sch);
494         struct tc_fq_codel_xstats st = {
495                 .type                           = TCA_FQ_CODEL_XSTATS_QDISC,
496         };
497         struct list_head *pos;
498
499         st.qdisc_stats.maxpacket = q->cstats.maxpacket;
500         st.qdisc_stats.drop_overlimit = q->drop_overlimit;
501         st.qdisc_stats.ecn_mark = q->cstats.ecn_mark;
502         st.qdisc_stats.new_flow_count = q->new_flow_count;
503
504         list_for_each(pos, &q->new_flows)
505                 st.qdisc_stats.new_flows_len++;
506
507         list_for_each(pos, &q->old_flows)
508                 st.qdisc_stats.old_flows_len++;
509
510         return gnet_stats_copy_app(d, &st, sizeof(st));
511 }
512
513 static struct Qdisc *fq_codel_leaf(struct Qdisc *sch, unsigned long arg)
514 {
515         return NULL;
516 }
517
518 static unsigned long fq_codel_get(struct Qdisc *sch, u32 classid)
519 {
520         return 0;
521 }
522
523 static unsigned long fq_codel_bind(struct Qdisc *sch, unsigned long parent,
524                               u32 classid)
525 {
526         /* we cannot bypass queue discipline anymore */
527         sch->flags &= ~TCQ_F_CAN_BYPASS;
528         return 0;
529 }
530
531 static void fq_codel_put(struct Qdisc *q, unsigned long cl)
532 {
533 }
534
535 static struct tcf_proto **fq_codel_find_tcf(struct Qdisc *sch, unsigned long cl)
536 {
537         struct fq_codel_sched_data *q = qdisc_priv(sch);
538
539         if (cl)
540                 return NULL;
541         return &q->filter_list;
542 }
543
544 static int fq_codel_dump_class(struct Qdisc *sch, unsigned long cl,
545                           struct sk_buff *skb, struct tcmsg *tcm)
546 {
547         tcm->tcm_handle |= TC_H_MIN(cl);
548         return 0;
549 }
550
551 static int fq_codel_dump_class_stats(struct Qdisc *sch, unsigned long cl,
552                                      struct gnet_dump *d)
553 {
554         struct fq_codel_sched_data *q = qdisc_priv(sch);
555         u32 idx = cl - 1;
556         struct gnet_stats_queue qs = { 0 };
557         struct tc_fq_codel_xstats xstats;
558
559         if (idx < q->flows_cnt) {
560                 const struct fq_codel_flow *flow = &q->flows[idx];
561                 const struct sk_buff *skb = flow->head;
562
563                 memset(&xstats, 0, sizeof(xstats));
564                 xstats.type = TCA_FQ_CODEL_XSTATS_CLASS;
565                 xstats.class_stats.deficit = flow->deficit;
566                 xstats.class_stats.ldelay =
567                         codel_time_to_us(flow->cvars.ldelay);
568                 xstats.class_stats.count = flow->cvars.count;
569                 xstats.class_stats.lastcount = flow->cvars.lastcount;
570                 xstats.class_stats.dropping = flow->cvars.dropping;
571                 if (flow->cvars.dropping) {
572                         codel_tdiff_t delta = flow->cvars.drop_next -
573                                               codel_get_time();
574
575                         xstats.class_stats.drop_next = (delta >= 0) ?
576                                 codel_time_to_us(delta) :
577                                 -codel_time_to_us(-delta);
578                 }
579                 while (skb) {
580                         qs.qlen++;
581                         skb = skb->next;
582                 }
583                 qs.backlog = q->backlogs[idx];
584                 qs.drops = flow->dropped;
585         }
586         if (gnet_stats_copy_queue(d, &qs) < 0)
587                 return -1;
588         if (idx < q->flows_cnt)
589                 return gnet_stats_copy_app(d, &xstats, sizeof(xstats));
590         return 0;
591 }
592
593 static void fq_codel_walk(struct Qdisc *sch, struct qdisc_walker *arg)
594 {
595         struct fq_codel_sched_data *q = qdisc_priv(sch);
596         unsigned int i;
597
598         if (arg->stop)
599                 return;
600
601         for (i = 0; i < q->flows_cnt; i++) {
602                 if (list_empty(&q->flows[i].flowchain) ||
603                     arg->count < arg->skip) {
604                         arg->count++;
605                         continue;
606                 }
607                 if (arg->fn(sch, i + 1, arg) < 0) {
608                         arg->stop = 1;
609                         break;
610                 }
611                 arg->count++;
612         }
613 }
614
615 static const struct Qdisc_class_ops fq_codel_class_ops = {
616         .leaf           =       fq_codel_leaf,
617         .get            =       fq_codel_get,
618         .put            =       fq_codel_put,
619         .tcf_chain      =       fq_codel_find_tcf,
620         .bind_tcf       =       fq_codel_bind,
621         .unbind_tcf     =       fq_codel_put,
622         .dump           =       fq_codel_dump_class,
623         .dump_stats     =       fq_codel_dump_class_stats,
624         .walk           =       fq_codel_walk,
625 };
626
627 static struct Qdisc_ops fq_codel_qdisc_ops __read_mostly = {
628         .cl_ops         =       &fq_codel_class_ops,
629         .id             =       "fq_codel",
630         .priv_size      =       sizeof(struct fq_codel_sched_data),
631         .enqueue        =       fq_codel_enqueue,
632         .dequeue        =       fq_codel_dequeue,
633 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
634         .peek           =       qdisc_peek_dequeued,
635 #endif
636         .drop           =       fq_codel_drop,
637         .init           =       fq_codel_init,
638         .reset          =       fq_codel_reset,
639         .destroy        =       fq_codel_destroy,
640         .change         =       fq_codel_change,
641         .dump           =       fq_codel_dump,
642         .dump_stats =   fq_codel_dump_stats,
643         .owner          =       THIS_MODULE,
644 };
645
646 static int __init fq_codel_module_init(void)
647 {
648         return register_qdisc(&fq_codel_qdisc_ops);
649 }
650
651 static void __exit fq_codel_module_exit(void)
652 {
653         unregister_qdisc(&fq_codel_qdisc_ops);
654 }
655
656 module_init(fq_codel_module_init)
657 module_exit(fq_codel_module_exit)
658 MODULE_AUTHOR("Eric Dumazet");
659 MODULE_LICENSE("GPL");