Skip to contentSkip to conversation

pfifo_fast priomap

LARTC Roel van Meer 2 participants 2 messages Jun 28, 2007

lore
Share & tools
lore
#0 lore raw

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?

Thanks for any help,

roel
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 25 lines · 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 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
Quoted 7 lines

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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc