LARTC
[Top] [All Lists]

Re: [LARTC] pfifo_fast priomap

To: Roel van Meer <rolek@alt001.com>
Subject: Re: [LARTC] pfifo_fast priomap
From: Russell Stuart <russell-lartc@stuart.id.au>
Date: Fri, 29 Jun 2007 09:27:39 +1000
Cc: lartc@mailman.ds9a.nl
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
In-reply-to: <cone.1183048507.85605.24778.1001@whakatane.lsof.org>
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
References: <cone.1183048507.85605.24778.1001@whakatane.lsof.org>
Sender: lartc-bounces@mailman.ds9a.nl
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

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

<Prev in Thread] Current Thread [Next in Thread>