From owner-freebsd-wireless@FreeBSD.ORG Sun Mar 3 10:22:55 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D835BB30 for ; Sun, 3 Mar 2013 10:22:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B867E11 for ; Sun, 3 Mar 2013 10:22:55 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id x10so3731807wey.3 for ; Sun, 03 Mar 2013 02:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=R7cw9KUc+An59ThVC1/OxdjIJ1lzOPE7pPPJnfnu4tI=; b=E6YqfNi0qrNz3UlZDxZK9kjk9BmQr4iP64okJPVVJu6YrdkoYREfmiXfYkpiB5Ia/b cIico+yg8+cE+UFRIZIT4kjZSz4eSU9B+j30oIxT3ryWehXoCjn0hHiOI2K5rr4IYnL9 KtjXfLTQ+qPq6mRoFwQAcshYxqee/YCqD3kW8ckajKOOjZiqtfJ9nUzMFUoQeD+D+AcI FSylxEfYZJpo7u48jbnHQB54Zyxc2/c0zM+eLNFfcaaIu+oeMcFax6WPI08VmLR2Wx+b mdsW4tzMu/ej1PuKPbYA7ePV3Z+RL2NRDNDKry9EM17W4U9lMO55kGZ/cpOxJDKJbCai Dwvg== MIME-Version: 1.0 X-Received: by 10.180.97.233 with SMTP id ed9mr5952577wib.32.1362306174173; Sun, 03 Mar 2013 02:22:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.114.201 with HTTP; Sun, 3 Mar 2013 02:22:54 -0800 (PST) In-Reply-To: References: Date: Sun, 3 Mar 2013 02:22:54 -0800 X-Google-Sender-Auth: hxL6quu90kT-ImD01tWM0xTlN1s Message-ID: Subject: Re: [RFC] net80211 TX, take 4 (final) From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 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, 03 Mar 2013 10:22:55 -0000 Hi, I have finished this round of work, intended for -HEAD. Besides the stuff in the ath and iwn driver, here's what I'd like to commit: http://people.freebsd.org/~adrian/ath/20130303-net80211_tx-1.diff What it implements: * the code that transmits a VAP frame is now in ieee80211_start_pkt(). I may rename that to something vap like later * nothing calls if_transmit() direct - it goes via ieee80211_parent_transmit() or ieee80211_vap_transmit() * nothing calls ic_raw_xmit() direct - it calls via ieee80211_raw_output() * the VAP TX and parent TX path is locked using an ieee80211com TX lock - until the parent transmit code is serialised (eg via a taskqueue to do deferred transmit, or a specific ic TX lock) this lock will be used both to serialise the VAP / STA TX state (ie, sequence numbers and general VAP TX ordering) and enforcing the same ordering is occuring during driver handoff * tidy up the parent/vap TX code in hostap recv_pspoll() * tidy up the hwmp discover completion code which dispatches frames from the staging queue - those frames aren't encapsulated, so just call ieee80211_vap_transmit() I'd appreciate thorough testing with INVARIANTS and WITNESS enabled for hostap, sta and mesh modes. I'll likely commit the non-locking changes soon - ie, the ieee80211_parent_transmit(), ieee80211_vap_transmit(), ieee80211_raw_output() changes. Those seem no brainers - the only later optimisation would be to turn them into inlines in ieee80211_freebsd.h . I've verified that this patch applies cleanly to the latest -HEAD. Thanks! Adrian