###Qdisc_ops is the core of a Qdisc.
All kinds of the Qdisc_ops are linked in a list by qdisc_base.
The key item of different Qdisc_ops is id[IFNAMSIZ].
Note: the list is a Singly-linked list, not a common list of kernel.
1 | 158 struct Qdisc_ops { |
qdisc_base
1 | 134 /* The list of all installed queueing disciplines. */ |
the default Qdisc_ops is default_qdisc_ops.
1 | 33 /* Qdisc to use by default */ |
1 | 526 struct Qdisc_ops pfifo_fast_ops __read_mostly = { |
register_qdisc
The list is not a sorted list, it would be better with sorted list,
but these reg/unreg functions are rarely used.
do some basic check for the methods of Qdisc_ops,
and set some default values.
for example, method peek must be empty if method dequeue is empty.
1 | 138 /* Register/uregister queueing discipline */ |
unregister_qdisc
1 | 184 int unregister_qdisc(struct Qdisc_ops *qops) |
all Qdisc_ops
1 | junwei@localhost:~/git/linux$ grep register_qdisc net/ -Rw |