From: Joerg Pommnitz Date: Mon, 26 Nov 2007 14:22:52 +0000 Subject: [LARTC] prio qdisc broken? Message-Id: <420757.32093.qm@web51407.mail.re2.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hello all, I might make a fool out of me, but I think the prio qdisc doesn't work as advertised in any document I could lay my hands on. The following tests and observations were made with Linux kernel 2.6.20.21. This makes it up-to-date in the 2.6.20.x kernel family. My problem was that the link quality reported by the olsr.org olsrd degrad= ed depending on the amount of payload traffic was transferred through an adhoc/mesh interface. The LQ is calculated from the packet loss of LQ Hello packets sent through this interface. To make sure normal traffic does not interfere with this value, olsrd sets the TOS field to 0x10 (Minimize-Dela= y) by default. In theory this should give olsr traffic the highest priority o= n the link. Investigating this issue I replaced the default Pfifo_fast with a prio qdi= sc and attached a pfifo on each of the bands: INTERFACE=3Dwifi0 tc qdisc add dev $INTERFACE root handle 1: prio tc qdisc add dev $INTERFACE parent 1:1 handle 10: pfifo tc qdisc add dev $INTERFACE parent 1:2 handle 20: pfifo tc qdisc add dev $INTERFACE parent 1:3 handle 30: pfifo Then I used "ping -Q TOSVALUE target" to send packets with different TOS values through the interface. "tcpdump -vvv" confirmed the correct TOS val= ues in the outgoing packets. With "tc -s qdisc ls dev wifi0" I could observe the effects of the differe= nt TOS values. The result: no effect at all! Every single packet used the band in= dicated by the first value in the priomap (e.g. band 1 by default, in my case the = pfifo with handle 20:). I can't square this observation with the available docum= entation. Looking at the source code, it seems that sched_prio uses the skb->priority value to select the outgoing band. According to some documentation I found, an application can set this value. The following is more speculation than an educated guess: Could it be that skb->priority used to be set according to the TOS field by default and that= this changed after the implementation of prio? So, can somebody confirm or deny that the problem I see is real? Is there a= fix? Thanks in advance Joerg Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen S= ie=B4s mit dem neuen Yahoo! Mail. www.yahoo.de/mail _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc