From owner-freebsd-wireless@FreeBSD.ORG Sun May 27 20:56:12 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D410106566C; Sun, 27 May 2012 20:56:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1109D8FC0C; Sun, 27 May 2012 20:56:12 +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 q4RKuBDZ025118; Sun, 27 May 2012 20:56:11 GMT (envelope-from rpaulo@freefall.freebsd.org) Received: (from rpaulo@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4RKuBYw025114; Sun, 27 May 2012 20:56:11 GMT (envelope-from rpaulo) Date: Sun, 27 May 2012 20:56:11 GMT Message-Id: <201205272056.q4RKuBYw025114@freefall.freebsd.org> To: rpaulo@FreeBSD.org, adrian@FreeBSD.org, freebsd-wireless@FreeBSD.org From: rpaulo@FreeBSD.org Cc: Subject: Re: kern/168393: AR9285: suspend/resume sometimes fails 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: Sun, 27 May 2012 20:56:12 -0000 Synopsis: AR9285: suspend/resume sometimes fails Class-Changed-From-To: doc-bug->sw-bug Class-Changed-By: rpaulo Class-Changed-When: Sun May 27 20:55:36 UTC 2012 Class-Changed-Why: Fix the class. Responsible-Changed-From-To: adrian->freebsd-wireless Responsible-Changed-By: rpaulo Responsible-Changed-When: Sun May 27 20:55:36 UTC 2012 Responsible-Changed-Why: To wireless. http://www.freebsd.org/cgi/query-pr.cgi?pr=168393 From owner-freebsd-wireless@FreeBSD.ORG Mon May 28 04:04:15 2012 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 C0B0B106564A for ; Mon, 28 May 2012 04:04:15 +0000 (UTC) (envelope-from ledbulbs15@gmail.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id 97B198FC08 for ; Mon, 28 May 2012 04:04:15 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SYrBm-0007mp-O3 for freebsd-wireless@freebsd.org; Sun, 27 May 2012 21:04:14 -0700 Date: Sun, 27 May 2012 21:04:14 -0700 (PDT) From: reledtubes To: freebsd-wireless@freebsd.org Message-ID: <1338177854735-5712744.post@n5.nabble.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: ath updates - AR5416 (and later) LED fixes 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 May 2012 04:04:15 -0000 I had an incident and ran over one of my LED tubes. The lights are fine but i need a new tube which is water proof... anyone know where i can buy just a tube? store is preferred but i will order if needed??? thanks!!! ----------------------------------------------------------------------------------- http://www.ledlightonsale.com/ LED Tubes http://www.ledlightonsale.com/catalog/led-bulbs led bulbs lights http://www.ledlightonsale.com/catalog/dimmable-led-lights Dimmable LED Lights -- View this message in context: http://freebsd.1045724.n5.nabble.com/ath-updates-AR5416-and-later-LED-fixes-tp5096773p5712744.html Sent from the freebsd-wireless mailing list archive at Nabble.com. From owner-freebsd-wireless@FreeBSD.ORG Mon May 28 11:07:41 2012 Return-Path: Delivered-To: freebsd-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0D04106566C for ; Mon, 28 May 2012 11:07:41 +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 CA4328FC0C for ; Mon, 28 May 2012 11:07:41 +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 q4SB7fAj063530 for ; Mon, 28 May 2012 11:07:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4SB7fYg063528 for freebsd-wireless@FreeBSD.org; Mon, 28 May 2012 11:07:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 May 2012 11:07:41 GMT Message-Id: <201205281107.q4SB7fYg063528@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 May 2012 11:07:42 -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/168393 wireless AR9285: suspend/resume sometimes fails o kern/168170 wireless [net80211] ieee80211_send_bar() doesn't complete corre o kern/167870 wireless [ath] adhoc wifi client does not join an existing IBSS o kern/167834 wireless [ath] kickpcu; 'handled 0 packets' o kern/167828 wireless [iwn] iwn(4) doesn't recover automatically after firmw o kern/167798 wireless ifconfig(8): problem with "ifconfig list scan" command o kern/167491 wireless [ath] TID != hardware queue TID in ath_tx_aggr_comp_ag o kern/167113 wireless [ath] AR5210: "stuck" TX seems to be occuring, without o kern/167080 wireless [ath] channel switch on another VAP break channel setu o kern/166684 wireless [ath] [net80211] mgmtrate/mcastrate isn't updated base p kern/166642 wireless [ieee80211] [patch] in 802.11n mode for FreeBSD AP, ha o kern/166641 wireless [ieee80211] [patch] mbuf/cluster leak in AP mode in 80 p kern/166357 wireless [ath] 802.11n TX stall when the first frame in the BAW o kern/166286 wireless [net80211] [ath] initial switch to HT40 isn't causing p kern/166190 wireless [ath] TX hangs and frames stuck in TX queue o kern/166086 wireless [Patch][ath] Reflect state of rfkill switch in a sysct o kern/165969 wireless [ath] Slower performance in adhoc mode vs Client/AP mo o kern/165966 wireless [ath] ath0: device timeout on SMP machines due to race o kern/165895 wireless [ath] overly busy cabq can tie up all tx buffers o kern/165870 wireless [bwn] bwn driver does not attach on HP Pavilion dv9420 o kern/165866 wireless [ath] TX hangs, requiring a "scan" to properly reset t o kern/165849 wireless [ath] [hang] network ath driver freeze o kern/165595 wireless [ipw] ipw(4): Can't load firmare for ipw2200bg o kern/165543 wireless [ath] ath0 endless scanning of channels without connec o kern/165517 wireless [net80211] bgscan isn't triggered when invalid beacons o kern/165475 wireless [ath] operational mode change doesn't poke the underly o kern/165382 wireless [kernel] taskqueue_unblock doesn't unblock currently q o kern/165306 wireless [ath] race conditions between scanning and beacon time o kern/165220 wireless [ath] "ath_rx_tasklet: sc_inreset_cnt > 0; skipping" m o kern/165214 wireless [ieee80211] Kernel panic in ieee80211_output.c:2505 o kern/165212 wireless [ath] No WiFi on Acer Aspire One 751h (Atheros AR5BHB6 o kern/165149 wireless [ath] [net80211] Ping with data length more than iv_fr o kern/165146 wireless [net80211] Net802.11 Fragment number is assigned 1 (sh o kern/165060 wireless [ath] vap->iv_bss race conditions causing crashes insi o kern/165021 wireless [ath] ath device timeout during scan/attach, if wlan_c o kern/164951 wireless [ath] [patch] Problem build of if_ath driver with cert o kern/164721 wireless [ath] ath device timeouts o kern/164499 wireless [wi] [patch] if_wi needs fix for big endian architectu o kern/164382 wireless [ath] crash when down/deleting a vap - inside ieee8021 o kern/164365 wireless [iwi] iwi0: UP/DOWN in o bin/164102 wireless hostapd not configured for 802.11n o kern/163759 wireless [ath] ath(4) "stops working" in hostap mode o kern/163724 wireless [mwl] [patch] NULL check before dereference o kern/163719 wireless [ath] ath interface do not receive multicast o kern/163689 wireless [ath] TX timeouts when sending probe/mgmt frames durin o kern/163574 wireless [net80211] overly-frequent HT occupancy changes o kern/163573 wireless [ath] hostap mode TX buffer hang o kern/163559 wireless [ath] kernel panic AH_DEBUG o kern/163318 wireless [ath] ath(4) stops working p kern/163312 wireless [panic] [ath driver] kernel panic: page fault with ath o kern/163237 wireless [ath] AR5416 as HostAP. Delays among clients when a cl o kern/163082 wireless [ath] ar9285 diversity fixes o kern/162648 wireless [ath] AR9227 ADC DC calibration failure o kern/162647 wireless [ath] 11n TX aggregation session / TX hang 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/146426 wireless [mwl] 802.11n rates not possible on mwl o kern/146425 wireless [mwl] mwl dropping all packets during and after high u 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 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 107 problems total. From owner-freebsd-wireless@FreeBSD.ORG Tue May 29 20:37:28 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F581106566B for ; Tue, 29 May 2012 20:37:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id CBB468FC08 for ; Tue, 29 May 2012 20:37:27 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so6764471pbb.13 for ; Tue, 29 May 2012 13:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=vM3rWo1Q1S/pPmI+k8OfdXyrEwJToLonVFye/O2q7Xg=; b=Jxu58htKNOIFu7PvH2Tj7f6eO6XhL3FkUWsYuJLTvzleW4VsSlGG3Um4ZV7/tGOEcD wNILz8WX/Txm97VDI+IU/vcMww/hGNpzRRxzkUs5Awr2MINBVjDemUhMILpvCGJB3PSV X5kLPHWraOixCQK2t6xOqjO0NcO8smWq1zdxrOSi/T67xXo4Sg/mDN/F6HNKKaT1cE7n fG65CBQ/gBVzVd0+VPvgPj4pWb781P6IAVSyDBdPhbmJ4n36Ywv1HMOtlqTqCU4VwZ08 ZswuQO9tvrP6Ml174xQRD1aQd77IdoMGAnpF6xxicv9PZXD8H7Ks/YaNEqgYDfOc2MEk Tmew== MIME-Version: 1.0 Received: by 10.68.234.35 with SMTP id ub3mr42028192pbc.8.1338323847245; Tue, 29 May 2012 13:37:27 -0700 (PDT) Received: by 10.142.203.2 with HTTP; Tue, 29 May 2012 13:37:27 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 13:37:27 -0700 Message-ID: From: Adrian Chadd To: Monthadar Al Jaberi Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: ifconfig txpower and ni->ni_txpower are disconnected? 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 May 2012 20:37:28 -0000 [punting to -wireless, as we should really have an open discussion about this kind of thing] On 29 May 2012 12:04, Monthadar Al Jaberi wrote: > Hi > > I have been testing the txpower power thing abit, and I noticed > something. Thought I hear what you think before I patch. I have tested > with Witness/Invariants and didnt get any warning messages. Ok, good. Let's just do a final review of what's going on with that code path before we commit it. > The thing is this: > > ifconfig wlan0 txpower controls global txpower. Its the device limit. > > ifconfig wlan0 statxpower controls txpower for frames associated to a node. > > But I am missing a txpower that controls boradcast frames. Would you > see it logical if I implement something like > > ifconfig wlan0 statxpower FF:FF:FF:FF:FF:FF ?? > > > for now beacons are sent with max txpower, which I can change by > ifconfig txpower. But I want to control broadcast message Right. So this is where things get a bit "special". Is this global or per-vap? Ie, do you want to be able to set the TX power for multicast and beacon traffic per-VAP or just per-interface? I think I'm at the point where I'd better just implement per-packet TPC on the 11n chips so we at least have something to test with. Adrian From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 1 07:46:02 2012 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 D9F98106564A; Fri, 1 Jun 2012 07:46:02 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3BC8FC12; Fri, 1 Jun 2012 07:46:02 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so2783188pbb.13 for ; Fri, 01 Jun 2012 00:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=fUrxBai8IanPq9d7CZuGpDA9MEUWiH3PmS6IE84TuMs=; b=Rr69UdW822DLCZccTQiel7YzAL231FB6eE4OPfQQML3U97zuN8Tc9TVgtXjUdtTHPE I8K2ijkltlfWmYf+YVj5++Zr00Ni3ozjEu59wSLMbhdCFKeBhJrjyzDxHkqsfcO5jYFC p3d5i+HdAhMx9IGgUlBeLBPQivA48uK/b4xbXMsLcnpSpYUj2IYVPD23pi4AfZvtMSJb JqfiXB3npI/Ak6hZBdmOoatIi5zvpE0po1A2X0KnkzCwRtdEaMOhJ+zFDzGbVGcgGJkZ WWcnL3jAG/mf2F/izgAVc+yhIFoGtgQUjpwr3DvXOOElMKd3tMHzy+jjJtxdh+CGeQ3C l6dQ== MIME-Version: 1.0 Received: by 10.68.135.201 with SMTP id pu9mr7516597pbb.146.1338536762123; Fri, 01 Jun 2012 00:46:02 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Fri, 1 Jun 2012 00:46:02 -0700 (PDT) Date: Fri, 1 Jun 2012 00:46:02 -0700 X-Google-Sender-Auth: Fch6zSN3RyKHCEY0JIZEdj8yVJE Message-ID: From: Adrian Chadd To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: if_start / if_transmit handling and packet ordering - how can I guarantee it? 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, 01 Jun 2012 07:46:03 -0000 Hi all, I've been pushing my ath 11n driver hard (250Mbit UDP) and I've found a rather interesting behaviour, at least on my SMP machine. I'm running single direction UDP iperf tests. This is all on stable/9, with -head ath/net80211 stacks. The receiver logs about 40/20000 frames a second as being "out of order". The net80211 stack and ath software TX aggregation path isn't reordering frames. So I reviewed the code again and I wondered - is what I'm doing with ath_start() and the TX side locking allowing for multiple ath_start() invocations to occur, where they interleave processing frames? The short answer is yes. Then, something else hit me - I wondered whether ath_start() itself is being preempted by the ath taskqueue (say, doing RX, or TX completion) - where ath_start() is then called. Ie; * iperf -> sendto() -> socket layer -> net80211 ieee80211_start() -> if_transmit -> if_start() -> ath_start() And then an interrupt coming in, during ath_start() having dequeued a frame, but before it had placed it on any hardware/software queue: * ath0 taskqueue -> ath_tx_proc() (tx completion) -> ath_start() Or, similarly, CPU #0 running iperf, CPU #1 running the ath taskqueue, and one or the other being preempted by something higher priority (eg an interrupt coming in) between having removed a frame from the ifnet queue and it being thrown into the software/hardware queue. The ath driver locking only holds the TX locks as long as is needed to do individual TX queue operations (ie, queue a frame to the software / hardware queue) rather than holding it for the entirety of the TX path. Because of this, I wonder if preemption is possibly causing issues. So I then went grovelling through ixgbe to see what it does with if_transmit. It holds the TX lock for that particular NIC hardware queue for the entirety of: * a TX to hardware operation (which can be an individual frame queue, or servicing the whole bufring contents); * completing the frames via _txeof(), until nothing more needs to be done. So by holding the TX lock for the entirety of the queue operation, it means that any other entries into that particular TX path for that NIC queue will stall, waiting for the lock, and thus effectively be serialised, avoiding my initial issue. Any TX completion which leads to further transmissions from the bufring (and simultaneous incoming TX frames) will block each other. Ok, so now that I've mostly tried to lucidly dump what's going on- what do people think about holding the locks for (potentially) so long? I know iwn(4) holds the driver lock for as long as it can for _everything_, so it avoids this issue. But again, I don't really like the idea of holding a lock for this long. Does anyone else have any other ideas? FWIW - I temporarily converted the ath driver to make ath_start() enqueue a taskqueue task, which then did all of the TX inside the taskqueue. This serialised with TX completion and RX, which can also start TX; and all of my out of order issues went away. I unfortunately then become very, very susceptible to scheduling latency (hence my initial post about KTR, SMP, preemption and what looks to be like Cx/idle/powerd issues. If I run my laptop (Lenovo T60) with all the power/Cx stuff disabled, I can quite happily sustain 240-250MBit of UDP without any reordering or packet latency. Thanks in advance (and phew!) Adrian From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 1 07:58:50 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DC5210657A8 for ; Fri, 1 Jun 2012 07:58:50 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 22D8F8FC1C for ; Fri, 1 Jun 2012 07:58:49 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1SaMkz-0005yR-2e for freebsd-wireless@freebsd.org; Fri, 01 Jun 2012 08:58:49 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1SaMky-0006W4-TW for freebsd-wireless@freebsd.org; Fri, 01 Jun 2012 08:58:48 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q517wmjh099501 for ; Fri, 1 Jun 2012 08:58:48 +0100 (BST) (envelope-from mexas@bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q517wm1A099500 for freebsd-wireless@freebsd.org; Fri, 1 Jun 2012 08:58:48 +0100 (BST) (envelope-from mexas@bris.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bris.ac.uk using -f Date: Fri, 1 Jun 2012 08:58:48 +0100 From: Anton Shterenlikht To: freebsd-wireless@freebsd.org Message-ID: <20120601075848.GA99316@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: bwn0: RX decryption attempted (old 0 keyidx 0x1) 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, 01 Jun 2012 07:58:50 -0000 I've this card: >From pciconf -lv: siba_bwn0@pci0:48:0:0: class=0x028000 card=0x1371103c chip=0x431214e4 rev=0x02 hdr=0x00 vendor = 'Broadcom Corporation' device = 'BCM4311 802.11a/b/g' class = network >From dmesg: siba_bwn0: mem 0xc8100000-0xc8103fff irq 18 at device 0.0 on pci48 siba_bwn0: unsupported coreid (USB 1.1 Host) bwn0 on siba_bwn0 bwn0: WLAN (chipid 0x4311 rev 13) PHY (analog 4 type 2 rev 9) RADIO (manuf 0x17f ver 0x2050 rev 2) bwn0: DMA (64 bits) bwn0: Using 1 MSI messages bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a) bwn0: status of RF switch is changed to OFF bwn0: please turn on the RF switch bwn0: need multicast update callback bwn0: need multicast update callback bwn0: need multicast update callback bwn0: RX decryption attempted (old 0 keyidx 0x1) bwn0: RX decryption attempted (old 0 keyidx 0x1) >From ifconfig: bwn0: flags=8843 metric 0 mtu 2290 ether 00:1a:73:e1:46:79 nd6 options=29 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated wlan0: flags=8843 metric 0 mtu 1500 ether 00:1a:73:e1:46:79 inet 192.168.1.105 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=29 media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g status: associated ssid lagartixa channel 11 (2462 MHz 11g) bssid 00:18:39:e6:46:b6 country US authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 30 bmiss 7 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme roaming MANUAL This is mini-pci (?) card. It works ok, but I'm swamped with bwn0: RX decryption attempted (old 0 keyidx 0x1) messages on the console. I suspect that something is not right. Please advise Many thanks -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-wireless@FreeBSD.ORG Fri Jun 1 23:10:18 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3FB41065675 for ; Fri, 1 Jun 2012 23:10:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8777B8FC14 for ; Fri, 1 Jun 2012 23:10:18 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so3849831pbb.13 for ; Fri, 01 Jun 2012 16:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=nYoGs8sQz3SEFIrhuVmU0B7gARDMQXRUVna+nNEmG9E=; b=e3ijppnUEieM5N0ImzDdwEhc4QEn06JoznacmoqfZp3iRWtv4/0ObztGcwbMeVjDW8 V3tyGDfLpfxOMtJ0Rg0MKRaXldGNi/DsLfs2NK8nySzNio2AnCxJR0KpLh3Qn1PVmUkj KXYPiyaiNq8P1nayfFfZvv4SYRw9E+4sf96K2c9VsJo8BYbHVnZnYMM6E6EYQYajCEx+ 0CtJldUfZ/74jM/WKy0MkkQLAvHt62lcx2SXRKvFEJRslBYJ/D7oNUMWiFZYRkozeK47 TyuwYUu/yBqPp3St5/tF3138qBYQEJLsGPalvyoHBugmvR6nHFwJZx7Gwvs2MqZPGHvo ue+A== MIME-Version: 1.0 Received: by 10.68.211.170 with SMTP id nd10mr14205256pbc.68.1338592218055; Fri, 01 Jun 2012 16:10:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.203.2 with HTTP; Fri, 1 Jun 2012 16:10:18 -0700 (PDT) In-Reply-To: <20120601075848.GA99316@mech-cluster241.men.bris.ac.uk> References: <20120601075848.GA99316@mech-cluster241.men.bris.ac.uk> Date: Fri, 1 Jun 2012 16:10:18 -0700 X-Google-Sender-Auth: KMv4ywXH7YzmDNpX-o0McTjoCig Message-ID: From: Adrian Chadd To: Anton Shterenlikht Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: bwn0: RX decryption attempted (old 0 keyidx 0x1) 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, 01 Jun 2012 23:10:18 -0000 Hi, I had a quick check. It doesn't look like BWN_RX_MAC_DEC is actually an error? MAC_DECERR is much more likely an error. Just comment that printf out? adrian From owner-freebsd-wireless@FreeBSD.ORG Sat Jun 2 09:11:22 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7909D1065672 for ; Sat, 2 Jun 2012 09:11:22 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from nm10.bullet.mail.sp2.yahoo.com (nm10.bullet.mail.sp2.yahoo.com [98.139.91.80]) by mx1.freebsd.org (Postfix) with SMTP id 495AD8FC0A for ; Sat, 2 Jun 2012 09:11:22 +0000 (UTC) Received: from [98.139.91.69] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 02 Jun 2012 09:11:16 -0000 Received: from [208.71.42.196] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 02 Jun 2012 09:11:16 -0000 Received: from [127.0.0.1] by smtp207.mail.gq1.yahoo.com with NNFMP; 02 Jun 2012 09:11:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1338628275; bh=iT3nx6OBaqsrOeG8UtWLH/ip7wxCCJ54vVG+MfpCGfw=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:Content-Transfer-Encoding; b=rYG19j4HAoCsoCxrR0MsreLHTKOOBYZgk9qgXFmQRKrEhHUH1bovyVo4FrFh8L6M7ae+7SRzP3B9ehX+t88WmODAn/HeGaU5qI2AL1KkNEsY23eAkUxMzvMK5RQGHnnPScjBtFBaz3SSGTx3+tI1ETOh02pLWgWm04KIl2IW8fM= X-Yahoo-Newman-Id: 984186.34155.bm@smtp207.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 89mLOJ4VM1mCMiStTzLRzPF3pRVxlJCdhLGU_8bbZWfV6o8 QuQngd7pDxAVxhAb9Vcf7Sw7WYnwYpDirdouS4qOuIU4Mp241XPjLBlWPOAI Aps3S0oM81lJ2WylTddrkaJX7DzvaUuNLthsgxfewjUDLjjr9ryaGWwrQt62 VS841fX7AfivC.dlRZYjIawHvgATj3uvZ0oEgQQ3MP3fxq1f1XfO6bTlEI9L UZGLo8mUCL4QJvYKogTW2mue_JiZ9074ELNUSWZPiXZBcAAObOGX5t8eSruF faLU2v2xww3NQE9ajSnUntKHBeqN6lIWOojV1v_8.WDTEjspJOkObzRD1W9z zdBZSxQE1SuEX0dhl5JYO7S8cSD5yyb5u.u8oAj5tDjUGKlTOktOEugR5cyj te9QNbFHr6tzZcAoge_15fi_mk7z3m5._kowy6A8tW6.NB8faWBywXw-- X-Yahoo-SMTP: Xr6qjFWswBAEmd20sAvB4Q3keqXvXsIH9TjJ Received: from mail-ob0-f182.google.com (moonlightakkiy@209.85.214.182 with plain) by smtp207.mail.gq1.yahoo.com with SMTP; 02 Jun 2012 02:11:15 -0700 PDT Received: by obcni5 with SMTP id ni5so5321890obc.13 for ; Sat, 02 Jun 2012 02:11:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.40.71 with SMTP id v7mr5859791obk.5.1338628275229; Sat, 02 Jun 2012 02:11:15 -0700 (PDT) Received: by 10.182.165.69 with HTTP; Sat, 2 Jun 2012 02:11:15 -0700 (PDT) Date: Sat, 2 Jun 2012 03:11:15 -0600 Message-ID: From: PseudoCylon To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org Subject: Re: if_start / if_transmit handling and packet ordering - how can I guarantee it? 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, 02 Jun 2012 09:11:22 -0000 > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 1 Jun 2012 00:46:02 -0700 > From: Adrian Chadd > Subject: if_start / if_transmit handling and packet ordering - how can > =A0 =A0 =A0 =A0I guarantee it? > To: freebsd-net@freebsd.org > Cc: freebsd-wireless@freebsd.org > Message-ID: > =A0 =A0 =A0 =A0 > Content-Type: text/plain; charset=3DISO-8859-1 > > Ok, so now that I've mostly tried to lucidly dump what's going on- > what do people think about holding the locks for (potentially) so > long? I know iwn(4) holds the driver lock for as long as it can for > _everything_, so it avoids this issue. But again, I don't really like > the idea of holding a lock for this long. Nether do I. Basically, this is how things go with holding a lock. if_start() { LOCK(); for (;;) { add_slot(); if (++queue_counter > MAX) break; } UNLOCK(); } _txeof() or usb_bulk_callback() { LOCK(); clear_slot(); queue_counter--; UNLOCK(); if_start(); } When if_start() is called first time, it will loop until slots get full. This is guaranteed because both functions want the lock, so no slot will be cleared until if_start() exits. When _txeof() is called, it frees one slot. Then calls if_start(). After enqueuing one frame, slots get full again. Then, _txeof() frees one slot, if_start() adds one ... So, the driver processes one frame at a time. The packet order is maintained, but it seems wasting memory for queue slots. > Does anyone else have any > other ideas? Maybe... If we guarantee only one thread/process runs the if_start(), we won't have to hold the lock for that long. i.e if_start() { if (!atomic_cmpset(&running, 0, 1)) return; for(;;) { if (full) { running =3D 0; break; } } } > FWIW - I temporarily converted the ath driver to make ath_start() > enqueue a taskqueue task, which then did all of the TX inside the > taskqueue. I have tried the similar thing with run(4), because I thought calling taskqueue_enqueue() is better than calling if_start() in usb_bulk_callback(). (if_start() is a big process.) I got extra bandwidth (forget the actual number). > I unfortunately > then become very, very susceptible to scheduling latency I had to use a private taskqueue instead of shared one to over come the latency. Other than that, it worked well, at least under 1 ap + 1 sta both use run(4) environment. AK