From owner-freebsd-net@FreeBSD.ORG Wed Nov 30 13:56:18 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B41EB106564A for ; Wed, 30 Nov 2011 13:56:18 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 41D0E8FC08 for ; Wed, 30 Nov 2011 13:56:17 +0000 (UTC) Received: by lahv2 with SMTP id v2so327092lah.13 for ; Wed, 30 Nov 2011 05:56:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.130.71 with SMTP id oc7mr1274401lab.25.1322660056603; Wed, 30 Nov 2011 05:34:16 -0800 (PST) Sender: bschmidt@techwires.net Received: by 10.152.22.72 with HTTP; Wed, 30 Nov 2011 05:34:16 -0800 (PST) X-Originating-IP: [79.140.39.245] In-Reply-To: <69C75F6ECC9646C79374299EDF0E4304@PC> References: <69C75F6ECC9646C79374299EDF0E4304@PC> Date: Wed, 30 Nov 2011 14:34:16 +0100 X-Google-Sender-Auth: 1iqZ-D4iGQoQnE1gpjLdmvBnxQs Message-ID: From: Bernhard Schmidt To: Viet-Ha Pham Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org, Adrian Chadd Subject: Re: Wifi throughput test issue (FreeBSD 8.2) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 13:56:18 -0000 On Wed, Nov 30, 2011 at 13:37, Viet-Ha Pham wrote: > Hello, > > > I am doing some throughput measurement for Wifi network. I am using jperf= /iperf to generate traffic (at the transmitter) and measure the throughput = (at the receiver). The transmitter and receiver are running FreeBSD 8.2, us= ing CM9-GP as the Wifi NIC. We are testing AWGN channel. So, the transmitte= r and receiver are connected by cables, txpower on both sides is set lower = than the max (ranging from 0 to 10), AWGN noise is injected in the middle o= f the cable. > > We measure the maximum throughput at each transmission rate. Transmitter = is a STA, receiver is an AP. We fix the unicast rate at the transmitter to = 54 Mbps (using "ifconfig ... ucastrate" command). The packet size is set to= 400 Bytes, UDP protocol is used and the transmit bandwidth is set to 30 Mb= ps in order to flood the transmission channel (to push it to its limit). At= first, at the receiver (AP) the measured throughput is about 12 Mbps. Then= I fix the unicast rate at the receiver (using ifconfig again) to 54 Mbps. = The measured throughput increases to 20 Mbps. I set the unicast rate at the= receiver to autoselect again, the throughput is still 20 Mbps. > > When I switch the rate at the receiver, there are multiple message displa= yed on the screen of the transmitter: "wlan0: ieee80211_new_state_locked: p= ending RUN -> AUTH transition lost". This message is repeated for many time= s (at least 20). > > I repeated the test with all transmission rates, change the packet size a= nd still observe the same thing: a throughput improvement of about 30% is o= bserved when I switch the unicast rate at the receiver and the improvement = is still there when I switch the unicast rate back to autoselect. The same = thing is observed in modes a and g. The same thing is observed if the unica= st rate at the receiver is set different from the unicast rate at the trans= mitter. > > > > I spent time to look at the kernel source codes but I did not find a soli= d answer for this. Please help me to identify the problem and the answer. > > > My question is: > > 1. Why do I have that throughput improvement when I switch the rate like = that? > 2. Is it a bug in the driver? I think so, the driver might ignore/do some fancy stuff with a fixed ucastr= ate. @Adrian, do you know if ath_rate_sample has some debug options in that rega= rd? > 3. What does the error/infor message on the transmitter mean? It might mean a lot of things, you should probably enable additional debug options to get a clue about what's going on. Btw, do you also see that behavior on HEAD (or at least the latest 9.x release/rc)? --=20 Bernhard