blob: 5bbcef3dcd8cab49881292aa39ca213e456e7df2 [file] [log] [blame]
Patrick McHardy13d2a1d2008-11-20 04:10:00 -08001/*
2 * net/sched/sch_drr.c Deficit Round Robin scheduler
3 *
4 * Copyright (c) 2008 Patrick McHardy <kaber@trash.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
9 */
10
11#include <linux/module.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090012#include <linux/slab.h>
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080013#include <linux/init.h>
14#include <linux/errno.h>
15#include <linux/netdevice.h>
16#include <linux/pkt_sched.h>
17#include <net/sch_generic.h>
18#include <net/pkt_sched.h>
19#include <net/pkt_cls.h>
20
21struct drr_class {
22 struct Qdisc_class_common common;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080023 unsigned int filter_cnt;
24
Eric Dumazetc1a8f1f2009-08-16 09:36:49 +000025 struct gnet_stats_basic_packed bstats;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080026 struct gnet_stats_queue qstats;
Eric Dumazet1c0d32f2016-12-04 09:48:16 -080027 struct net_rate_estimator __rcu *rate_est;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080028 struct list_head alist;
29 struct Qdisc *qdisc;
30
31 u32 quantum;
32 u32 deficit;
33};
34
35struct drr_sched {
36 struct list_head active;
John Fastabend25d8c0d2014-09-12 20:05:27 -070037 struct tcf_proto __rcu *filter_list;
Jiri Pirko6529eab2017-05-17 11:07:55 +020038 struct tcf_block *block;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080039 struct Qdisc_class_hash clhash;
40};
41
42static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid)
43{
44 struct drr_sched *q = qdisc_priv(sch);
45 struct Qdisc_class_common *clc;
46
47 clc = qdisc_class_find(&q->clhash, classid);
48 if (clc == NULL)
49 return NULL;
50 return container_of(clc, struct drr_class, common);
51}
52
53static void drr_purge_queue(struct drr_class *cl)
54{
55 unsigned int len = cl->qdisc->q.qlen;
WANG Cong2ccccf52016-02-25 14:55:01 -080056 unsigned int backlog = cl->qdisc->qstats.backlog;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080057
58 qdisc_reset(cl->qdisc);
WANG Cong2ccccf52016-02-25 14:55:01 -080059 qdisc_tree_reduce_backlog(cl->qdisc, len, backlog);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080060}
61
62static const struct nla_policy drr_policy[TCA_DRR_MAX + 1] = {
63 [TCA_DRR_QUANTUM] = { .type = NLA_U32 },
64};
65
66static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
67 struct nlattr **tca, unsigned long *arg)
68{
69 struct drr_sched *q = qdisc_priv(sch);
70 struct drr_class *cl = (struct drr_class *)*arg;
Jarek Poplawski1844f742009-02-27 02:42:38 -080071 struct nlattr *opt = tca[TCA_OPTIONS];
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080072 struct nlattr *tb[TCA_DRR_MAX + 1];
73 u32 quantum;
74 int err;
75
Jarek Poplawski1844f742009-02-27 02:42:38 -080076 if (!opt)
77 return -EINVAL;
78
Johannes Bergfceb6432017-04-12 14:34:07 +020079 err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy, NULL);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -080080 if (err < 0)
81 return err;
82
83 if (tb[TCA_DRR_QUANTUM]) {
84 quantum = nla_get_u32(tb[TCA_DRR_QUANTUM]);
85 if (quantum == 0)
86 return -EINVAL;
87 } else
88 quantum = psched_mtu(qdisc_dev(sch));
89
90 if (cl != NULL) {
Stephen Hemminger71bcb092008-11-25 21:13:31 -080091 if (tca[TCA_RATE]) {
John Fastabend22e0f8b2014-09-28 11:52:56 -070092 err = gen_replace_estimator(&cl->bstats, NULL,
93 &cl->rate_est,
Eric Dumazetedb09eb2016-06-06 09:37:16 -070094 NULL,
95 qdisc_root_sleeping_running(sch),
Stephen Hemminger71bcb092008-11-25 21:13:31 -080096 tca[TCA_RATE]);
97 if (err)
98 return err;
99 }
100
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800101 sch_tree_lock(sch);
102 if (tb[TCA_DRR_QUANTUM])
103 cl->quantum = quantum;
104 sch_tree_unlock(sch);
105
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800106 return 0;
107 }
108
109 cl = kzalloc(sizeof(struct drr_class), GFP_KERNEL);
110 if (cl == NULL)
111 return -ENOBUFS;
112
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800113 cl->common.classid = classid;
114 cl->quantum = quantum;
Changli Gao3511c912010-10-16 13:04:08 +0000115 cl->qdisc = qdisc_create_dflt(sch->dev_queue,
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800116 &pfifo_qdisc_ops, classid);
117 if (cl->qdisc == NULL)
118 cl->qdisc = &noop_qdisc;
Jiri Kosina49b49972017-03-08 16:03:32 +0100119 else
120 qdisc_hash_add(cl->qdisc, true);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800121
Stephen Hemminger71bcb092008-11-25 21:13:31 -0800122 if (tca[TCA_RATE]) {
John Fastabend22e0f8b2014-09-28 11:52:56 -0700123 err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est,
Eric Dumazetedb09eb2016-06-06 09:37:16 -0700124 NULL,
125 qdisc_root_sleeping_running(sch),
Stephen Hemminger71bcb092008-11-25 21:13:31 -0800126 tca[TCA_RATE]);
127 if (err) {
128 qdisc_destroy(cl->qdisc);
129 kfree(cl);
130 return err;
131 }
132 }
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800133
134 sch_tree_lock(sch);
135 qdisc_class_hash_insert(&q->clhash, &cl->common);
136 sch_tree_unlock(sch);
137
138 qdisc_class_hash_grow(sch, &q->clhash);
139
140 *arg = (unsigned long)cl;
141 return 0;
142}
143
144static void drr_destroy_class(struct Qdisc *sch, struct drr_class *cl)
145{
Eric Dumazet1c0d32f2016-12-04 09:48:16 -0800146 gen_kill_estimator(&cl->rate_est);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800147 qdisc_destroy(cl->qdisc);
148 kfree(cl);
149}
150
151static int drr_delete_class(struct Qdisc *sch, unsigned long arg)
152{
153 struct drr_sched *q = qdisc_priv(sch);
154 struct drr_class *cl = (struct drr_class *)arg;
155
156 if (cl->filter_cnt > 0)
157 return -EBUSY;
158
159 sch_tree_lock(sch);
160
161 drr_purge_queue(cl);
162 qdisc_class_hash_remove(&q->clhash, &cl->common);
163
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800164 sch_tree_unlock(sch);
WANG Cong143976c2017-08-24 16:51:29 -0700165
166 drr_destroy_class(sch, cl);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800167 return 0;
168}
169
WANG Cong143976c2017-08-24 16:51:29 -0700170static unsigned long drr_search_class(struct Qdisc *sch, u32 classid)
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800171{
WANG Cong143976c2017-08-24 16:51:29 -0700172 return (unsigned long)drr_find_class(sch, classid);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800173}
174
Jiri Pirko6529eab2017-05-17 11:07:55 +0200175static struct tcf_block *drr_tcf_block(struct Qdisc *sch, unsigned long cl)
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800176{
177 struct drr_sched *q = qdisc_priv(sch);
178
179 if (cl)
180 return NULL;
181
Jiri Pirko6529eab2017-05-17 11:07:55 +0200182 return q->block;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800183}
184
185static unsigned long drr_bind_tcf(struct Qdisc *sch, unsigned long parent,
186 u32 classid)
187{
188 struct drr_class *cl = drr_find_class(sch, classid);
189
190 if (cl != NULL)
191 cl->filter_cnt++;
192
193 return (unsigned long)cl;
194}
195
196static void drr_unbind_tcf(struct Qdisc *sch, unsigned long arg)
197{
198 struct drr_class *cl = (struct drr_class *)arg;
199
200 cl->filter_cnt--;
201}
202
203static int drr_graft_class(struct Qdisc *sch, unsigned long arg,
204 struct Qdisc *new, struct Qdisc **old)
205{
206 struct drr_class *cl = (struct drr_class *)arg;
207
208 if (new == NULL) {
Changli Gao3511c912010-10-16 13:04:08 +0000209 new = qdisc_create_dflt(sch->dev_queue,
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800210 &pfifo_qdisc_ops, cl->common.classid);
211 if (new == NULL)
212 new = &noop_qdisc;
213 }
214
WANG Cong86a79962016-02-25 14:55:00 -0800215 *old = qdisc_replace(sch, new, &cl->qdisc);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800216 return 0;
217}
218
219static struct Qdisc *drr_class_leaf(struct Qdisc *sch, unsigned long arg)
220{
221 struct drr_class *cl = (struct drr_class *)arg;
222
223 return cl->qdisc;
224}
225
226static void drr_qlen_notify(struct Qdisc *csh, unsigned long arg)
227{
228 struct drr_class *cl = (struct drr_class *)arg;
229
Konstantin Khlebnikov95946652017-08-15 16:39:59 +0300230 list_del(&cl->alist);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800231}
232
233static int drr_dump_class(struct Qdisc *sch, unsigned long arg,
234 struct sk_buff *skb, struct tcmsg *tcm)
235{
236 struct drr_class *cl = (struct drr_class *)arg;
237 struct nlattr *nest;
238
239 tcm->tcm_parent = TC_H_ROOT;
240 tcm->tcm_handle = cl->common.classid;
241 tcm->tcm_info = cl->qdisc->handle;
242
243 nest = nla_nest_start(skb, TCA_OPTIONS);
244 if (nest == NULL)
245 goto nla_put_failure;
David S. Miller1b34ec42012-03-29 05:11:39 -0400246 if (nla_put_u32(skb, TCA_DRR_QUANTUM, cl->quantum))
247 goto nla_put_failure;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800248 return nla_nest_end(skb, nest);
249
250nla_put_failure:
251 nla_nest_cancel(skb, nest);
252 return -EMSGSIZE;
253}
254
255static int drr_dump_class_stats(struct Qdisc *sch, unsigned long arg,
256 struct gnet_dump *d)
257{
258 struct drr_class *cl = (struct drr_class *)arg;
John Fastabend64015852014-09-28 11:53:57 -0700259 __u32 qlen = cl->qdisc->q.qlen;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800260 struct tc_drr_stats xstats;
261
262 memset(&xstats, 0, sizeof(xstats));
John Fastabend64015852014-09-28 11:53:57 -0700263 if (qlen)
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800264 xstats.deficit = cl->deficit;
265
Eric Dumazetedb09eb2016-06-06 09:37:16 -0700266 if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch),
267 d, NULL, &cl->bstats) < 0 ||
Eric Dumazet1c0d32f2016-12-04 09:48:16 -0800268 gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 ||
John Fastabendb0ab6f92014-09-28 11:54:24 -0700269 gnet_stats_copy_queue(d, NULL, &cl->qdisc->qstats, qlen) < 0)
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800270 return -1;
271
272 return gnet_stats_copy_app(d, &xstats, sizeof(xstats));
273}
274
275static void drr_walk(struct Qdisc *sch, struct qdisc_walker *arg)
276{
277 struct drr_sched *q = qdisc_priv(sch);
278 struct drr_class *cl;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800279 unsigned int i;
280
281 if (arg->stop)
282 return;
283
284 for (i = 0; i < q->clhash.hashsize; i++) {
Sasha Levinb67bfe02013-02-27 17:06:00 -0800285 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) {
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800286 if (arg->count < arg->skip) {
287 arg->count++;
288 continue;
289 }
290 if (arg->fn(sch, (unsigned long)cl, arg) < 0) {
291 arg->stop = 1;
292 return;
293 }
294 arg->count++;
295 }
296 }
297}
298
299static struct drr_class *drr_classify(struct sk_buff *skb, struct Qdisc *sch,
300 int *qerr)
301{
302 struct drr_sched *q = qdisc_priv(sch);
303 struct drr_class *cl;
304 struct tcf_result res;
John Fastabend25d8c0d2014-09-12 20:05:27 -0700305 struct tcf_proto *fl;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800306 int result;
307
308 if (TC_H_MAJ(skb->priority ^ sch->handle) == 0) {
309 cl = drr_find_class(sch, skb->priority);
310 if (cl != NULL)
311 return cl;
312 }
313
314 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
John Fastabend25d8c0d2014-09-12 20:05:27 -0700315 fl = rcu_dereference_bh(q->filter_list);
Jiri Pirko87d83092017-05-17 11:07:54 +0200316 result = tcf_classify(skb, fl, &res, false);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800317 if (result >= 0) {
318#ifdef CONFIG_NET_CLS_ACT
319 switch (result) {
320 case TC_ACT_QUEUED:
321 case TC_ACT_STOLEN:
Jiri Pirkoe25ea212017-06-06 14:12:02 +0200322 case TC_ACT_TRAP:
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800323 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
Gustavo A. R. Silvaf3ae6082017-10-19 16:28:24 -0500324 /* fall through */
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800325 case TC_ACT_SHOT:
326 return NULL;
327 }
328#endif
329 cl = (struct drr_class *)res.class;
330 if (cl == NULL)
331 cl = drr_find_class(sch, res.classid);
332 return cl;
333 }
334 return NULL;
335}
336
Eric Dumazet520ac302016-06-21 23:16:49 -0700337static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
338 struct sk_buff **to_free)
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800339{
340 struct drr_sched *q = qdisc_priv(sch);
341 struct drr_class *cl;
David S. Millerf54ba772012-09-27 18:35:47 -0400342 int err = 0;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800343
344 cl = drr_classify(skb, sch, &err);
345 if (cl == NULL) {
346 if (err & __NET_XMIT_BYPASS)
John Fastabend25331d62014-09-28 11:53:29 -0700347 qdisc_qstats_drop(sch);
Eric Dumazet520ac302016-06-21 23:16:49 -0700348 __qdisc_drop(skb, to_free);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800349 return err;
350 }
351
Eric Dumazet520ac302016-06-21 23:16:49 -0700352 err = qdisc_enqueue(skb, cl->qdisc, to_free);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800353 if (unlikely(err != NET_XMIT_SUCCESS)) {
354 if (net_xmit_drop_count(err)) {
355 cl->qstats.drops++;
John Fastabend25331d62014-09-28 11:53:29 -0700356 qdisc_qstats_drop(sch);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800357 }
358 return err;
359 }
360
361 if (cl->qdisc->q.qlen == 1) {
362 list_add_tail(&cl->alist, &q->active);
363 cl->deficit = cl->quantum;
364 }
365
WANG Cong6a73b572016-06-01 16:15:17 -0700366 qdisc_qstats_backlog_inc(sch, skb);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800367 sch->q.qlen++;
368 return err;
369}
370
371static struct sk_buff *drr_dequeue(struct Qdisc *sch)
372{
373 struct drr_sched *q = qdisc_priv(sch);
374 struct drr_class *cl;
375 struct sk_buff *skb;
376 unsigned int len;
377
Patrick McHardy3f0947c2008-11-24 15:46:08 -0800378 if (list_empty(&q->active))
379 goto out;
380 while (1) {
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800381 cl = list_first_entry(&q->active, struct drr_class, alist);
382 skb = cl->qdisc->ops->peek(cl->qdisc);
Florian Westphal6e765a02014-06-11 20:35:18 +0200383 if (skb == NULL) {
384 qdisc_warn_nonwc(__func__, cl->qdisc);
Patrick McHardy3f0947c2008-11-24 15:46:08 -0800385 goto out;
Florian Westphal6e765a02014-06-11 20:35:18 +0200386 }
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800387
388 len = qdisc_pkt_len(skb);
389 if (len <= cl->deficit) {
390 cl->deficit -= len;
391 skb = qdisc_dequeue_peeked(cl->qdisc);
Bernie Harrisdf3eb6c2016-01-28 16:30:51 +1300392 if (unlikely(skb == NULL))
393 goto out;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800394 if (cl->qdisc->q.qlen == 0)
395 list_del(&cl->alist);
Eric Dumazet2dd875f2012-05-10 05:36:34 +0000396
397 bstats_update(&cl->bstats, skb);
Eric Dumazet9190b3b2011-01-20 23:31:33 -0800398 qdisc_bstats_update(sch, skb);
WANG Cong6a73b572016-06-01 16:15:17 -0700399 qdisc_qstats_backlog_dec(sch, skb);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800400 sch->q.qlen--;
401 return skb;
402 }
403
404 cl->deficit += cl->quantum;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800405 list_move_tail(&cl->alist, &q->active);
406 }
Patrick McHardy3f0947c2008-11-24 15:46:08 -0800407out:
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800408 return NULL;
409}
410
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800411static int drr_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
412{
413 struct drr_sched *q = qdisc_priv(sch);
414 int err;
415
Jiri Pirko69d78ef2017-10-13 14:00:57 +0200416 err = tcf_block_get(&q->block, &q->filter_list, sch);
Jiri Pirko6529eab2017-05-17 11:07:55 +0200417 if (err)
418 return err;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800419 err = qdisc_class_hash_init(&q->clhash);
420 if (err < 0)
421 return err;
422 INIT_LIST_HEAD(&q->active);
423 return 0;
424}
425
426static void drr_reset_qdisc(struct Qdisc *sch)
427{
428 struct drr_sched *q = qdisc_priv(sch);
429 struct drr_class *cl;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800430 unsigned int i;
431
432 for (i = 0; i < q->clhash.hashsize; i++) {
Sasha Levinb67bfe02013-02-27 17:06:00 -0800433 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) {
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800434 if (cl->qdisc->q.qlen)
435 list_del(&cl->alist);
436 qdisc_reset(cl->qdisc);
437 }
438 }
WANG Cong6a73b572016-06-01 16:15:17 -0700439 sch->qstats.backlog = 0;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800440 sch->q.qlen = 0;
441}
442
443static void drr_destroy_qdisc(struct Qdisc *sch)
444{
445 struct drr_sched *q = qdisc_priv(sch);
446 struct drr_class *cl;
Sasha Levinb67bfe02013-02-27 17:06:00 -0800447 struct hlist_node *next;
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800448 unsigned int i;
449
Jiri Pirko6529eab2017-05-17 11:07:55 +0200450 tcf_block_put(q->block);
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800451
452 for (i = 0; i < q->clhash.hashsize; i++) {
Sasha Levinb67bfe02013-02-27 17:06:00 -0800453 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800454 common.hnode)
455 drr_destroy_class(sch, cl);
456 }
457 qdisc_class_hash_destroy(&q->clhash);
458}
459
460static const struct Qdisc_class_ops drr_class_ops = {
461 .change = drr_change_class,
462 .delete = drr_delete_class,
WANG Cong143976c2017-08-24 16:51:29 -0700463 .find = drr_search_class,
Jiri Pirko6529eab2017-05-17 11:07:55 +0200464 .tcf_block = drr_tcf_block,
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800465 .bind_tcf = drr_bind_tcf,
466 .unbind_tcf = drr_unbind_tcf,
467 .graft = drr_graft_class,
468 .leaf = drr_class_leaf,
469 .qlen_notify = drr_qlen_notify,
470 .dump = drr_dump_class,
471 .dump_stats = drr_dump_class_stats,
472 .walk = drr_walk,
473};
474
475static struct Qdisc_ops drr_qdisc_ops __read_mostly = {
476 .cl_ops = &drr_class_ops,
477 .id = "drr",
478 .priv_size = sizeof(struct drr_sched),
479 .enqueue = drr_enqueue,
480 .dequeue = drr_dequeue,
481 .peek = qdisc_peek_dequeued,
Patrick McHardy13d2a1d2008-11-20 04:10:00 -0800482 .init = drr_init_qdisc,
483 .reset = drr_reset_qdisc,
484 .destroy = drr_destroy_qdisc,
485 .owner = THIS_MODULE,
486};
487
488static int __init drr_init(void)
489{
490 return register_qdisc(&drr_qdisc_ops);
491}
492
493static void __exit drr_exit(void)
494{
495 unregister_qdisc(&drr_qdisc_ops);
496}
497
498module_init(drr_init);
499module_exit(drr_exit);
500MODULE_LICENSE("GPL");