[Devel] Re: [HELP] for using class group classifier network controller
Thomas Graf
tgraf at infradead.org
Mon Jun 15 03:30:20 PDT 2009
On Mon, Jun 15, 2009 at 11:36:09AM +0900, Minoru Usui wrote:
> Hi, Cheiyol
>
> > # classid 1:10
> >
> > echo 0x1000A > /dev/cpuctl/foo/net_cls.classid
> >
> > #classid 1:20
> >
> > echo 0x10014 > /dev/cpuctl/bob/net_cls.classid
>
> (snip)
>
> > # add class 1:10 for foo group
> >
> > $TC class add dev eth0 parent 1:0 classid 1:10 htb rate 50mbit
> >
> > # add class 1:20 for bob group
> >
> > $TC class add dev eth0 parent 1:0 classid 1:20 htb rate 30mbit
> >
> > # default class
> >
> > $TC class add dev eth0 parent 1:0 classid 1:30 htb rate 10mbit
>
> In class ID to use TC, both a major number and a minor number are hexadecimal.
> So 1:10 equals 0x00010010.
>
> I think, you should set 0x10010 to net_cls.classid if you classify to 1:10.
That's right, both net_cls.classid and tc use integers in hexadecimal form
for both, printing and parsing.
10:10 -> 0x100010
10:20 -> 0x100020
This seems to be the weak point regarding usability that's why I like
Minoru Usui's patch so much. It would no longer be necessary to really
understand the internals of classids etc.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list