From owner-freebsd-wireless@FreeBSD.ORG Sun Aug 5 13:40:51 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 146BD10657B5 for ; Sun, 5 Aug 2012 13:40:51 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from nm16-vm4.bullet.mail.ne1.yahoo.com (nm16-vm4.bullet.mail.ne1.yahoo.com [98.138.91.176]) by mx1.freebsd.org (Postfix) with SMTP id 9EBD58FC14 for ; Sun, 5 Aug 2012 13:40:50 +0000 (UTC) Received: from [98.138.90.48] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 05 Aug 2012 13:38:00 -0000 Received: from [98.138.84.44] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 05 Aug 2012 13:38:00 -0000 Received: from [127.0.0.1] by smtp112.mail.ne1.yahoo.com with NNFMP; 05 Aug 2012 13:38:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1344173880; bh=SqtqUwT4JovtszVIKXiTeswJe67S3Jae0ifDS20+MTo=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type; b=4sLkhWyyE6uU0Kil4k5eKv+FUeZRuHFyqb+3dUv1djkLMFlVHkIUJMvq7jDm0AB2VS0Oq0vOqbu4Lia3dZk4maaFCWSruUHVVvYDBfTHum7Sy8OgqZbzOlwI/1hfbsbzyM5T4DaRvZZRblpcw88eeOiwBaWhnVvCODP0PLCthuE= X-Yahoo-Newman-Id: 285136.95853.bm@smtp112.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: G9ZjOaIVM1mAv80iAa9muD0_vJ4G4qAuVcdljXx74i6mwAL ggvpwTI1YuoAEeCmSByPFnTg2I3JZK38dj9jRlqxRyFG6DA10S7GrQFfwIib kf59tp98M7TkFZ1wgM.Ue0xqnjGPXLF4LRky5FOvTr1zRMiaAEc4NqC1cE_Q GjM.3qxAw061ismFMqEsMF1AHd3UG60UWBQuzUJFYRc9XuCvY1TS0DMBVb5f YUI.sm67iQ4Gmra6WSZN.JdNilFVa6bxyvSJfpSRrn9ZOT.2kWeZO6d.7KRb a7yIQQMU50y9H9HmFVPXGeZiw1AyRQxfBbh5n50huu1uQHgmE9fygiDcAOeg pso2x4UaHeMduGHlKlSllTPLq.6LD5Nry4X4_0nI8fb4W8QGkYnCEvLyfxzY 2FOy3AMp0ibC8B7I7VeVKCnQBW8O3J.QEYaT6pij0SBZVRbQ0WWU.6S1WKrz NmqSLa6Pcx5lTOgzvpss8QPXp0CY49j2ZjswhHUgdghS.qdpazvOdg80dvvu G8ZegEZF.1W_AGDAXcISDX1z5coAG2crS8BzLQWxJR9cy3ORWdqe.RGrdmvJ mbO.boqG.HyjRjuMz7MWClHSI_T6y7g23x2M1yOIhGqQdMxvWKuM.B.xFoEc - X-Yahoo-SMTP: Xr6qjFWswBAEmd20sAvB4Q3keqXvXsIH9TjJ Received: from mail-vb0-f54.google.com (moonlightakkiy@209.85.212.54 with plain) by smtp112.mail.ne1.yahoo.com with SMTP; 05 Aug 2012 06:38:00 -0700 PDT Received: by vbmv11 with SMTP id v11so717569vbm.13 for ; Sun, 05 Aug 2012 06:37:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.116.6 with SMTP id k6mr5850865vcq.59.1344173879384; Sun, 05 Aug 2012 06:37:59 -0700 (PDT) Received: by 10.59.10.194 with HTTP; Sun, 5 Aug 2012 06:37:59 -0700 (PDT) In-Reply-To: References: Date: Sun, 5 Aug 2012 07:37:59 -0600 Message-ID: From: PseudoCylon To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org, Kim Culhan Subject: Re: ath lor 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, 05 Aug 2012 13:40:51 -0000 On Sat, Aug 4, 2012 at 3:12 PM, Adrian Chadd wrote: > On 4 August 2012 05:38, PseudoCylon wrote: > >>> This is a bit odd. I've not seen that, but you're testing with USB, right? >>> >> >> Yes with run(4). Most likely, it calls ieee80211_free_node() while >> driver lock is held. >> http://fxr.watson.org/fxr/source/dev/usb/wlan/if_run.c#L2705 > > Ok. I really, really should set up a -CURRENT laptop today/tonight. > I've found it ok to compile -HEAD net80211/wifi drivers on -9, but > trying to compile -9 USB drivers and stack on -HEAD is proving to be > rather annoying/challenging. I've acquired a couple of run NICs (that > do 11n, too!) so I'll be able to test that out very soon. > > What's the path through the stack -> driver that leads to > run_tx_free() being called with the driver lock held? This one was easy to spot. USB stack calls run_bulk_tx_callbackN() with driver lock held, ->run_tx_free() ->ieee80211_free_node() then locks node lock. > > And on the flip side, what's the path through the driver -> stack > that's called with the driver lock held? The comlock shouldn't be held > when TX/RX'ing packets up to the stack. I have not found it yet. I've been stuck here, but I'll keep looking for this. Then I can patch usb/150189. > >>> I just saw a LOR between a node lock and a tcpinp lock. i was doing >>> some iperf to an AR5416 802.11n AP running iperf locally. I've not >>> seen this before as I've not run a NIC in AP mode with local traffic >>> termination; I've only had APs do bridging. >>> >> >> It hasn't caused LOR with run(4), but if_start() is called with tcpinp >> lock is held when bridging or with multiple vaps in AP mode. That >> non-sleepable lock causes different problem with USB devices. >> http://fxr.watson.org/fxr/source/dev/usb/wlan/if_run.c#L3089 > > Odd. I saw that happen with no bridge interface configured. Hm. I'll > gather some more data soon. I'm trying to fix some TX descriptor > buffer issues that creep up if the air is congested and TX stalls for > a bit. I've not seen it occur on 5GHz as the air wasn't ever really > congested. This hasn't caused LOR, just sleeping issue. Maybe some change in upper layer fixed it. The code was first written for 8.0. > >>> Thanks for chasing this down. Let me know if you see the node/power or >>> node/scan LORs? >> >> Not so far, only scan/com LOR, the same one I mentioned before. > > Hm, maybe we should start a wiki page with all of the net80211/wifi > driver LORs. Do you have wiki.freebsd.org access? If not, create an > account and tell me what username you choose. If you do, create a page > under http://wiki.freebsd.org/WiFi and let's start documenting the > LORs that we see. run(4) calls ieee80211_runtask() because thread is non-sleepable or avoid LOR. I think I can still track back LOR. Also, I saved LOR outputs I saw long time ago. See if I can find them on old hard drive. AK