Summary
Part 1: Register multi queue net device.
In this part, only the framework is prepared for qdisc,
and the noop_qdisc
is set as default.
prepare netdev_queue
s.
for example: intel igb hardware has 8 hardware tx queue,
and nic driver create 8 corresponding struct netdev_queue
in the _tx
of struct net_device
.
prepare mq_qdisc
The mq_qdisc
is attached to the corresponding device.
In mq_qdisc
private field, a default qdisc will be
create for each NIC’s hardware queue.
This is done in mq_init
.
The default qdisc is pfifo_fast_ops
.
attach mq_qdisc
to netdev_queue
.
In mq_attach
, these qdiscs are attatched to corresponding
struct netdev_queue
.
Part 2: Active a net device with right qdiscs
Here only trace with the case mq_qdisc
.
When dev is up, dev_open
is called, which will call dev_activate
.
Read More