Linux intermediate queue

Martin Devera aka devik
devik@cdi.cz
Last updated: 4.4.2002

Patrick McHardy took the developement over and you can find his rewritten version here.

New text is in red color. Coloring is removed on new text after 3 months.

Changes

1. Introduction

The IMQ device is dummy one - it can't be assigned IP adress or used for routing ..
IMQ intercepts all packets just before they are queued into real device queue and queues packet into its own queue.
After packet is successfully dequeued from IMQ it is requeued to device's real queue for transmit.

It allows you to attach to IMQ queuing discipline which will see and reorder ALL outgoing packets. It allows you to implement cross device bandwidth sharing.
Note that only non-work-conserving qdisc can be used here (like CBQ, HTB or TBF). Using work-conserving qdisc like prio here will not affect packet flow and will only eat CPU time.

Also CBQ is not well suited for this (and all other software devices) because is uses device's EOS event to sync itself.
I developed it to be used preferably with HTB.

2. How does it work

Each non-marked skb is intercepted in dev_queue_xmit and queued to IMQ if it is up. Immediately it tries to dequeue it (software pump).

TODO: finish

3. TODO

4. Sources

diff against 2.2.17 and probably other 2.2.x
diff against 2.4.12 and probably other 2.4.x