Re: [LARTC] pfifo_fast priomap

2007-06-28 Thread Russell Stuart
On Thu, 2007-06-28 at 18:35 +0200, Roel van Meer wrote: 
> Hi list,
> 
> I have a quick question about the priority mapping of tos bits. The manpage 
> of tc-prio shows a nice table with tos bits and the band they
> are mapped to:
> 
> TOS Bits  MeansLinux PriorityBand
> 
> 0x0 0 Normal Service   0 Best Effort 1
> 0x2 1 Minimize Monetary Cost   1 Filler  2
> 0x4 2 Maximize Reliability 0 Best Effort 1
> 0x6 3 mmc+mr   0 Best Effort 1
> 0x8 4 Maximize Throughput  2 Bulk2
> 0xa 5 mmc+mt   2 Bulk2
> 0xc 6 mr+mt2 Bulk2
> 0xe 7 mmc+mr+mt2 Bulk2
> 0x108 Minimize Delay   6 Interactive 0
> 0x129 mmc+md   6 Interactive 0
> 0x1410mr+md6 Interactive 0
> 0x1611mmc+mr+md6 Interactive 0
> 0x1812mt+md4 Int. Bulk   1
> 0x1a13mmc+mt+md4 Int. Bulk   1
> 0x1c14mr+mt+md 4 Int. Bulk   1
> 0x1e15mmc+mr+mt+md 4 Int. Bulk   1
> 
> If I read this correctly, packets with tos 0x0 would be mapped to band 1, 
> packets with tos 0x2 would be mapped to band 2, etc etc. However, the 
> default priomap is  1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1.
> 
> These numbers do not correspond to the numbers in the table above. Is there 
> something I have overlooked or is the information in the above table 
> incorrect?

The table is incorrect.  If you have the kernel source 
handy look at:
  net/ipv4.c/route.c:173, and
  include/linux/pkt_sched.h:17

Alternatively, look here:
  http://www.stuart.id.au/russell/files/tc/doc/tc/priority.txt
  http://www.stuart.id.au/russell/files/tc/doc/tc/sch_prio.txt

___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[LARTC] pfifo_fast priomap

2007-06-28 Thread Roel van Meer

Hi list,

I have a quick question about the priority mapping of tos bits. The manpage 
of tc-prio shows a nice table with tos bits and the band they

are mapped to:

TOS Bits  MeansLinux PriorityBand

0x0 0 Normal Service   0 Best Effort 1
0x2 1 Minimize Monetary Cost   1 Filler  2
0x4 2 Maximize Reliability 0 Best Effort 1
0x6 3 mmc+mr   0 Best Effort 1
0x8 4 Maximize Throughput  2 Bulk2
0xa 5 mmc+mt   2 Bulk2
0xc 6 mr+mt2 Bulk2
0xe 7 mmc+mr+mt2 Bulk2
0x108 Minimize Delay   6 Interactive 0
0x129 mmc+md   6 Interactive 0
0x1410mr+md6 Interactive 0
0x1611mmc+mr+md6 Interactive 0
0x1812mt+md4 Int. Bulk   1
0x1a13mmc+mt+md4 Int. Bulk   1
0x1c14mr+mt+md 4 Int. Bulk   1
0x1e15mmc+mr+mt+md 4 Int. Bulk   1

If I read this correctly, packets with tos 0x0 would be mapped to band 1, 
packets with tos 0x2 would be mapped to band 2, etc etc. However, the 
default priomap is  1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1.


These numbers do not correspond to the numbers in the table above. Is there 
something I have overlooked or is the information in the above table 
incorrect?


Thanks for any help,

roel
___
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc