xref: /linux/net/sched/sch_fq_pie.c (revision 4864f58c53eb47257d55e01f47d4a9f355f7f970)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Flow Queue PIE discipline
3  *
4  * Copyright (C) 2019 Mohit P. Tahiliani <tahiliani@nitk.edu.in>
5  * Copyright (C) 2019 Sachin D. Patil <sdp.sachin@gmail.com>
6  * Copyright (C) 2019 V. Saicharan <vsaicharan1998@gmail.com>
7  * Copyright (C) 2019 Mohit Bhasi <mohitbhasi1998@gmail.com>
8  * Copyright (C) 2019 Leslie Monis <lesliemonis@gmail.com>
9  * Copyright (C) 2019 Gautam Ramakrishnan <gautamramk@gmail.com>
10  */
11 
12 #include <linux/jhash.h>
13 #include <linux/module.h>
14 #include <linux/sizes.h>
15 #include <linux/vmalloc.h>
16 #include <net/pkt_cls.h>
17 #include <net/pie.h>
18 
19 /* Flow Queue PIE
20  *
21  * Principles:
22  *   - Packets are classified on flows.
23  *   - This is a Stochastic model (as we use a hash, several flows might
24  *                                 be hashed to the same slot)
25  *   - Each flow has a PIE managed queue.
26  *   - Flows are linked onto two (Round Robin) lists,
27  *     so that new flows have priority on old ones.
28  *   - For a given flow, packets are not reordered.
29  *   - Drops during enqueue only.
30  *   - ECN capability is off by default.
31  *   - ECN threshold (if ECN is enabled) is at 10% by default.
32  *   - Uses timestamps to calculate queue delay by default.
33  */
34 
35 /**
36  * struct fq_pie_flow - contains data for each flow
37  * @vars:	pie vars associated with the flow
38  * @deficit:	number of remaining byte credits
39  * @backlog:	size of data in the flow
40  * @qlen:	number of packets in the flow
41  * @flowchain:	flowchain for the flow
42  * @head:	first packet in the flow
43  * @tail:	last packet in the flow
44  */
45 struct fq_pie_flow {
46 	struct pie_vars vars;
47 	s32 deficit;
48 	u32 backlog;
49 	u32 qlen;
50 	struct list_head flowchain;
51 	struct sk_buff *head;
52 	struct sk_buff *tail;
53 };
54 
55 struct fq_pie_sched_data {
56 	struct tcf_proto __rcu *filter_list; /* optional external classifier */
57 	struct tcf_block *block;
58 	struct fq_pie_flow *flows;
59 	struct Qdisc *sch;
60 	struct list_head old_flows;
61 	struct list_head new_flows;
62 	struct pie_params p_params;
63 	u32 ecn_prob;
64 	u32 flows_cnt;
65 	u32 flows_cursor;
66 	u32 quantum;
67 	u32 memory_limit;
68 	u32 new_flow_count;
69 	u32 memory_usage;
70 	u32 overmemory;
71 	struct pie_stats stats;
72 	struct timer_list adapt_timer;
73 };
74 
75 static unsigned int fq_pie_hash(const struct fq_pie_sched_data *q,
76 				struct sk_buff *skb)
77 {
78 	return reciprocal_scale(skb_get_hash(skb), q->flows_cnt);
79 }
80 
81 static unsigned int fq_pie_classify(struct sk_buff *skb, struct Qdisc *sch,
82 				    int *qerr)
83 {
84 	struct fq_pie_sched_data *q = qdisc_priv(sch);
85 	struct tcf_proto *filter;
86 	struct tcf_result res;
87 	int result;
88 
89 	if (TC_H_MAJ(skb->priority) == sch->handle &&
90 	    TC_H_MIN(skb->priority) > 0 &&
91 	    TC_H_MIN(skb->priority) <= q->flows_cnt)
92 		return TC_H_MIN(skb->priority);
93 
94 	filter = rcu_dereference_bh(q->filter_list);
95 	if (!filter)
96 		return fq_pie_hash(q, skb) + 1;
97 
98 	*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
99 	result = tcf_classify_qdisc(skb, filter, &res, false);
100 	if (result >= 0) {
101 #ifdef CONFIG_NET_CLS_ACT
102 		switch (result) {
103 		case TC_ACT_STOLEN:
104 		case TC_ACT_QUEUED:
105 		case TC_ACT_TRAP:
106 			*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
107 			fallthrough;
108 		case TC_ACT_SHOT:
109 			return 0;
110 		}
111 #endif
112 		if (TC_H_MIN(res.classid) <= q->flows_cnt)
113 			return TC_H_MIN(res.classid);
114 	}
115 	return 0;
116 }
117 
118 /* add skb to flow queue (tail add) */
119 static inline void flow_queue_add(struct fq_pie_flow *flow,
120 				  struct sk_buff *skb)
121 {
122 	if (!flow->head)
123 		flow->head = skb;
124 	else
125 		flow->tail->next = skb;
126 	flow->tail = skb;
127 	skb->next = NULL;
128 }
129 
130 static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
131 				struct sk_buff **to_free)
132 {
133 	enum qdisc_drop_reason reason = QDISC_DROP_OVERLIMIT;
134 	struct fq_pie_sched_data *q = qdisc_priv(sch);
135 	struct fq_pie_flow *sel_flow;
136 	int ret;
137 	u8 memory_limited = false;
138 	u8 enqueue = false;
139 	u32 pkt_len;
140 	u32 idx;
141 
142 	/* Classifies packet into corresponding flow */
143 	idx = fq_pie_classify(skb, sch, &ret);
144 	if (idx == 0) {
145 		if (ret & __NET_XMIT_BYPASS)
146 			qdisc_qstats_drop(sch);
147 		__qdisc_drop(skb, to_free);
148 		return ret;
149 	}
150 	idx--;
151 
152 	sel_flow = &q->flows[idx];
153 	/* Checks whether adding a new packet would exceed memory limit */
154 	get_pie_cb(skb)->mem_usage = skb->truesize;
155 	memory_limited = q->memory_usage > q->memory_limit + skb->truesize;
156 
157 	/* Checks if the qdisc is full */
158 	if (unlikely(qdisc_qlen(sch) >= sch->limit)) {
159 		q->stats.overlimit++;
160 		goto out;
161 	} else if (unlikely(memory_limited)) {
162 		q->overmemory++;
163 	}
164 
165 	reason = QDISC_DROP_CONGESTED;
166 
167 	if (!pie_drop_early(sch, &q->p_params, &sel_flow->vars,
168 			    sel_flow->backlog, skb->len)) {
169 		enqueue = true;
170 	} else if (q->p_params.ecn &&
171 		   sel_flow->vars.prob <= (MAX_PROB / 100) * q->ecn_prob &&
172 		   INET_ECN_set_ce(skb)) {
173 		/* If packet is ecn capable, mark it if drop probability
174 		 * is lower than the parameter ecn_prob, else drop it.
175 		 */
176 		q->stats.ecn_mark++;
177 		enqueue = true;
178 	}
179 	if (enqueue) {
180 		/* Set enqueue time only when dq_rate_estimator is disabled. */
181 		if (!q->p_params.dq_rate_estimator)
182 			pie_set_enqueue_time(skb);
183 
184 		pkt_len = qdisc_pkt_len(skb);
185 		q->stats.packets_in++;
186 		q->memory_usage += skb->truesize;
187 		qstats_backlog_add(sch, pkt_len);
188 		qdisc_qlen_inc(sch);
189 		flow_queue_add(sel_flow, skb);
190 		if (list_empty(&sel_flow->flowchain)) {
191 			list_add_tail(&sel_flow->flowchain, &q->new_flows);
192 			q->new_flow_count++;
193 			sel_flow->deficit = q->quantum;
194 			sel_flow->qlen = 0;
195 			sel_flow->backlog = 0;
196 		}
197 		sel_flow->qlen++;
198 		sel_flow->backlog += pkt_len;
199 		return NET_XMIT_SUCCESS;
200 	}
201 out:
202 	q->stats.dropped++;
203 	sel_flow->vars.accu_prob = 0;
204 	qdisc_drop_reason(skb, sch, to_free, reason);
205 	return NET_XMIT_CN;
206 }
207 
208 static const struct netlink_range_validation fq_pie_q_range = {
209 	.min = 1,
210 	.max = 1 << 20,
211 };
212 
213 static const struct nla_policy fq_pie_policy[TCA_FQ_PIE_MAX + 1] = {
214 	[TCA_FQ_PIE_LIMIT]		= {.type = NLA_U32},
215 	[TCA_FQ_PIE_FLOWS]		= {.type = NLA_U32},
216 	[TCA_FQ_PIE_TARGET]		= {.type = NLA_U32},
217 	[TCA_FQ_PIE_TUPDATE]		= {.type = NLA_U32},
218 	[TCA_FQ_PIE_ALPHA]		= {.type = NLA_U32},
219 	[TCA_FQ_PIE_BETA]		= {.type = NLA_U32},
220 	[TCA_FQ_PIE_QUANTUM]		=
221 			NLA_POLICY_FULL_RANGE(NLA_U32, &fq_pie_q_range),
222 	[TCA_FQ_PIE_MEMORY_LIMIT]	= {.type = NLA_U32},
223 	[TCA_FQ_PIE_ECN_PROB]		= {.type = NLA_U32},
224 	[TCA_FQ_PIE_ECN]		= {.type = NLA_U32},
225 	[TCA_FQ_PIE_BYTEMODE]		= {.type = NLA_U32},
226 	[TCA_FQ_PIE_DQ_RATE_ESTIMATOR]	= {.type = NLA_U32},
227 };
228 
229 static inline struct sk_buff *dequeue_head(struct fq_pie_flow *flow)
230 {
231 	struct sk_buff *skb = flow->head;
232 
233 	flow->head = skb->next;
234 	skb->next = NULL;
235 	return skb;
236 }
237 
238 static struct sk_buff *fq_pie_qdisc_dequeue(struct Qdisc *sch)
239 {
240 	struct fq_pie_sched_data *q = qdisc_priv(sch);
241 	struct sk_buff *skb = NULL;
242 	struct fq_pie_flow *flow;
243 	struct list_head *head;
244 	u32 pkt_len;
245 
246 begin:
247 	head = &q->new_flows;
248 	if (list_empty(head)) {
249 		head = &q->old_flows;
250 		if (list_empty(head))
251 			return NULL;
252 	}
253 
254 	flow = list_first_entry(head, struct fq_pie_flow, flowchain);
255 	/* Flow has exhausted all its credits */
256 	if (flow->deficit <= 0) {
257 		flow->deficit += q->quantum;
258 		list_move_tail(&flow->flowchain, &q->old_flows);
259 		goto begin;
260 	}
261 
262 	if (flow->head) {
263 		skb = dequeue_head(flow);
264 		pkt_len = qdisc_pkt_len(skb);
265 		qstats_backlog_sub(sch, pkt_len);
266 		qdisc_qlen_dec(sch);
267 		qdisc_bstats_update(sch, skb);
268 	}
269 
270 	if (!skb) {
271 		/* force a pass through old_flows to prevent starvation */
272 		if (head == &q->new_flows && !list_empty(&q->old_flows))
273 			list_move_tail(&flow->flowchain, &q->old_flows);
274 		else
275 			list_del_init(&flow->flowchain);
276 		goto begin;
277 	}
278 
279 	flow->qlen--;
280 	flow->deficit -= pkt_len;
281 	flow->backlog -= pkt_len;
282 	q->memory_usage -= get_pie_cb(skb)->mem_usage;
283 	pie_process_dequeue(skb, &q->p_params, &flow->vars, flow->backlog);
284 	return skb;
285 }
286 
287 static int fq_pie_change(struct Qdisc *sch, struct nlattr *opt,
288 			 struct netlink_ext_ack *extack)
289 {
290 	unsigned int dropped_pkts = 0, dropped_bytes = 0;
291 	struct fq_pie_sched_data *q = qdisc_priv(sch);
292 	struct nlattr *tb[TCA_FQ_PIE_MAX + 1];
293 	int err;
294 
295 	err = nla_parse_nested(tb, TCA_FQ_PIE_MAX, opt, fq_pie_policy, extack);
296 	if (err < 0)
297 		return err;
298 
299 	sch_tree_lock(sch);
300 	if (tb[TCA_FQ_PIE_LIMIT]) {
301 		u32 limit = nla_get_u32(tb[TCA_FQ_PIE_LIMIT]);
302 
303 		WRITE_ONCE(q->p_params.limit, limit);
304 		WRITE_ONCE(sch->limit, limit);
305 	}
306 	if (tb[TCA_FQ_PIE_FLOWS]) {
307 		if (q->flows) {
308 			NL_SET_ERR_MSG_MOD(extack,
309 					   "Number of flows cannot be changed");
310 			goto flow_error;
311 		}
312 		q->flows_cnt = nla_get_u32(tb[TCA_FQ_PIE_FLOWS]);
313 		if (!q->flows_cnt || q->flows_cnt > 65536) {
314 			NL_SET_ERR_MSG_MOD(extack,
315 					   "Number of flows must range in [1..65536]");
316 			goto flow_error;
317 		}
318 	}
319 
320 	/* convert from microseconds to pschedtime */
321 	if (tb[TCA_FQ_PIE_TARGET]) {
322 		/* target is in us */
323 		u32 target = nla_get_u32(tb[TCA_FQ_PIE_TARGET]);
324 
325 		/* convert to pschedtime */
326 		WRITE_ONCE(q->p_params.target,
327 			   PSCHED_NS2TICKS((u64)target * NSEC_PER_USEC));
328 	}
329 
330 	/* tupdate is in jiffies */
331 	if (tb[TCA_FQ_PIE_TUPDATE])
332 		WRITE_ONCE(q->p_params.tupdate,
333 			usecs_to_jiffies(nla_get_u32(tb[TCA_FQ_PIE_TUPDATE])));
334 
335 	if (tb[TCA_FQ_PIE_ALPHA])
336 		WRITE_ONCE(q->p_params.alpha,
337 			   nla_get_u32(tb[TCA_FQ_PIE_ALPHA]));
338 
339 	if (tb[TCA_FQ_PIE_BETA])
340 		WRITE_ONCE(q->p_params.beta,
341 			   nla_get_u32(tb[TCA_FQ_PIE_BETA]));
342 
343 	if (tb[TCA_FQ_PIE_QUANTUM])
344 		WRITE_ONCE(q->quantum,
345 			   max(256U, nla_get_u32(tb[TCA_FQ_PIE_QUANTUM])));
346 
347 	if (tb[TCA_FQ_PIE_MEMORY_LIMIT])
348 		WRITE_ONCE(q->memory_limit,
349 			   nla_get_u32(tb[TCA_FQ_PIE_MEMORY_LIMIT]));
350 
351 	if (tb[TCA_FQ_PIE_ECN_PROB])
352 		WRITE_ONCE(q->ecn_prob,
353 			   nla_get_u32(tb[TCA_FQ_PIE_ECN_PROB]));
354 
355 	if (tb[TCA_FQ_PIE_ECN])
356 		WRITE_ONCE(q->p_params.ecn,
357 			   nla_get_u32(tb[TCA_FQ_PIE_ECN]));
358 
359 	if (tb[TCA_FQ_PIE_BYTEMODE])
360 		WRITE_ONCE(q->p_params.bytemode,
361 			   nla_get_u32(tb[TCA_FQ_PIE_BYTEMODE]));
362 
363 	if (tb[TCA_FQ_PIE_DQ_RATE_ESTIMATOR])
364 		WRITE_ONCE(q->p_params.dq_rate_estimator,
365 			   nla_get_u32(tb[TCA_FQ_PIE_DQ_RATE_ESTIMATOR]));
366 
367 	/* Drop excess packets if new limit is lower */
368 	while (sch->q.qlen > sch->limit) {
369 		struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
370 
371 		if (!skb)
372 			break;
373 
374 		dropped_pkts++;
375 		dropped_bytes += qdisc_pkt_len(skb);
376 		rtnl_kfree_skbs(skb, skb);
377 	}
378 	qdisc_tree_reduce_backlog(sch, dropped_pkts, dropped_bytes);
379 
380 	sch_tree_unlock(sch);
381 	return 0;
382 
383 flow_error:
384 	sch_tree_unlock(sch);
385 	return -EINVAL;
386 }
387 
388 static void fq_pie_timer(struct timer_list *t)
389 {
390 	struct fq_pie_sched_data *q = timer_container_of(q, t, adapt_timer);
391 	unsigned long next, tupdate;
392 	struct Qdisc *sch = q->sch;
393 	spinlock_t *root_lock; /* to lock qdisc for probability calculations */
394 	int max_cnt, i;
395 
396 	rcu_read_lock();
397 	root_lock = qdisc_lock(qdisc_root_sleeping(sch));
398 	spin_lock(root_lock);
399 
400 	/* Limit this expensive loop to 2048 flows per round. */
401 	max_cnt = min_t(int, q->flows_cnt - q->flows_cursor, 2048);
402 	for (i = 0; i < max_cnt; i++) {
403 		pie_calculate_probability(&q->p_params,
404 					  &q->flows[q->flows_cursor].vars,
405 					  q->flows[q->flows_cursor].backlog);
406 		q->flows_cursor++;
407 	}
408 
409 	tupdate = q->p_params.tupdate;
410 	next = 0;
411 	if (q->flows_cursor >= q->flows_cnt) {
412 		q->flows_cursor = 0;
413 		next = tupdate;
414 	}
415 	if (tupdate)
416 		mod_timer(&q->adapt_timer, jiffies + next);
417 	spin_unlock(root_lock);
418 	rcu_read_unlock();
419 }
420 
421 static int fq_pie_init(struct Qdisc *sch, struct nlattr *opt,
422 		       struct netlink_ext_ack *extack)
423 {
424 	struct fq_pie_sched_data *q = qdisc_priv(sch);
425 	int err;
426 	u32 idx;
427 
428 	pie_params_init(&q->p_params);
429 	sch->limit = 10 * 1024;
430 	q->p_params.limit = sch->limit;
431 	q->quantum = clamp_t(u32, psched_mtu(qdisc_dev(sch)),
432 			     256, 1 << 20);
433 	q->sch = sch;
434 	q->ecn_prob = 10;
435 	q->flows_cnt = 1024;
436 	q->memory_limit = SZ_32M;
437 
438 	INIT_LIST_HEAD(&q->new_flows);
439 	INIT_LIST_HEAD(&q->old_flows);
440 	timer_setup(&q->adapt_timer, fq_pie_timer, 0);
441 
442 	if (opt) {
443 		err = fq_pie_change(sch, opt, extack);
444 
445 		if (err)
446 			return err;
447 	}
448 
449 	err = tcf_block_get(&q->block, &q->filter_list, sch, extack);
450 	if (err)
451 		goto init_failure;
452 
453 	q->flows = kvzalloc_objs(struct fq_pie_flow, q->flows_cnt);
454 	if (!q->flows) {
455 		err = -ENOMEM;
456 		goto init_failure;
457 	}
458 	for (idx = 0; idx < q->flows_cnt; idx++) {
459 		struct fq_pie_flow *flow = q->flows + idx;
460 
461 		INIT_LIST_HEAD(&flow->flowchain);
462 		pie_vars_init(&flow->vars);
463 	}
464 
465 	mod_timer(&q->adapt_timer, jiffies + HZ / 2);
466 
467 	return 0;
468 
469 init_failure:
470 	q->flows_cnt = 0;
471 
472 	return err;
473 }
474 
475 static int fq_pie_dump(struct Qdisc *sch, struct sk_buff *skb)
476 {
477 	struct fq_pie_sched_data *q = qdisc_priv(sch);
478 	struct nlattr *opts;
479 
480 	opts = nla_nest_start(skb, TCA_OPTIONS);
481 	if (!opts)
482 		return -EMSGSIZE;
483 
484 	/* convert target from pschedtime to us */
485 	if (nla_put_u32(skb, TCA_FQ_PIE_LIMIT, READ_ONCE(sch->limit)) ||
486 	    nla_put_u32(skb, TCA_FQ_PIE_FLOWS, READ_ONCE(q->flows_cnt)) ||
487 	    nla_put_u32(skb, TCA_FQ_PIE_TARGET,
488 			((u32)PSCHED_TICKS2NS(READ_ONCE(q->p_params.target))) /
489 			NSEC_PER_USEC) ||
490 	    nla_put_u32(skb, TCA_FQ_PIE_TUPDATE,
491 			jiffies_to_usecs(READ_ONCE(q->p_params.tupdate))) ||
492 	    nla_put_u32(skb, TCA_FQ_PIE_ALPHA, READ_ONCE(q->p_params.alpha)) ||
493 	    nla_put_u32(skb, TCA_FQ_PIE_BETA, READ_ONCE(q->p_params.beta)) ||
494 	    nla_put_u32(skb, TCA_FQ_PIE_QUANTUM, READ_ONCE(q->quantum)) ||
495 	    nla_put_u32(skb, TCA_FQ_PIE_MEMORY_LIMIT,
496 			READ_ONCE(q->memory_limit)) ||
497 	    nla_put_u32(skb, TCA_FQ_PIE_ECN_PROB, READ_ONCE(q->ecn_prob)) ||
498 	    nla_put_u32(skb, TCA_FQ_PIE_ECN, READ_ONCE(q->p_params.ecn)) ||
499 	    nla_put_u32(skb, TCA_FQ_PIE_BYTEMODE, READ_ONCE(q->p_params.bytemode)) ||
500 	    nla_put_u32(skb, TCA_FQ_PIE_DQ_RATE_ESTIMATOR,
501 			READ_ONCE(q->p_params.dq_rate_estimator)))
502 		goto nla_put_failure;
503 
504 	return nla_nest_end(skb, opts);
505 
506 nla_put_failure:
507 	nla_nest_cancel(skb, opts);
508 	return -EMSGSIZE;
509 }
510 
511 static int fq_pie_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
512 {
513 	struct fq_pie_sched_data *q = qdisc_priv(sch);
514 	struct tc_fq_pie_xstats st = { 0 };
515 	struct list_head *pos;
516 
517 	sch_tree_lock(sch);
518 
519 	st.packets_in	= q->stats.packets_in;
520 	st.overlimit	= q->stats.overlimit;
521 	st.overmemory	= q->overmemory;
522 	st.dropped	= q->stats.dropped;
523 	st.ecn_mark	= q->stats.ecn_mark;
524 	st.new_flow_count = q->new_flow_count;
525 	st.memory_usage   = q->memory_usage;
526 
527 	list_for_each(pos, &q->new_flows)
528 		st.new_flows_len++;
529 
530 	list_for_each(pos, &q->old_flows)
531 		st.old_flows_len++;
532 	sch_tree_unlock(sch);
533 
534 	return gnet_stats_copy_app(d, &st, sizeof(st));
535 }
536 
537 static void fq_pie_reset(struct Qdisc *sch)
538 {
539 	struct fq_pie_sched_data *q = qdisc_priv(sch);
540 	u32 idx;
541 
542 	INIT_LIST_HEAD(&q->new_flows);
543 	INIT_LIST_HEAD(&q->old_flows);
544 	for (idx = 0; idx < q->flows_cnt; idx++) {
545 		struct fq_pie_flow *flow = q->flows + idx;
546 
547 		/* Removes all packets from flow */
548 		rtnl_kfree_skbs(flow->head, flow->tail);
549 		flow->head = NULL;
550 
551 		INIT_LIST_HEAD(&flow->flowchain);
552 		pie_vars_init(&flow->vars);
553 	}
554 }
555 
556 static void fq_pie_destroy(struct Qdisc *sch)
557 {
558 	struct fq_pie_sched_data *q = qdisc_priv(sch);
559 
560 	tcf_block_put(q->block);
561 	q->p_params.tupdate = 0;
562 	timer_delete_sync(&q->adapt_timer);
563 	kvfree(q->flows);
564 }
565 
566 static struct Qdisc_ops fq_pie_qdisc_ops __read_mostly = {
567 	.id		= "fq_pie",
568 	.priv_size	= sizeof(struct fq_pie_sched_data),
569 	.enqueue	= fq_pie_qdisc_enqueue,
570 	.dequeue	= fq_pie_qdisc_dequeue,
571 	.peek		= qdisc_peek_dequeued,
572 	.init		= fq_pie_init,
573 	.destroy	= fq_pie_destroy,
574 	.reset		= fq_pie_reset,
575 	.change		= fq_pie_change,
576 	.dump		= fq_pie_dump,
577 	.dump_stats	= fq_pie_dump_stats,
578 	.owner		= THIS_MODULE,
579 };
580 MODULE_ALIAS_NET_SCH("fq_pie");
581 
582 static int __init fq_pie_module_init(void)
583 {
584 	return register_qdisc(&fq_pie_qdisc_ops);
585 }
586 
587 static void __exit fq_pie_module_exit(void)
588 {
589 	unregister_qdisc(&fq_pie_qdisc_ops);
590 }
591 
592 module_init(fq_pie_module_init);
593 module_exit(fq_pie_module_exit);
594 
595 MODULE_DESCRIPTION("Flow Queue Proportional Integral controller Enhanced (FQ-PIE)");
596 MODULE_AUTHOR("Mohit P. Tahiliani");
597 MODULE_LICENSE("GPL");
598