jikos:~ # tc qdisc show qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms jikos:~ # ping -c 1 nix.cz | head -2 PING nix.cz (195.47.235.3) 56(84) bytes of data. 64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.59 ms

jikos:~ # tc qdisc add dev eth0 parent 10:1 sfq jikos:~ # tc qdisc show qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms qdisc sfq 8008: dev eth0 parent 10:1 limit 127p quantum 1514b depth 127 divisor 1024

jikos:~ # ping -c 1 nix.cz | head -2 PING nix.cz (195.47.235.3) 56(84) bytes of data. 64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.67 ms

jikos:~ # tc qdisc del dev eth0 parent 10:1 sfq jikos:~ # tc qdisc show qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms jikos:~ # ping -c 1 nix.cz | head -2 PING nix.cz (195.47.235.3) 56(84) bytes of data. [ ... nothing happens ... ] ^C jikos:~ # tc qdisc add dev eth0 parent 10:1 sfq jikos:~ # ping -c 1 nix.cz | head -2 PING nix.cz (195.47.235.3) 56(84) bytes of data. 64 bytes from info.nix.cz (195.47.235.3): icmp_seq=1 ttl=89 time=1.66 ms

This boils down to the problem of some qdiscs being "hidden" from user, so even though 'tc qdisc show' displays two identical configurations, they are actually not identical (one of them causes dysfunctional networking).

IOW, this works:

jikos:~ # tc qdisc show qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms

and this (after performing add/delete operation) doesn't:

jikos:~ # tc qdisc show qdisc tbf 10: dev eth0 root refcnt 2 rate 800Mbit burst 131000b lat 1.0ms

Some of the qdiscs are hidden because qdisc_match_from_root() function would have to scan hundreds of entries. This problem could be mitigated by converting this data structure to hashtable; that'd allow us to avoid hiding qdiscs, and hence making 'tc qdisc show' to actually display real state of the affairs.

On top of that, complete determinism will be achieved when the initial qdisc (for TBF) is stored separately, so that it can be restored during delete.

Reference thread: http://marc.info/?t=146064520100007&r=1

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 14 Hack Week 15

Activity

  • about 6 years ago: david_chang liked this project.
  • about 6 years ago: mkubecek liked this project.
  • about 6 years ago: ndas liked this project.
  • about 6 years ago: jkosina started this project.
  • about 6 years ago: jkosina originated this project.

  • Comments

    Similar Projects

    This project is one of its kind!