From owner-freebsd-wireless@FreeBSD.ORG Mon Nov 28 00:24:00 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 22A931065675 for ; Mon, 28 Nov 2011 00:24:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D67568FC0A for ; Mon, 28 Nov 2011 00:23:59 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4150689vcb.13 for ; Sun, 27 Nov 2011 16:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0fn3XZ84OKVli5/t6xd8ZxXNNEDgpfn9VX4hJlPnHGY=; b=gjpOAGVkacpGFcrUjcS9cAJ4V0ty/UnAwOtf201iCN0ibCqjkQkjUdGppYfK6QLzaP 5HhkZLfeble+AgNI+96JxE6P+RPi2h2k82KHRA5821/hdDMxdmU0SV2EHtLFiEo2D2zz YB4Yvwh18f9zuswfPnX1IpRchE17VTPJvmpNo= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr40772358vdi.78.1322439839052; Sun, 27 Nov 2011 16:23:59 -0800 (PST) Received: by 10.52.186.74 with HTTP; Sun, 27 Nov 2011 16:23:59 -0800 (PST) In-Reply-To: <4ECFCDAB.1080407@entel.upc.edu> References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> Date: Mon, 28 Nov 2011 08:23:59 +0800 Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Gustau_P=E9rez?= Content-Type: text/plain; charset=ISO-8859-1 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: Mon, 28 Nov 2011 00:24:00 -0000 Hm, can you try that again with just the output of 'athstats' ? I'd like to see which counters are growing. Adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Nov 28 06:48:19 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 04575106566C for ; Mon, 28 Nov 2011 06:48:19 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from dash.upc.es (dash.upc.es [147.83.2.50]) by mx1.freebsd.org (Postfix) with ESMTP id 679C08FC0C for ; Mon, 28 Nov 2011 06:48:17 +0000 (UTC) Received: from entelserver.upc.edu (entelserver.upc.es [147.83.39.4]) by dash.upc.es (8.14.1/8.13.1) with ESMTP id pAS6mG4Y026086; Mon, 28 Nov 2011 07:48:16 +0100 Received: from webmail.entel.upc.edu (wireless.upc.es [147.83.39.6]) by entelserver.upc.edu (Postfix) with ESMTP id EC3172CBD0E; Mon, 28 Nov 2011 07:48:10 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 28 Nov 2011 07:33:44 +0100 From: Gustau Perez Querol To: Adrian Chadd In-Reply-To: References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> Message-ID: X-Sender: gperez@entel.upc.edu User-Agent: RoundCube Webmail/0.5.1 X-Mail-Scanned: Criba 2.0 + Clamd X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (dash.upc.es [147.83.2.50]); Mon, 28 Nov 2011 07:48:16 +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: Mon, 28 Nov 2011 06:48:19 -0000 On Mon, 28 Nov 2011 08:23:59 +0800, Adrian Chadd wrote: > Hm, can you try that again with just the output of 'athstats' ? > I need you to clarify what you want me to do, because I do not understand. Do I have to collect data with the iphone associated or while it associates? Do you want a long run of collection of data with athstats? Thanks, Gus From owner-freebsd-wireless@FreeBSD.ORG Mon Nov 28 10:08:46 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 6F8E0106564A for ; Mon, 28 Nov 2011 10:08:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0DA8FC0A for ; Mon, 28 Nov 2011 10:08:45 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4525626vcb.13 for ; Mon, 28 Nov 2011 02:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=obo7oNc9tX8CDhXUu88Exb+Wz4dNfwq49H/vmVs2tBI=; b=NLXf3rTXT0xAJJytFlnIoYYcusoqkna5a1JD0Rj049Op1Wl1nrApdNUjYMl7tpw2nE 9w8Lngh3S1z7MrzSYzdQy2rN0K30A3Gam/AcFD9ejiIKRLGSA5MBnkOIkB7GLrqfVxWr dfhjmfUaT45w6jyVPFkOBso6SJoHn2b9UbU8Y= MIME-Version: 1.0 Received: by 10.220.186.199 with SMTP id ct7mr4726520vcb.114.1322474925437; Mon, 28 Nov 2011 02:08:45 -0800 (PST) Received: by 10.52.186.74 with HTTP; Mon, 28 Nov 2011 02:08:45 -0800 (PST) In-Reply-To: References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> Date: Mon, 28 Nov 2011 18:08:45 +0800 Message-ID: From: Adrian Chadd To: Gustau Perez Querol Content-Type: text/plain; charset=ISO-8859-1 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: Mon, 28 Nov 2011 10:08:46 -0000 Just run athstats a few times whilst you're pinging in the background and you see spikes of latency. In fact, try doing something like "ping -i 0.1 ", that way it sends out 10 pings a second. That'll hopefully bump up the counters even further. Thanks, Adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Nov 28 11:07:34 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 0DBA5106566C for ; Mon, 28 Nov 2011 11:07:34 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E67B58FC14 for ; Mon, 28 Nov 2011 11:07:33 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pASB7Xli043106 for ; Mon, 28 Nov 2011 11:07:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pASB7XDV043091 for freebsd-wireless@FreeBSD.org; Mon, 28 Nov 2011 11:07:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Nov 2011 11:07:33 GMT Message-Id: <201111281107.pASB7XDV043091@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-wireless@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-wireless@FreeBSD.org 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: Mon, 28 Nov 2011 11:07:34 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/162648 wireless [ath] AR9227 ADC DC calibration failure o kern/162647 wireless [ath] 11n TX aggregation session / TX hang o kern/162475 wireless [ath] functions with return type HAL_BOOL (might) retu o kern/161293 wireless [iwn] hang at startup when starting network o kern/161035 wireless [ieee80211] Incorrect number describing 11ng MCS rate o kern/160391 wireless [ieee80211] [patch] Panic in mesh mode o kern/160296 wireless [zyd] [panic] 802.11 usb device reboots system on 'ifc o misc/160176 wireless [mips] [panic] Kernel panic on AR7161 platform with AR o kern/157449 wireless [ath] MAC address conflict causes system to freeze o kern/157243 wireless [ath] investigate beacon TX (AP) / RX (STA) when under o kern/156904 wireless [ath] AR9285 antenna diversity algorithm is buggy and o kern/156884 wireless [ath] ath instablity o kern/156327 wireless [bwn] bwn driver causes 20%-50% packet loss o kern/156322 wireless [wpi] no ahdemo support for if_wpi o kern/156321 wireless [ath] ahdemo doesn't work with if_ath o kern/155498 wireless [ral] ral(4) needs to be resynced with OpenBSD's to ga o kern/155100 wireless [ath] ath driver on busy channel: "stuck beacon" p kern/154598 wireless [ath] Atheros 5424/2424 can't connect to WPA network o kern/154567 wireless [ath] ath(4) lot of bad series(0) o kern/154327 wireless [ath] AR5416 in station mode hangs when transmitting f o kern/154284 wireless [ath] Modern ath wifi cards (such as AR9285) have miss o kern/154153 wireless [ath] AR5213 + MIPS + WPA group key packet corruption o kern/153448 wireless [ath] ath networking device loses association after a o kern/152750 wireless [ath] ath0 lot of bad series hwrate o kern/151198 wireless [ath] ath/5416 fails bgscan with "ath0: ath_chan_set: o kern/149786 wireless [bwn] bwn on Dell Inspiron 1150: connections stall o kern/149516 wireless [ath] ath(4) hostap with fake MAC/BSSID results in sta o kern/149373 wireless [realtek/atheros]: None of my network card working o kern/148322 wireless [ath] Triggering atheros wifi beacon misses in hostap o kern/148317 wireless [ath] FreeBSD 7.x hostap memory leak in net80211 or At o kern/148078 wireless [ath] wireless networking stops functioning o kern/145826 wireless [panic] [ath] Unable to configure adhoc mode on ath0/w o kern/144987 wireless [wpi] [panic] injecting packets with wlaninject using o bin/144109 wireless hostapd(8) uses the MAC of the wireless interface, but o kern/143868 wireless [ath] [patch] [request] allow Atheros watchdog timeout o conf/143079 wireless hostapd(8) startup missing multi wlan functionality p kern/140567 wireless [ath] [patch] ath is not worked on my notebook PC o kern/140245 wireless [ath] [panic] Kernel panic during network activity on o kern/137592 wireless [ath] panic - 7-STABLE (Aug 7, 2009 UTC) crashes on ne p bin/137484 wireless [patch] Integer overflow in wpa_supplicant(8) base64 e o kern/136943 wireless [wpi] [lor] wpi0_com_lock / wpi0 o kern/136836 wireless [ath] atheros card stops functioning after about 12 ho o kern/132722 wireless [ath] Wifi ath0 associates fine with AP, but DHCP or I o bin/131549 wireless ifconfig(8) can't clear 'monitor' mode on the wireless o kern/126475 wireless [ath] [panic] ath pcmcia card inevitably panics under o kern/125721 wireless [ath] Terrible throughput/high ping latency with Ubiqu o kern/125617 wireless [ath] [panic] ath(4) related panic o kern/125501 wireless [ath] atheros cardbus driver hangs o kern/125332 wireless [ath] [panic] crash under any non-tiny networking unde o kern/124767 wireless [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 wireless [ieee80211] net80211 discards power-save queue packets o docs/120456 wireless ath(4) needs to specify requirement on wlan_scan_sta o kern/119513 wireless [ath] [irq] inserting dlink dwl-g630 wireless card res o kern/116747 wireless [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile f kern/105348 wireless [ath] ath device stopps TX 55 problems total. From owner-freebsd-wireless@FreeBSD.ORG Mon Nov 28 16:20:46 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 ED93E106564A for ; Mon, 28 Nov 2011 16:20:46 +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 6E2CA8FC0C for ; Mon, 28 Nov 2011 16:20:45 +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 pASGKhu9013783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 28 Nov 2011 17:20:43 +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 pASGKcDG026538 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 28 Nov 2011 17:20:42 +0100 Message-ID: <4ED3B4D1.3020701@entel.upc.edu> Date: Mon, 28 Nov 2011 17:20:33 +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> 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]); Mon, 28 Nov 2011 17:20:43 +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: Mon, 28 Nov 2011 16:20:47 -0000 On 28/11/2011 11:08, Adrian Chadd wrote: > Just run athstats a few times whilst you're pinging in the background > and you see spikes of latency. > > In fact, try doing something like "ping -i 0.1", that way it > sends out 10 pings a second. That'll hopefully bump up the counters > even further. > > Thanks, > > > Adrian I see little increase in the counters. I hope you can see what happens from them, because I have no idea. I did 5 runs of 300 pings with 0,1 seconds before each one. The client and the iphone are half a meter far from the AR5416 box. Before each run I collected the counters with athstats, I labeled each file as: athstats_1client_pinging_iphone_assoc_before_runX.txt where X is the run. Then I collected the state of the card while pinging the AP with the AR5416, I labeled eash file as: athstats_1client_pinging_iphone_assoc_runX.txt I collected the info while pinging with: athstats -i 1 | tee athstats_1client_pinging_iphone_assoc_runX.txt I'm also adding the output of the ping command. The file is: ping_0.1_delays.txt As you may see, the problem has a frequency of about 8,5 seconds. That is to say that after 8,5 seconds the delays fall one order of magnitude. However the minimum value of the delays is about 10ms which is 3 orders of magnitude bigger than the normal values (which are of 0,1ms). You can fetch the results from: https://www-entel.upc.edu/gus/ath_delay_values.zip From owner-freebsd-wireless@FreeBSD.ORG Tue Nov 29 19:52:39 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 E31211065673 for ; Tue, 29 Nov 2011 19:52:39 +0000 (UTC) (envelope-from adi.ninad@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id ADBE68FC0C for ; Tue, 29 Nov 2011 19:52:39 +0000 (UTC) Received: by iakl21 with SMTP id l21so16532393iak.13 for ; Tue, 29 Nov 2011 11:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7BUUlNzgCtCW6LUhmUV/9YfPL3S34Rs51+W6JkGyZKQ=; b=GxHlmfTiEZar8QxOlK/DF2+Ju1Py29XrcaN9Cz9f+/V2q3r3Fb6cfU1n9NA9r0l8Av sJmEOBqW9UQEgUxMSqPcxS+IRihy3r97/xL5y7ZHpUEATvybSGH1mDzThZ6F4/IQhTCw U0swTdVMcz7h805DL3khaTYdUmyI9fnqvNjB4= MIME-Version: 1.0 Received: by 10.42.115.136 with SMTP id k8mr150943icq.46.1322596359233; Tue, 29 Nov 2011 11:52:39 -0800 (PST) Received: by 10.231.19.11 with HTTP; Tue, 29 Nov 2011 11:52:39 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 01:22:39 +0530 Message-ID: From: Ninad Adi To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Tue, 29 Nov 2011 20:02:51 +0000 Subject: Re: Why does iwn driver in FreeBSD is coded in just one file. 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: Tue, 29 Nov 2011 19:52:40 -0000 Hereby, I officially propose the splitting up of iwn driver code as it is growing and will continue growing as rate scaling improvements plus the P2P mode support would come into picture. Ninad. On Sun, Nov 13, 2011 at 1:44 PM, Ninad Adi wrote: > Dear Sirs, > > Why is that iwn driver in FreeBSD is coded in just one file, why isnt > it distributed according to its features, it would be easy to > understand, develop and debug > such kind of framework. > > Ninad Adi. From owner-freebsd-wireless@FreeBSD.ORG Wed Nov 30 08:36:25 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 D3F62106566B for ; Wed, 30 Nov 2011 08:36:25 +0000 (UTC) (envelope-from bschmidt@techwires.net) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 98B848FC13 for ; Wed, 30 Nov 2011 08:36:25 +0000 (UTC) Received: by qadc10 with SMTP id c10so115684qad.13 for ; Wed, 30 Nov 2011 00:36:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.31.132 with SMTP id y4mr579976qac.12.1322642184764; Wed, 30 Nov 2011 00:36:24 -0800 (PST) Sender: bschmidt@techwires.net Received: by 10.229.25.211 with HTTP; Wed, 30 Nov 2011 00:36:24 -0800 (PST) X-Originating-IP: [79.140.39.245] In-Reply-To: References: Date: Wed, 30 Nov 2011 09:36:24 +0100 X-Google-Sender-Auth: qXC4mV8fcE5NYZ-yY4sDFLr-pc8 Message-ID: From: Bernhard Schmidt To: Ninad Adi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org Subject: Re: Why does iwn driver in FreeBSD is coded in just one file. 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: Wed, 30 Nov 2011 08:36:25 -0000 On Tue, Nov 29, 2011 at 20:52, Ninad Adi wrote: > Hereby, I officially =A0propose the splitting up of iwn driver code as > it is growing and will continue growing as > rate scaling improvements plus the P2P mode support would come into pictu= re. iwn(4) is imported (mostly, sans 11n support) unmodified from OpenBSD, up till now there isn't a single valid reason to split up any of the code. Heck, I've done my best to keep the code diff(1)able against the original code. If *you* gonna provide additional features to iwn(4) I might reconsider that decision, but I want to see some code first. Btw, any ratectl related stuff should go to net80211(4) not to the drivers, same for P2P, we have not a single line of code to support that currently. --=20 Bernhard From owner-freebsd-wireless@FreeBSD.ORG Wed Nov 30 08:53:43 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 DB5991065672; Wed, 30 Nov 2011 08:53:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8278FC08; Wed, 30 Nov 2011 08:53:43 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so296857vcb.13 for ; Wed, 30 Nov 2011 00:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=JZ5wqcRoykR/qY4cc3id0XBEGh8leyTROnTbIHnGIZo=; b=TEe0y8XlFXGLr6gaBLd/lVmOYXJF0dgdLUPjQFaFbf+gsman/V9Ql7P1w5s8RsWD9M tAoq6vWDjYZPviWNIfluLAULSpOb3wzgwlgP8/0CZwPCUBbmA8sIWZu1RmW8AP0MZu+S kFTKLnXCFFQ/LG31FnlvGYu55sgOATRp6ZMCM= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr1219031vdi.78.1322643222776; Wed, 30 Nov 2011 00:53:42 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 00:53:42 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 16:53:42 +0800 X-Google-Sender-Auth: HodXURadoJPI-Bc7eLEuKUPiK0Y Message-ID: From: Adrian Chadd To: Bernhard Schmidt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org, Ninad Adi Subject: Re: Why does iwn driver in FreeBSD is coded in just one file. 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: Wed, 30 Nov 2011 08:53:43 -0000 On 30 November 2011 16:36, Bernhard Schmidt wrote: > On Tue, Nov 29, 2011 at 20:52, Ninad Adi wrote: >> Hereby, I officially =A0propose the splitting up of iwn driver code as >> it is growing and will continue growing as >> rate scaling improvements plus the P2P mode support would come into pict= ure. > > iwn(4) is imported (mostly, sans 11n support) unmodified from OpenBSD, > up till now there isn't a single valid reason to split up any of the > code. Heck, I've done my best to keep the code diff(1)able against the > original code. That sounds logical. Unless we can convince the openbsd iwn maintainer to split the driver up.. ? > If *you* gonna provide additional features to iwn(4) I might > reconsider that decision, but I want to see some code first. Btw, any > ratectl related stuff should go to net80211(4) not to the drivers, > same for P2P, we have not a single line of code to support that > currently. If you're going to hack on p2p support, can I suggest we prototype it using the ath(4) code? Since I'm the one looking after that, I'm happy to continue splitting the driver up (which i will be doing in a couple weeks) and it'll likely be easier to add/test p2p support there. thanks, Adrian From owner-freebsd-wireless@FreeBSD.ORG Wed Nov 30 22:44:22 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 934031065673; Wed, 30 Nov 2011 22:44:22 +0000 (UTC) Date: Wed, 30 Nov 2011 22:44:22 +0000 From: Alexander Best To: freebsd-wireless@freebsd.org Message-ID: <20111130224422.GA36424@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: comparing floating points via "==" or "!=" 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: Wed, 30 Nov 2011 22:44:22 -0000 hi there, i played a bit with the gcc -Wfloat-equal warning and noticed that inside sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating points are happening ("=="). is there a better way to deal with this? cheers. alex From owner-freebsd-wireless@FreeBSD.ORG Wed Nov 30 23:21:38 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 DA843106564A; Wed, 30 Nov 2011 23:21:38 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 891F08FC08; Wed, 30 Nov 2011 23:21:38 +0000 (UTC) Received: by ggnk5 with SMTP id k5so1868380ggn.13 for ; Wed, 30 Nov 2011 15:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=PhXAeATxTTihzs4ArGOVPXtT9jyu7uN+jGLcnd8dA+A=; b=h0JE7XA/q7PQgy3ICPnHJGg/ni97qbRANzpIf3wEd7lZ4epowV2lWO6E7PjEGPqQLu Gwazyd6DJWQ9FUvdiyRK/TC2FDX6iWx8ipRJO23oY0IWxsu/ZaFkoCus9eLkUzF7R/f6 liL5JkgSMUkCbeS1i/RXU1BU8Ae/yHMvDpn8k= Received: by 10.68.12.199 with SMTP id a7mr1250084pbc.58.1322693779064; Wed, 30 Nov 2011 14:56:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 14:55:38 -0800 (PST) In-Reply-To: <20111130224422.GA36424@freebsd.org> References: <20111130224422.GA36424@freebsd.org> From: Igor Mozolevsky Date: Wed, 30 Nov 2011 22:55:38 +0000 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Wed, 30 Nov 2011 23:21:38 -0000 On 30 November 2011 22:44, Alexander Best wrote: > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > points are happening ("=="). is there a better way to deal with this? as opposed to (abs(a-b) < tolerance)? Cheers, -- Igor :-) From owner-freebsd-wireless@FreeBSD.ORG Wed Nov 30 23:29:07 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 D31511065676; Wed, 30 Nov 2011 23:29:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7C6B88FC16; Wed, 30 Nov 2011 23:29:07 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so1487619vcb.13 for ; Wed, 30 Nov 2011 15:29:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/pGCaQfLS//VqnNAw5FkgNofYqkYQ1TvzjVNSxNiFW4=; b=F7lhRt7zFldAtCuANlEMAtmRz5I/Gm7RE0Ieb3T4nBEqDKuSmmzuEH+1kMNrokm4Jv fh52MAJHl4xHHGa6VNja4KnMQwscxkIrI7W7WLW6OzU9d8OOdG9eb4KHEzBtlplz1ovB p4SceiGDFbzjiyHT0KdoWmotffIbPeolAMeyg= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr3890379vdi.78.1322695746506; Wed, 30 Nov 2011 15:29:06 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 15:29:06 -0800 (PST) In-Reply-To: <20111130224422.GA36424@freebsd.org> References: <20111130224422.GA36424@freebsd.org> Date: Thu, 1 Dec 2011 07:29:06 +0800 X-Google-Sender-Auth: 2_EeFCATfuLZVfC7Htggrr0OoAI Message-ID: From: Adrian Chadd To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Wed, 30 Nov 2011 23:29:07 -0000 On 1 December 2011 06:44, Alexander Best wrote: > hi there, > > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > points are happening ("=="). is there a better way to deal with this? ... where? adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:00:38 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B186A1065673; Thu, 1 Dec 2011 00:00:38 +0000 (UTC) Date: Thu, 1 Dec 2011 00:00:38 +0000 From: Alexander Best To: Adrian Chadd Message-ID: <20111201000038.GA44877@freebsd.org> References: <20111130224422.GA36424@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:00:38 -0000 On Thu Dec 1 11, Adrian Chadd wrote: > On 1 December 2011 06:44, Alexander Best wrote: > > hi there, > > > > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > > points are happening ("=="). is there a better way to deal with this? > > > ... where? the NA1(), NG1() and Q() macros. cheers. alex > > adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:02:43 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 8B2D6106566C; Thu, 1 Dec 2011 00:02:43 +0000 (UTC) Date: Thu, 1 Dec 2011 00:02:43 +0000 From: Alexander Best To: Igor Mozolevsky Message-ID: <20111201000243.GB44877@freebsd.org> References: <20111130224422.GA36424@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:02:43 -0000 On Wed Nov 30 11, Igor Mozolevsky wrote: > On 30 November 2011 22:44, Alexander Best wrote: > > > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > > points are happening ("=="). is there a better way to deal with this? > > as opposed to (abs(a-b) < tolerance)? fabs(3) actually, or some other way, e.g. described in: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm cheers. alex > > > Cheers, > > -- > Igor :-) From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:05:29 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id CED32106566C; Thu, 1 Dec 2011 00:05:29 +0000 (UTC) Date: Thu, 1 Dec 2011 00:05:29 +0000 From: Alexander Best To: freebsd-wireless@freebsd.org Message-ID: <20111201000529.GA47213@freebsd.org> References: <20111130224422.GA36424@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111130224422.GA36424@freebsd.org> Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:05:29 -0000 On Wed Nov 30 11, Alexander Best wrote: > hi there, > > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > points are happening ("=="). is there a better way to deal with this? i just built GENERIC (incuding all modules) and this is the only place where direct comparisons of floating points happen. if this can be resolved, i vote that we add -Wfloat-equal to sys/conf/kern.mk:CWARNFLAGS. cheers. alex > > cheers. > alex From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:07:26 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 ACAE3106566B; Thu, 1 Dec 2011 00:07:26 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5AC9F8FC16; Thu, 1 Dec 2011 00:07:26 +0000 (UTC) Received: by yenq9 with SMTP id q9so1761938yen.13 for ; Wed, 30 Nov 2011 16:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=G0gpQmVLi4UyeBbR79AdnfPF1AJUN+e7zR9QWLLWOiA=; b=m9Qj812KXi6XzBuRyGwR2mvisy5+MDUYcHL+MMJdh8Fm/E9QPyIKvq76e25VBpnGID 6My2DvHSZNI59cDFLref8+lMQ6Pvmn0qdX/S+q8T85x5xI7yKdu9acSiq4lDhFR/qI4A rso0smwUPxLTIvaqCxNZkfGzlujHq2Te86AK8= Received: by 10.68.12.199 with SMTP id a7mr283817pbc.58.1322698045151; Wed, 30 Nov 2011 16:07:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 16:06:44 -0800 (PST) In-Reply-To: <20111201000243.GB44877@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 00:06:44 +0000 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:07:26 -0000 On 1 December 2011 00:02, Alexander Best wrote: > On Wed Nov 30 11, Igor Mozolevsky wrote: >> On 30 November 2011 22:44, Alexander Best wrote: >> >> > i played a bit with the gcc -Wfloat-equal warning and noticed that inside >> > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating >> > points are happening ("=="). is there a better way to deal with this? >> >> as opposed to (abs(a-b) < tolerance)? > > fabs(3) actually, or some other way, e.g. described in: I thought from the context it was fairly clear that the appropriate XabsY variant had to be used without me being unnecessarily verbose in mentioning fabs(), and its fabsl() and fabsf() friends?.. Cheers, -- Igor ;-) From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:11:58 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C1431106566C; Thu, 1 Dec 2011 00:11:58 +0000 (UTC) Date: Thu, 1 Dec 2011 00:11:58 +0000 From: Alexander Best To: Igor Mozolevsky Message-ID: <20111201001158.GA48051@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:11:58 -0000 On Thu Dec 1 11, Igor Mozolevsky wrote: > On 1 December 2011 00:02, Alexander Best wrote: > > On Wed Nov 30 11, Igor Mozolevsky wrote: > >> On 30 November 2011 22:44, Alexander Best wrote: > >> > >> > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > >> > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > >> > points are happening ("=="). is there a better way to deal with this? > >> > >> as opposed to (abs(a-b) < tolerance)? > > > > fabs(3) actually, or some other way, e.g. described in: > > I thought from the context it was fairly clear that the appropriate > XabsY variant had to be used without me being unnecessarily verbose in > mentioning fabs(), and its fabsl() and fabsf() friends?.. i sorry. since sys/dev/ath/ath_rate/sample/tx_schedules.h also handles a lot of integer values, i thought you referred to abs(3), because you saw also some issues with the integer computations in that file. so i thought you were referring to yet another issue in that file. cheers. alex > > > Cheers, > > -- > Igor ;-) From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:18:18 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 81B7C106566B; Thu, 1 Dec 2011 00:18:18 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 30BE58FC0C; Thu, 1 Dec 2011 00:18:17 +0000 (UTC) Received: by ghbg20 with SMTP id g20so1931934ghb.13 for ; Wed, 30 Nov 2011 16:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=CkHh0yk5dPdMdasQGNkTCnD2emHeBGpPEx/6oKIYCxw=; b=m814zPamDLRG81GUYECaPilPbxf5CE9EPKwHEK1KpusZGV/ehirEP7Rs+1dhlP8Bh7 h4QZKmlDoQwkP/JPx76tR5pznTjwjCX/txQzoGbUJG4GEwGDqyPbqhTVE5JooCkGiLIO q2ZC7iHuZO+u3jD27aW3KBiSY0dJ4f+OVvaz8= Received: by 10.68.29.137 with SMTP id k9mr196046pbh.109.1322698697065; Wed, 30 Nov 2011 16:18:17 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 16:17:36 -0800 (PST) In-Reply-To: <20111201001158.GA48051@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 00:17:36 +0000 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:18:18 -0000 On 1 December 2011 00:11, Alexander Best wrote: > i sorry. since sys/dev/ath/ath_rate/sample/tx_schedules.h also handles a lot > of integer values, i thought you referred to abs(3), because you saw also > some issues with the integer computations in that file. so i thought you were > referring to yet another issue in that file. Oh, I see! No, I was referring to a generic |a-b| expression, not abs(3) specifically. Retrospectively, using |a-b| would've been better :-) Cheers, -- Igor From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:39:39 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 59E751065670; Thu, 1 Dec 2011 00:39:38 +0000 (UTC) Date: Thu, 1 Dec 2011 00:39:38 +0000 From: Alexander Best To: Igor Mozolevsky Message-ID: <20111201003938.GA52503@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:39:39 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu Dec 1 11, Igor Mozolevsky wrote: > On 1 December 2011 00:11, Alexander Best wrote: > > > i sorry. since sys/dev/ath/ath_rate/sample/tx_schedules.h also handles a lot > > of integer values, i thought you referred to abs(3), because you saw also > > some issues with the integer computations in that file. so i thought you were > > referring to yet another issue in that file. > > Oh, I see! No, I was referring to a generic |a-b| expression, not > abs(3) specifically. Retrospectively, using |a-b| would've been better > :-) so wrapping fabs(3) inside a macro, like in the following example might work. cheers. alex ps: just a 60 second hack. ;) > > Cheers, > > -- > Igor --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tx_schedules.h.diff" Index: sys/dev/ath/ath_rate/sample/tx_schedules.h =================================================================== --- sys/dev/ath/ath_rate/sample/tx_schedules.h (revision 228164) +++ sys/dev/ath/ath_rate/sample/tx_schedules.h (working copy) @@ -40,6 +40,11 @@ #include __FBSDID("$FreeBSD$"); +#define TOLERANCE 0.00001 + +#define F(_r1, _r2)\ + ((fabs(_r1-_r2) < TOLLERANCE) ? 1 : 0) + #define A(_r) \ (((_r) == 6) ? 0 : (((_r) == 9) ? 1 : (((_r) == 12) ? 2 : \ (((_r) == 18) ? 3 : (((_r) == 24) ? 4 : (((_r) == 36) ? 5 : \ @@ -56,7 +61,7 @@ }; #define NA1(_r) \ - (((_r) == 6.5) ? 8 : (((_r) == 13) ? 9 : (((_r) == 19.5)? 10 : \ + ((F(_r, 6.5) ? 8 : (((_r) == 13) ? 9 : (((_r) == 19.5)? 10 : \ (((_r) == 26) ? 11 : (((_r) == 39) ? 12 : (((_r) == 52) ? 13 : \ (((_r) == 58.5)? 14 : (((_r) == 65) ? 15 : 0)))))))) #define NA2(_r) \ --8t9RHnE3ZwKMSgU+-- From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:43:26 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 18CFD106566B; Thu, 1 Dec 2011 00:43:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id B2EC08FC12; Thu, 1 Dec 2011 00:43:25 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1518835vbb.13 for ; Wed, 30 Nov 2011 16:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=cpkNzqkgqvQ65ldoa66tjcyD17TPrOiGXBspNaebt0Q=; b=YRiqMaowUiK2/xCGTmK1XYBViajJCx6RhNtCWhzhnBPM+BplZ0eqCx6IF4wZAZYlop ENEPvKPkY2O9gtYO4gOaTX3tG+wetEleX6P49YH+vVj++v1tovfNqCMeph7KhQoC/bod ytr7seUMQyfSkLeexr7LbeZm97cEFHTlqhzsI= MIME-Version: 1.0 Received: by 10.52.26.179 with SMTP id m19mr4024936vdg.95.1322700204944; Wed, 30 Nov 2011 16:43:24 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 16:43:24 -0800 (PST) In-Reply-To: <20111201003938.GA52503@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> Date: Thu, 1 Dec 2011 08:43:24 +0800 X-Google-Sender-Auth: kK885LPjlj3TnxnMWO6udPRVpSs Message-ID: From: Adrian Chadd To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:43:26 -0000 Erm, these aren't run-time comparisons though, these are done at compile time. They can be easily substituted with macro values, or just *100 values. Adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:47:28 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 84DCD106567F; Thu, 1 Dec 2011 00:47:28 +0000 (UTC) Date: Thu, 1 Dec 2011 00:47:28 +0000 From: Alexander Best To: Adrian Chadd Message-ID: <20111201004728.GA53601@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:47:28 -0000 On Thu Dec 1 11, Adrian Chadd wrote: > Erm, these aren't run-time comparisons though, these are done at compile time. > > They can be easily substituted with macro values, or just *100 values. right. my mistake. i think macro values would be better...simply multiplying them with 100 would cause collisions, when e.g. 650 mbs rates pop up in the future. cheers. alex > > > > Adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:49:25 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 872B0106566B; Thu, 1 Dec 2011 00:49:25 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1D5708FC14; Thu, 1 Dec 2011 00:49:24 +0000 (UTC) Received: by yenq9 with SMTP id q9so1811088yen.13 for ; Wed, 30 Nov 2011 16:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0/09BguyKsyyW6NlWg+9H5WxJ3LFE0FYI89Ut7mnlXw=; b=vvxK0yR9P/L4JkvZtJLVSnse7oW1+RA0ozJctsAywvPpwUIcnpjXqc5+Jl1XKJFDqk kePvyZDNJ9FLdPx87kbc+jzVx8bLH6IhRufTnwWDJ3VTDfH1YqmBPTlHdvtQOjWwSrr5 /Cs4WnCi7s7eFlCTCaZs7fgCOleMwYPA4/79M= Received: by 10.68.30.68 with SMTP id q4mr52490pbh.75.1322700564073; Wed, 30 Nov 2011 16:49:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 16:48:43 -0800 (PST) In-Reply-To: References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 00:48:43 +0000 Message-ID: To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: Alexander Best , freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:49:25 -0000 On 1 December 2011 00:43, Adrian Chadd wrote: > Erm, these aren't run-time comparisons though, these are done at compile time. Aren't they macro expansions: % gcc -E - #define NA1(_r) \ 59 (((_r) == 6.5) ? 8 : (((_r) == 13) ? 9 : (((_r) == 19.5)? 10 : \ 60 (((_r) == 26) ? 11 : (((_r) == 39) ? 12 : (((_r) == 52) ? 13 : \ 61 (((_r) == 58.5)? 14 : (((_r) == 65) ? 15 : 0)))))))) NA1(7) # 1 "" # 1 "" # 1 "" # 1 "" 59 (((7) == 6.5) ? 8 : (((7) == 13) ? 9 : (((7) == 19.5)? 10 : 60 (((7) == 26) ? 11 : (((7) == 39) ? 12 : (((7) == 52) ? 13 : 61 (((7) == 58.5)? 14 : (((7) == 65) ? 15 : 0)))))))) Cheers, -- Igor M :-) From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:53:53 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 C64D3106564A; Thu, 1 Dec 2011 00:53:53 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9D28FC15; Thu, 1 Dec 2011 00:53:53 +0000 (UTC) Received: by ggnk5 with SMTP id k5so1978909ggn.13 for ; Wed, 30 Nov 2011 16:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=a5MAnGYUG27npSjavC79moK8WdLYJ4dYOWv6rdI8j7M=; b=q3aA6hKbYh6hvexUBJEEOXJvr/WTbMLF6EyPEOcTH7bS3Ko9ehr2jHhZGoC0xKxd5Q VeOI5+V/FCvhOhX7ffuERFw5zbAIjMnd/MQ7QnSS/0W9FZdQan0A+/R/bVznhnUkN6pM ConUVKd5d4hE0s+WYxXn0LbxRuLGa9zjdcjwg= Received: by 10.68.55.103 with SMTP id r7mr153074pbp.41.1322700832080; Wed, 30 Nov 2011 16:53:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 16:53:11 -0800 (PST) In-Reply-To: References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 00:53:11 +0000 Message-ID: To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: Alexander Best , freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:53:53 -0000 On 1 December 2011 00:48, Igor Mozolevsky wrote: > On 1 December 2011 00:43, Adrian Chadd wrote: >> Erm, these aren't run-time comparisons though, these are done at compile time. Ignoring the late-night PEBKAC: % gcc -E -O2 - #define NA1(_r) \ (((_r) == 6.5) ? 8 : (((_r) == 13) ? 9 : (((_r) == 19.5)? 10 : \ (((_r) == 26) ? 11 : (((_r) == 39) ? 12 : (((_r) == 52) ? 13 : \ (((_r) == 58.5)? 14 : (((_r) == 65) ? 15 : 0)))))))) NA1(7); # 1 "" # 1 "" # 1 "" # 1 "" (((7) == 6.5) ? 8 : (((7) == 13) ? 9 : (((7) == 19.5)? 10 : (((7) == 26) ? 11 : (((7) == 39) ? 12 : (((7) == 52) ? 13 : (((7) == 58.5)? 14 : (((7) == 65) ? 15 : 0)))))))); It is entirely probable that the compiler might try to optimise that out if it knows the value, but then you'd be relying on the compiler knowing how to deal with floating point comparisons... Cheers, -- Igor From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 00:58:25 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 765F4106564A; Thu, 1 Dec 2011 00:58:25 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 21ECA8FC08; Thu, 1 Dec 2011 00:58:24 +0000 (UTC) Received: by ghbg20 with SMTP id g20so1979055ghb.13 for ; Wed, 30 Nov 2011 16:58:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=IIww6uW8CBrEHjkbCZgzWFf5W721aCuIo5tN+uxEmSg=; b=WrLMsSEAQXL5Azd1dIVxrnD43hA9fdfkOBaM1tPEf5L1LArHQDaR/FS4dyWeNM4Osb E8djLb+XXhtrsS/orCtFSipGr6X5wgwpcLJWkXSG2qSOthhK4tfywdc5cqHEWMd1KW1x O5zfvxtx8bI/JlJwtgHQhduDRUfEfokc09zfo= Received: by 10.68.25.170 with SMTP id d10mr284902pbg.7.1322701104079; Wed, 30 Nov 2011 16:58:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 16:57:43 -0800 (PST) In-Reply-To: <20111201003938.GA52503@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 00:57:43 +0000 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 00:58:25 -0000 On 1 December 2011 00:39, Alexander Best wrote: > so wrapping fabs(3) inside a macro, like in the following example might work. so long as you know that fabs(3) takes a double and you never need to down-cast from a long double :-) Cheers, -- Igor From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 01:00:57 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9D4C91065672; Thu, 1 Dec 2011 01:00:57 +0000 (UTC) Date: Thu, 1 Dec 2011 01:00:57 +0000 From: Alexander Best To: Igor Mozolevsky Message-ID: <20111201010057.GA54970@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 01:00:57 -0000 On Thu Dec 1 11, Igor Mozolevsky wrote: > On 1 December 2011 00:39, Alexander Best wrote: > > > so wrapping fabs(3) inside a macro, like in the following example might work. > > so long as you know that fabs(3) takes a double and you never need to > down-cast from a long double :-) depends how fast ath devices get. 100000000000000.5 mbps? :-P cheers. alex > > > Cheers, > > -- > Igor From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 01:04:54 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 4C706106564A; Thu, 1 Dec 2011 01:04:54 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id ECC418FC0A; Thu, 1 Dec 2011 01:04:53 +0000 (UTC) Received: by ggnk5 with SMTP id k5so1992329ggn.13 for ; Wed, 30 Nov 2011 17:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Z3AuoFNF37qyYRQv+JQkrnM0UFdmrZ54j8z6i5q4IUk=; b=kBuxvQCEeKLHA0g+d0XWMqWFT0dka1IQAvMi5Ma7gpBVir1HJXsvnMOumE4ge1lx+f GmsjyHzN4UCgvUwPc7Wcc1AZtTxFMlN5Cw7gTTF1zmxh4HQGe3ULkrowbr48fY+6q6yQ Y+0vZOhManEeSU6f0JN0XCKRX+FVUY4hn/DKY= Received: by 10.68.10.138 with SMTP id i10mr107025pbb.92.1322701493065; Wed, 30 Nov 2011 17:04:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.48.5 with HTTP; Wed, 30 Nov 2011 17:04:12 -0800 (PST) In-Reply-To: <20111201010057.GA54970@freebsd.org> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> <20111201010057.GA54970@freebsd.org> From: Igor Mozolevsky Date: Thu, 1 Dec 2011 01:04:12 +0000 Message-ID: To: Alexander Best Content-Type: text/plain; charset=UTF-8 Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 01:04:54 -0000 On 1 December 2011 01:00, Alexander Best wrote: > depends how fast ath devices get. 100000000000000.5 mbps? :-P "640K of memory should be enough for anybody", IPv4 address space? :-p Actually, having had a proper look at the file, I wonder whether the whole load of macros are necessary; in this specific case, it might seem sensible to just hard code the tables in a simpler (read: explicit) way... Cheers, -- Igor From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 02:44:33 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 283F81065672; Thu, 1 Dec 2011 02:44:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id BF2588FC08; Thu, 1 Dec 2011 02:44:32 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so1634265vcb.13 for ; Wed, 30 Nov 2011 18:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=1U9SVGbaUzbhHWvggeK/XJRSXpbyq05i/eSgOnlY9MI=; b=IUMeTTFgnFzYtsJ2xlIWTd4zK/KjpQBRgr/ZuK5GJqj/dTWYmyBM5q1ZmPtia7IYin oUNAc/ay42lMJjge/Tu355nAvWBVY9zJKBczIIScWAuJQOIzUZVTofTSeOOGYX06pRgV CpaW8bL75760PeC6RkjhUcs9DMrUeZvltEs04= MIME-Version: 1.0 Received: by 10.220.186.199 with SMTP id ct7mr878189vcb.114.1322707472109; Wed, 30 Nov 2011 18:44:32 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 18:44:32 -0800 (PST) In-Reply-To: References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> <20111201001158.GA48051@freebsd.org> <20111201003938.GA52503@freebsd.org> <20111201010057.GA54970@freebsd.org> Date: Thu, 1 Dec 2011 10:44:32 +0800 X-Google-Sender-Auth: xR9bvCw4GzqSORt7Ze36pEppDB4 Message-ID: From: Adrian Chadd To: Igor Mozolevsky Content-Type: text/plain; charset=ISO-8859-1 Cc: Alexander Best , freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Thu, 01 Dec 2011 02:44:33 -0000 The macros are just to be "clearer" about the TX rate. The values themselves aren't used - they . The speed/MCS is actually taken from the HAL rate tables, rather than this. This just assigns rate table indexes to the tx schedule table. I'll take patches to tidy it up by just changing them to macro definitions, so the tx schedule can be edited without having to keep looking at the rate index table. Since all of that is open source now, it's doable - it's just very tedious. :) (Sorry, I'm still relocating; my time for anything but email is very limited.) Adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 07:15:59 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 433E51065673 for ; Thu, 1 Dec 2011 07:15:59 +0000 (UTC) (envelope-from hapvbk@yahoo.co.uk) Received: from nm8.bullet.mail.ukl.yahoo.com (nm8.bullet.mail.ukl.yahoo.com [217.146.182.249]) by mx1.freebsd.org (Postfix) with SMTP id 85B5E8FC14 for ; Thu, 1 Dec 2011 07:15:58 +0000 (UTC) Received: from [217.146.183.182] by nm8.bullet.mail.ukl.yahoo.com with NNFMP; 01 Dec 2011 07:01:33 -0000 Received: from [77.238.184.67] by tm13.bullet.mail.ukl.yahoo.com with NNFMP; 01 Dec 2011 07:01:33 -0000 Received: from [127.0.0.1] by smtp136.mail.ukl.yahoo.com with NNFMP; 01 Dec 2011 07:01:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1322722893; bh=N9SqNvW0vQ5hif7iOeaHH2jIuC8EU9tTddxiq/+jKLg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:From:To:Cc:Subject:Date:MIME-Version:Content-Type:X-Priority:X-MSMail-Priority:Importance:X-Mailer:X-MIMEOLE; b=Ah2kA4LWalAYJW+3xLS2WMq4mhwbsDLg9GYFIvljQ57Sf5UebkzEc4Z/qRaXeACErJNj2bcN4jS/1zGd8tKG+MX3yoE+am3xTrgr/hGTe1lm2FS+HgnJeJcMQqK0+Zo/xCjWlWHDBzyQJ9k72/vidoXrx1ReuwKUhpj7VhlNJDQ= X-Yahoo-Newman-Id: 598653.56199.bm@smtp136.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: HdAK7D0VM1nju30lXuU9AuKM8Fv7BjEvffKkPt6YiFWtlNF tpG3jaNIY_QvJ3gg4ZF6yXfuywBEPv5Eow2Cq0yRaM3ZN0XYJZw.u_30tdZ8 WEqx0l4vdLpOGHi7kklSNzKLDuxRNC.D5ZJ1pmIPUP8bQAEOFdnyeWFRPQU5 XjIjjQCXwR15C9LGraPdr0i9_46Q2vlW7ksTmI8npGraIp19ps8187cMq7nA 7xCBfjaDAS6d4psEBMxqJauBIvbWSVxU2zmE06Ujpj1sYtLPVHdWIWjjL00h .8XJ0nUMe2zmhWlCbtTld2q7a_njoR1xsnVPJVXS.rc309wbe1_wqzltqgii 35H01CDuIGdNW4ZOgJ85cpP0rgW5QeHLjFzjjJINVrZhfm.2BskwPtPdmoZx cgv3_.7TTQAkLI2s4bhgDJqQ4WuWrfuyJwgSmd_kZgC9B X-Yahoo-SMTP: xBpCc9iswBApASleyiIs9lcZMA-- Received: from PC (hapvbk@66.11.191.2 with login) by smtp136.mail.ukl.yahoo.com with SMTP; 01 Dec 2011 07:01:33 +0000 GMT Message-ID: <214354BF8661405A81ABD036DEB3D0A2@PC> From: "Viet-Ha Pham" To: Date: Thu, 1 Dec 2011 02:01:30 -0500 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3538.513 X-MIMEOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Wifi througput test issue 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: Thu, 01 Dec 2011 07:15:59 -0000 I have posted this to freebsd-net mailing list. I repost it here. Thanks = for your attention.=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D 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, using CM9-GP as the Wifi NIC. We are testing AWGN channel. = So, the transmitter 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 of the cable.=20 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 Mbps 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.=20 When I switch the rate at the receiver, there are multiple message = displayed on the screen of the transmitter: "wlan0: = ieee80211_new_state_locked: pending RUN -> AUTH transition lost". This = message is repeated for many times (at least 20).=20 I repeated the test with all transmission rates, change the packet size = and still observe the same thing: a throughput improvement of about 30% = is observed 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 unicast rate at the receiver is set different from = the unicast rate at the transmitter.=20 This issue happened even when no noise is added. The objective of this = test is to measure the maximum throughput at each noise level for each = transmission rate. So we fix the rate, vary the noise and repeat the = procedure for all transmission rates.=20 I spent time to look at the kernel source codes but I did not find a = solid answer for this. Please help me to identify the problem and the = answer.=20 My question is:=20 1. Why do I have that throughput improvement when I switch the rate like = that?=20 2. Is it a bug in the driver?=20 3. What does the error/infor message on the transmitter mean?=20 Thank you so much.=20 HAPV From owner-freebsd-wireless@FreeBSD.ORG Thu Dec 1 17:13:21 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 CD65F1065675 for ; Thu, 1 Dec 2011 17:13:21 +0000 (UTC) (envelope-from cdk1@bsd.cl) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7158FC15 for ; Thu, 1 Dec 2011 17:13:21 +0000 (UTC) Received: by faak28 with SMTP id k28so2147885faa.13 for ; Thu, 01 Dec 2011 09:13:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.180.4.67 with SMTP id i3mr5577405wii.1.1322757763961; Thu, 01 Dec 2011 08:42:43 -0800 (PST) Received: by 10.180.103.137 with HTTP; Thu, 1 Dec 2011 08:42:43 -0800 (PST) Date: Thu, 1 Dec 2011 13:42:43 -0300 Message-ID: From: Carlos Corona To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Problem in FreeBSD 8.2 with Ralink 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: Thu, 01 Dec 2011 17:13:21 -0000 HI * I installed FreeBSD 8.2 amd64: FreeBSD Antonita 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41 /src/sys/GENERIC amd64 The ethernet is configured: re0: flags=8843 metric 0 mtu 1500 ether 68:b5:99:d3:ab:61 inet 200.104.116.57 netmask 0xffffff00 broadcast 200.104.116.255 media: Ethernet autoselect (100baseTX ) status: active But not Wireless :( re0@pci0:1:0:0: class=0x020000 card=0x1611103c chip=0x816810ec rev=0x06 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)' class = network subclass = ethernet none1@pci0:2:0:0: class=0x028000 card=0x1637103c chip=0x539f1814 rev=0x00 hdr=0x00 vendor = 'Ralink Technology, Corp.' class = network I have HP Pavilion DM1, any idea? thx* From owner-freebsd-wireless@FreeBSD.ORG Fri Dec 2 02:40:09 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 A59711065670 for ; Fri, 2 Dec 2011 02:40:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 517868FC13 for ; Fri, 2 Dec 2011 02:40:09 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3147660vbb.13 for ; Thu, 01 Dec 2011 18:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KXf3RWROf0yxFKnID0fHN190go3H8i/xnCbkeh6UuWs=; b=cn9Ig7anNdM06uzj1iHmUI5wtyG2s6UGbQAXIT+PqzxMwlB+zGg2ISw7YA3yziwO89 k81Q6g29VXgTZXua35OTIksh8KoHz6uxV7Hf3oydvBoe64N7Vqte4jPL29LSU0t+xmeR /InX+866ucnE9YmCu+Kh9PfsW53PZGJOOLvNY= MIME-Version: 1.0 Received: by 10.52.177.34 with SMTP id cn2mr8655162vdc.34.1322793608439; Thu, 01 Dec 2011 18:40:08 -0800 (PST) Received: by 10.52.109.10 with HTTP; Thu, 1 Dec 2011 18:40:08 -0800 (PST) In-Reply-To: <4ED3B4D1.3020701@entel.upc.edu> References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> <4ED3B4D1.3020701@entel.upc.edu> Date: Fri, 2 Dec 2011 10:40:08 +0800 Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Gustau_P=E9rez?= Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 02 Dec 2011 02:40:09 -0000 Hi, Thanks for this. I'm still moving. Poke me about this after December 15. Also, please file a PR with everything that you've said and gathered to date, including the attachments. That way it doesn't get lost in my big collection of email :) Thanks, Adrian From owner-freebsd-wireless@FreeBSD.ORG Fri Dec 2 02:50:53 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 D8FA1106564A for ; Fri, 2 Dec 2011 02:50:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 900578FC0A for ; Fri, 2 Dec 2011 02:50:53 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so3161927vcb.13 for ; Thu, 01 Dec 2011 18:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Id73D8AuG9gzeQUsClK/B7Y8vW6ECJDX7SkhsPX3B2w=; b=wCnWjunTpQwkvfBmLgLy6xQVfjR4IlVUtIHVyy1Yf59n+y/65GF9+RttTsZYwDGV73 4K88rfqPDpj35v2LaqNX0/zD8Py3NXhdrPjVWnm0B4NcuKvlcX3ciPmV5ip6zZwA48b9 N2bOuG950/KtZfGh1GT3PpEg33gIrBY4e2btg= MIME-Version: 1.0 Received: by 10.52.94.227 with SMTP id df3mr8710013vdb.51.1322794252696; Thu, 01 Dec 2011 18:50:52 -0800 (PST) Received: by 10.52.109.10 with HTTP; Thu, 1 Dec 2011 18:50:52 -0800 (PST) In-Reply-To: <4ED3B4D1.3020701@entel.upc.edu> References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> <4ED3B4D1.3020701@entel.upc.edu> Date: Fri, 2 Dec 2011 10:50:52 +0800 Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Gustau_P=E9rez?= Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 02 Dec 2011 02:50:53 -0000 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. 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. (then wlandebug -i wlan0 0 to disable it all.) Thanks, Adrian From owner-freebsd-wireless@FreeBSD.ORG Fri Dec 2 03:55:49 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 DDBAB106566C; Fri, 2 Dec 2011 03:55:49 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 4AC418FC0A; Fri, 2 Dec 2011 03:55:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id pB23XhkU091352; Fri, 2 Dec 2011 14:33:43 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 2 Dec 2011 14:33:43 +1100 (EST) From: Ian Smith To: Alexander Best In-Reply-To: <20111201000243.GB44877@freebsd.org> Message-ID: <20111202142524.V3548@sola.nimnet.asn.au> References: <20111130224422.GA36424@freebsd.org> <20111201000243.GB44877@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-wireless@freebsd.org Subject: Re: comparing floating points via "==" or "!=" 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: Fri, 02 Dec 2011 03:55:49 -0000 On Thu, 1 Dec 2011, Alexander Best wrote: > On Wed Nov 30 11, Igor Mozolevsky wrote: > > On 30 November 2011 22:44, Alexander Best wrote: > > > > > i played a bit with the gcc -Wfloat-equal warning and noticed that inside > > > sys/dev/ath/ath_rate/sample/tx_schedules.h, a lot of comparisons of floating > > > points are happening ("=="). is there a better way to deal with this? > > > > as opposed to (abs(a-b) < tolerance)? > > fabs(3) actually, or some other way, e.g. described in: > > http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm Bookmarked, thanks. Very good article, and I never knew IEEE floats could be compared as integers! OT for wireless, but very useful for some astronomical stuff I'm working on .. in Pascal, no less :) cheers, Ian From owner-freebsd-wireless@FreeBSD.ORG Sat Dec 3 06:08:42 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 16643106566C for ; Sat, 3 Dec 2011 06:08:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id CADAC8FC12 for ; Sat, 3 Dec 2011 06:08:41 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4541572vcb.13 for ; Fri, 02 Dec 2011 22:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=eH60qK5w9c1Wuns0xcIHWTs3edMkKzI1kenr3ZWlxN8=; b=pqNNtgm5QikKa4uDmPoPWwLa7S8bj4t5IGGCf4NRAfnxl1elIZkdZ3OmimF91hSHkZ u0jhQ7VgsV0Sy9nj+pFmBAJmTYiGuVlkYGj3v+0tM29Am+Wk6WQWTtERmqpbzuCg0YAV HpNuSxhQUpdkJ+ne6ma2Lq8iMrNhRFSrrBHbk= MIME-Version: 1.0 Received: by 10.52.94.227 with SMTP id df3mr774347vdb.51.1322892521048; Fri, 02 Dec 2011 22:08:41 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Fri, 2 Dec 2011 22:08:41 -0800 (PST) In-Reply-To: References: Date: Sat, 3 Dec 2011 14:08:41 +0800 X-Google-Sender-Auth: fpI5eMP0_GmYJU7Yr3yk-dfM48s Message-ID: From: Adrian Chadd To: Carlos Corona Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: Problem in FreeBSD 8.2 with Ralink 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 06:08:42 -0000 There's likely no support for that in FreeBSD-HEAD just yet. Ralink hackers, how's it going? Adrian From owner-freebsd-wireless@FreeBSD.ORG Sat Dec 3 14:00:25 2011 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58143106564A for ; Sat, 3 Dec 2011 14:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2C68FC13 for ; Sat, 3 Dec 2011 14:00:25 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pB3E0PPI001107 for ; Sat, 3 Dec 2011 14:00:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pB3E0PfU001105; Sat, 3 Dec 2011 14:00:25 GMT (envelope-from gnats) Date: Sat, 3 Dec 2011 14:00:25 GMT Message-Id: <201112031400.pB3E0PfU001105@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Alexander Best Cc: Subject: Re: kern/162475: [ath] functions with return type HAL_BOOL (might) return HAL_STATUS X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Best 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 14:00:25 -0000 The following reply was made to PR kern/162475; it has been noted by GNATS. From: Alexander Best To: bug-followup@freebsd.org Cc: Subject: Re: kern/162475: [ath] functions with return type HAL_BOOL (might) return HAL_STATUS Date: Sat, 3 Dec 2011 13:55:34 +0000 here are two more examples: /usr/subversion-src/sys/dev/an/if_an.c:800:41: warning: implicit conversion from enumeration type 'enum ieee80211_phytype' to different enumeration type 'enum ieee80211_phymode' [-Wconversion] mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS); ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~ /usr/subversion-src/sys/dev/an/if_an.c:3302:30: warning: implicit conversion from enumeration type 'enum ieee80211_phytype' to different enumeration type 'enum ieee80211_phymode' [-Wconversion] status.an_current_tx_rate, IEEE80211_T_DS); ^~~~~~~~~~~~~~ 2 warnings generated. ..also fixing these would make the entire kernel code "-Wconversion"-clean, i believe. cheers. alex 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 From owner-freebsd-wireless@FreeBSD.ORG Sat Dec 3 16:22:52 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 7C7EC106564A for ; Sat, 3 Dec 2011 16:22:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC688FC08 for ; Sat, 3 Dec 2011 16:22:51 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4842933vcb.13 for ; Sat, 03 Dec 2011 08:22:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=2tQ/+fdIOcuXcAKPedPYvgS5bdwz+yi4vOPass1Ll+Q=; b=Cx2J1qyDoZwZqb/QQ2K4fxJhez7AM8Dlju9ERX4mprwFxO96azTHznlwQN0QLqjSVe JQolpZflD3PuoUFB/MjZrdMG26Smy/sLJk/Ec0+1jqV6SOf7ZVeJ2UEmPiLW7mC4WxDA DcHwXhwU26JKxMNlqVKW4JLl7p8DnfL/GPErU= MIME-Version: 1.0 Received: by 10.220.228.200 with SMTP id jf8mr314137vcb.105.1322929371462; Sat, 03 Dec 2011 08:22:51 -0800 (PST) Received: by 10.52.109.10 with HTTP; Sat, 3 Dec 2011 08:22:51 -0800 (PST) In-Reply-To: <4EDA4BBA.6010203@entel.upc.edu> References: <3d4d2d249836fafc6acd885693c02198@webmail.entel.upc.edu> <4ECFCDAB.1080407@entel.upc.edu> <4ED3B4D1.3020701@entel.upc.edu> <4EDA4BBA.6010203@entel.upc.edu> Date: Sun, 4 Dec 2011 00:22:51 +0800 Message-ID: From: Adrian Chadd To: =?ISO-8859-1?Q?Gustau_P=E9rez?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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:22:52 -0000 2011/12/4 Gustau P=E9rez : > =A0 I see nothing particular in my dmesg with wlandebug enabled. I see th= e > AR5416 complaining about a beacon off-channel for a MAC I don't know abou= t. > I also see the iphone's MAC going power save with a message like this: > > =A0 =A0 =A0 =A0 =A0 =A0 power save mode on, 2 sta's in ps mode Well, it _is_ doing power saving, which I expected. This doesn't at all correlate with the periodicity of the issue? > =A0I also see all of those messages with a pre r227364 kernel, so I would= say > they are harmless and not related to the issue. *nod* I'm just looking if they correlate timewise with the growing latency.= . > =A0However, I see these the following entries in my dmesg when using r227= 364: > > =A0 =A0 =A0 =A0Dec =A03 16:46:27 harkserver kernel: Timeout while waiting= for nf > =A0 =A0 =A0 =A0to load: AR_PHY_AGC_CONTROL=3D0x41d1a > =A0 =A0 =A0 =A0Dec =A03 16:46:27 harkserver kernel: Timeout while waiting= for nf > =A0 =A0 =A0 =A0to load: AR_PHY_AGC_CONTROL=3D0x41d1a > > =A0 =A0 =A0 =A0Dec =A03 16:18:27 harkserver kernel: ar5416PerCalibrationN= : NF > > =A0 =A0 =A0 =A0calibration didn't finish; delaying CCA > =A0 =A0 =A0 =A0Dec =A03 16:18:27 harkserver kernel: ar5416PerCalibrationN= : NF > > =A0 =A0 =A0 =A0calibration didn't finish; delaying CCA > > =A0I don't see those messages with a previous revision because they appea= r to > be part of r227364. Those problems appear from time to time, could they a= nd > the latency increase be related? That could be related. If the device thinks the air is constantly busy (or it's spending a lot of time trying to TX) then it may fail NF calibration. I just wonder what I've changed which may be causing the NIC to behave this= way. What's interesting (!) is that I have seen similar reports with ath9k in Linux. I wonder if part of the 11n work (that ath9k has also borrowed) has the same broken behaviour on the AR5416. Can you please file all of this in the PR? I'll have finished moving by December 15 so I can start trying to replicate this issue and help you debug it. Thanks, Adrian From owner-freebsd-wireless@FreeBSD.ORG Sat Dec 3 17:47: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 697FB106566B for ; Sat, 3 Dec 2011 17:47:17 +0000 (UTC) (envelope-from gperez@entel.upc.edu) Received: from dash.upc.es (dash.upc.es [147.83.2.50]) by mx1.freebsd.org (Postfix) with ESMTP id D5B5B8FC0C for ; Sat, 3 Dec 2011 17:47:16 +0000 (UTC) Received: from ackerman2.upc.es (ackerman2.upc.es [147.83.2.244]) by dash.upc.es (8.14.1/8.13.1) with ESMTP id pB3HlDox031382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 3 Dec 2011 18:47:14 +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 pB3HlC6k021105 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 3 Dec 2011 18:47:13 +0100 Message-ID: <4EDA609F.2080401@entel.upc.edu> Date: Sat, 03 Dec 2011 18:47:11 +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> <4EDA4BBA.6010203@entel.upc.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 (dash.upc.es [147.83.2.50]); Sat, 03 Dec 2011 18:47:14 +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 17:47:17 -0000 On 03/12/2011 17:22, Adrian Chadd wrote: > 2011/12/4 Gustau Pérez: > >> 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 > Well, it _is_ doing power saving, which I expected. This doesn't at > all correlate with the periodicity of the issue? No it doesn't. The period of the issue was 0.1sec, because it happens after 10 pings and the time between pings was 0.01 seconds. During the tests the power save mode message only appeared 4 times, and they did during a second and then never appeared again. As I was doing 5 times 6000 pings and the problem repeats every 10 pings, I would have expected the message about 5*600 times. So I would say they don't correlate at all. During normal operation the power save mode on also appears. Other stations also trigger that message. > >> 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? > That could be related. If the device thinks the air is constantly busy > (or it's spending a lot of time trying to TX) then it may fail NF > calibration. > I just wonder what I've changed which may be causing the NIC to behave this way. > > What's interesting (!) is that I have seen similar reports with ath9k > in Linux. I wonder if part of the 11n work (that ath9k has also > borrowed) has the same broken behaviour on the AR5416. Well, if they did have that issue, maybe we could also borrow their solution. Did they fix the issue. Do you have any link I could read and try while you finish unpacking yourself :) ? > Can you please file all of this in the PR? I'll have finished moving > by December 15 so I can start trying to replicate this issue and help > you debug it. > > You can count on this. I'll fill the PR with the collected info. It may get quite long, so maybe I'll fill it tomorrow. Thanks, Gus