Skip to content

Commit

Permalink
Add diagram and text explaining how qdiscs are set up
Browse files Browse the repository at this point in the history
@taggart contributed a diagram showing how sqm-scripts sets up qdiscs and
the IFB interface. Add this to the README along with a description.

Fixes tohojo#125.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed Nov 20, 2020
1 parent 4707dfd commit 741af09
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ This repository contains the sqm-scripts traffic shaper from the CeroWrt
project. See:
http://www.bufferbloat.net/projects/cerowrt/wiki/Smart_Queue_Management

## How does sqm-scripts set up traffic shaping?

sqm-scripts uses the Linux qdisc mechanism to configure traffic shaping and
scheduling. Either by a combination of the HTB qdisc (for shaping) and fq_codel
(for packet scheduling), or using the CAKE integrated scheduler to do both at
once.

Because qdiscs only see traffic as it is *leaving* an interface, for ingress
shaping sqm-scripts sets up an IFB device. Incoming packets are redirected to
this device where a regular qdisc can handle them. The IFB device is named for
the egress interface it is paired with, so the IFB for 'eth0' will be called
'ifb4eth0'.

This is all illustrated on the following diagram:

![qdisc diagram](qdisc-diagram.png)
Diagram contributed by Matt Taggart (@taggart). Source in [qdisc-diagram.dia](qdisc-diagram.dia).

## Requirements

To run sqm-scripts you just need a Linux machine with a kernel from the last
Expand Down
Binary file added qdisc-diagram.dia
Binary file not shown.
Binary file added qdisc-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 741af09

Please sign in to comment.