tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: htb default 5 tc class add dev eth0 parent 1: classid 1:1 htb rate 5mbit prio 1 tc class add dev eth0 parent 1:1 classid 1:2 htb rate 3mbit prio 2 tc class add dev eth0 parent 1:2 classid 20:1 htb rate 2mbit RTNETLINK answers: Invalid argument i don''t understand, why??? C
Ciprian Niculescu wrote:> tc qdisc del dev eth0 root > tc qdisc add dev eth0 root handle 1: htb default 5 > tc class add dev eth0 parent 1: classid 1:1 htb rate 5mbit prio 1 > > tc class add dev eth0 parent 1:1 classid 1:2 htb rate 3mbit prio 2 > > tc class add dev eth0 parent 1:2 classid 20:1 htb rate 2mbit > RTNETLINK answers: Invalid argumentI guess it should probably either qdisc add or classid 1:3 ...> > > i don''t understand, why??? >from include/linux/pkt_sched.h: /* "Handles" --------- All the traffic control objects have 32bit identifiers, or "handles". They can be considered as opaque numbers from user API viewpoint, but actually they always consist of two fields: major and minor numbers, which are interpreted by kernel specially, that may be used by applications, though not recommended. F.e. qdisc handles always have minor number equal to zero, classes (or flows) have major equal to parent qdisc major, and minor uniquely identifying class inside qdisc. Macros to manipulate handles: */ ... Bye, Patrick
tc class add dev eth0 parent 1:2 classid 20:1 htb rate 2mbit change to tc class add dev eth0 parent 1:2 classid 1:20 htb rate 2mbit -------------- for root 1: all descendants should be 1:number for root qdisc 2: all descendants should be 2:number etc ----------------------------------------------------------------------------- 21.05.2002 17:49:38, Ciprian Niculescu <Ciprian.Niculescu@int-evry.fr> wrote:>tc qdisc del dev eth0 root >tc qdisc add dev eth0 root handle 1: htb default 5 >tc class add dev eth0 parent 1: classid 1:1 htb rate 5mbit prio 1 > >tc class add dev eth0 parent 1:1 classid 1:2 htb rate 3mbit prio 2 > >tc class add dev eth0 parent 1:2 classid 20:1 htb rate 2mbit >RTNETLINK answers: Invalid argument > > >i don''t understand, why??? > >C > > >_______________________________________________ >LARTC mailing list / LARTC@mailman.ds9a.nl >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >