Re: was tcng error; now found bug in tcc]

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,

after slicing and dicing, i found that i had cut and pasted bad syntax,
so i have solved the problem posted in my first message.

that said, i have found an issue in 9h and 9i of tcng running on a
bi-processor with redhat-8 up2date with 2.4.20 kernel.

here's a small tcng cfg:


#define DEVICE eth0
#define UPLINK 512 

dev DEVICE {
    egress {
        htb () {
            class (rate UPLINK kbps) {
            }
        }
    }
}

[root]# cat tc.bug | tcc
tc qdisc add dev eth0 handle 1:0 root dsmark indices 1 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 htb
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 64000bps
------------------------------------------------------^^^^^^^^

notice that the UPLINK of 512 kbps (arguably 524288 bps) has been
incorrectly calculated as 64000 bps

similarly, the following:

#define DEVICE eth0
#define UPLINK 64 

dev DEVICE {
    egress {
        htb () {
            class (rate UPLINK kBps) {
            }
        }
    }
}

[root]# cat tc.bug | tcc
tc qdisc add dev eth0 handle 1:0 root dsmark indices 1 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 htb
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 64000bps
------------------------------------------------------^^^^^^^^

if i express the UPLINK in kilobytes/s, then the rate has been
incorrectly multiplied by 1000 instead equaling 64 * 8 * 1024 = 524288


have i missed something, or indeed there is a problem??

many thanks

charles

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux