From owner-freebsd-wireless@FreeBSD.ORG Sat Dec 3 16:18:17 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACFB1065670 for ; Sat, 3 Dec 2011 16:18:16 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from violet.upc.es (violet.upc.es [147.83.2.51]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6878FC08 for ; Sat, 3 Dec 2011 16:18:15 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by violet.upc.es (8.14.1/8.13.1) with ESMTP id pB3GID78019141 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 3 Dec 2011 17:18:13 +0100 Received: from portgus.lan (141.Red-81-39-182.dynamicIP.rima-tde.net [81.39.182.141]) (authenticated bits=0) by ackerman2.upc.es (8.14.4/8.14.4) with ESMTP id pB3GI4Y7011280 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 3 Dec 2011 17:18:12 +0100 Message-ID: <4EDA4BBA.6010203@entel.upc.edu> Date: Sat, 03 Dec 2011 17:18:02 +0100 From: =?ISO-8859-1?Q?Gustau_P=E9rez?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111111 Thunderbird/8.0 MIME-Version: 1.0 To: Adrian Chadd References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> <4ED3B4D1.3020701@entel.upc.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.70 on 147.83.2.244 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (violet.upc.es [147.83.2.51]); Sat, 03 Dec 2011 17:18:13 +0100 (CET) Cc: freebsd-wireless@freebsd.org Subject: Re: Big delays between an AR5416 AP and its clients X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 16:18:17 -0000 On 02/12/2011 03:50, Adrian Chadd wrote: > Hi, > > I've taken a quick peek. There's nothing obviously wrong with that trace. > > Can you please redo this with: > > * 5 runs? > * 100 pings a second - ie, ping -i 0.01 > * capture the output of athstats -i ath0 before and after each run, as > well as during a run > * let it run for say, 60 seconds at a time. I did the test. The files are labeled as: athstats_before_ping_runX.txt for the counters before a run and: athstats_ping_runX.txt for the output of athstats 1 during the ping. The tests were made while pinging the AR5416 box with: ping -i 0.01 -c 6000 You can download the results from: https://www-entel.upc.edu/gus/ath_second_test.tar.gz I see little different with the previous test. One that I noticed is that no matter how fast (or slow) I ping the box, the frequency of the phenomenon (which is the lattency increasing and then suddenly falling) seems to depend on the number of packets received instead of time. That can, maybe, give a clue of what is going on. I see that it appears to keep increasing for about 10 packets and then the latency suddenly falls. It showed the same behavior when using 0.1seg between packets, latency increased during 10 packets and then it fell. However the minimum value is three orders of magnitude bigger than the normal values I get when using a kernel previous to r227364. I would say that there's something like a queue being filled, but I'm just speculating. Of course, as soon as I block the iphone everything goes back to normal (too bad this can't be overridden, I can't fetch mail while the iphone is blocked) > Also, once that's done, try it again with this: > > wlandebug -i wlan0 +power +input +output +state +assoc +mlme > > see if anything interesting pops up at the same time as your latency increases. I see nothing particular in my dmesg with wlandebug enabled. I see the AR5416 complaining about a beacon off-channel for a MAC I don't know about. I also see the iphone's MAC going power save with a message like this: power save mode on, 2 sta's in ps mode I also see all of those messages with a pre r227364 kernel, so I would say they are harmless and not related to the issue. However, I see these the following entries in my dmesg when using r227364: Dec 3 16:46:27 harkserver kernel: Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x41d1a Dec 3 16:46:27 harkserver kernel: Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x41d1a Dec 3 16:18:27 harkserver kernel: ar5416PerCalibrationN: NF calibration didn't finish; delaying CCA Dec 3 16:18:27 harkserver kernel: ar5416PerCalibrationN: NF calibration didn't finish; delaying CCA I don't see those messages with a previous revision because they appear to be part of r227364. Those problems appear from time to time, could they and the latency increase be related? Thanks, Gus