From owner-freebsd-wireless@FreeBSD.ORG Sun Jul 29 02:36:38 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 6EA9D106564A for ; Sun, 29 Jul 2012 02:36:38 +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 4063D8FC08 for ; Sun, 29 Jul 2012 02:36:38 +0000 (UTC) Received: by pbbro2 with SMTP id ro2so7968356pbb.13 for ; Sat, 28 Jul 2012 19:36:38 -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=ojuXbsqF9xCnydlbq5RDSJwNIthzZkR9XDgVKWGegyc=; b=k1NLnmYJdWhLD68LjkTDkcd1Jy2622J7UpM9Te3HsExY4gP0/KrNgR3veHyph//2pm uUTZm5y+ftC5ubsuHCN9u1PE7B2AZ9JSTaLrJtnkVcy1NpK/nEzhiZBCjraOpKbTn67J aBwoD9wg8rII8Xh6kHtqZrT0IhXcMHA/x4xJpbG8EwAW354YLtDGXXK2gwuYyl+XCmwF T6/hGFlz3OlEjHLChsQ3SylH+rJdiuVtCRvEtw6LcOGSd+GzKc7lS7RULsAnGDVTIsgA d8vDQKqqLxYq0Ws8eWxx5uO46RvwsafjWEtP3B2iIoO+WdBA+/Dd1zxg3COI+09PYkTV CxYw== MIME-Version: 1.0 Received: by 10.68.223.164 with SMTP id qv4mr25065497pbc.20.1343529398062; Sat, 28 Jul 2012 19:36:38 -0700 (PDT) Received: by 10.68.66.136 with HTTP; Sat, 28 Jul 2012 19:36:38 -0700 (PDT) In-Reply-To: References: Date: Sat, 28 Jul 2012 19:36:38 -0700 Message-ID: From: Adrian Chadd To: Kim Culhan Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org 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, 29 Jul 2012 02:36:38 -0000 Hm, if someone's up for a bit of coding, here's my suggestIon: * create an iterator struct which just contains an array of ieee80211_node entries; * write an iterator function that _just_ populates that iterator struct with ieee80211 node entries, but after having locked them; * then, once the call to ieee80211_iterate_node() is done, the iterator struct will have a list of nodes to iterate over; * then just call the original callback over each member of that iterator struct node array, derefing nodes as you go along. That avoids calling any callbacks with the iterator node table lock held. It's dirty and I would prefer the use of something more modern, like transactional memory or generation counts, but I'd really like this bug squished so kim and others can continue hacking/testing this stuff. It'd also eliminate a rather annoying LOR from the TODO list. So, the hard bit is done. Can someone please do the easy bit for me? :) Adrian