tccs: tc -s c l dev eth1 | grep "^ rate"

Tomasz Pala gotar at polanet.pl
Tue Nov 2 10:56:51 CET 2004


I see that's COMMON, that there should be something like this:

 rate 16980bps 11pps
           ^^^
but I've got:

 rate 16980bit 11pps
           ^^^

(about hundred times, because I've got 767 classes on each network
device).
Running tccs shows me, that 'bit' means BYTES per second. I've added
warning when 'bps' shows up, but it NEVER happened. And I've noticed,
that from time to time it shows rate excessed nearly ten times; as we
know, iproute2 doesn't use major units when they're not integer.
So that's my symptom explanation: tc displays 'bit' always, regardless
of real unit. If it's bps (in tc notation, means B/s) - almost always,
and if it's bit (in tc notation, means b/s) - sometimes.

When I use -iec switch, it simply does s/bit/bps/ and everything is
right. Except this, that IEC has nothing to do with changing meaning of
bit and byte!
All this on iproute2-2.6.8-3, rev. 1.124 (ss040702), kernel24.

However version rebuilded from repo (040823, 041019) doesn't change bit to
bps with -iec.  Additionally it prints:

class htb 1:1 parent 1:997 rate 350000bit ceil 437500bit burst 5099b cburst 5974b

when there's rate 350000Bps ceil 437500Bps (rate 2800kbit ceil 3500kbit)

Wrong function is print_rate in tc_util.c.

-- 
Tom Pala <gotar at pld-linux.org>           http://vfmg.sourceforge.net/
                              http://www.pld-linux.org/Members/gotar/




More information about the pld-devel-en mailing list