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 Means Linux Priority Band
> ------------------------------------------------------------
> 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 Bulk 2
> 0xa 5 mmc+mt 2 Bulk 2
> 0xc 6 mr+mt 2 Bulk 2
> 0xe 7 mmc+mr+mt 2 Bulk 2
> 0x10 8 Minimize Delay 6 Interactive 0
> 0x12 9 mmc+md 6 Interactive 0
> 0x14 10 mr+md 6 Interactive 0
> 0x16 11 mmc+mr+md 6 Interactive 0
> 0x18 12 mt+md 4 Int. Bulk 1
> 0x1a 13 mmc+mt+md 4 Int. Bulk 1
> 0x1c 14 mr+mt+md 4 Int. Bulk 1
> 0x1e 15 mmc+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