From owner-freebsd-wireless@freebsd.org Mon Nov 2 22:49:19 2015 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9ED6BA247FA for ; Mon, 2 Nov 2015 22:49:19 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2764E1F26; Mon, 2 Nov 2015 22:49:18 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by lffz202 with SMTP id z202so70207839lff.3; Mon, 02 Nov 2015 14:49:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=content-type:to:subject:references:date:cc:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=9SWqWw1WPTHoPaVvIopSkIv/Ofx0/5iPMiLbZkSFq48=; b=L2wocLL7Xjb2OXcne//mfLwdYWvhtfh1Fe5VmFLFpPaVQV764mV8L0Xa2F4WznS/pe IzcuPeQz937QXzfXg/DgmNKo30OZi+HNI5F3JHPx73v/Gx61riDFwiO3Me4phUaQqq2N +d5hXJFfASBINjW4FSw2qKRlOufjCNlYjHb1ogN3ES6RiE0EJQW4+G+GOJFhiuk2X5nL 7bZZShpQ+/XhmbhGF0IfatA5J7Eg1EER5b0ktE2om7gJg0MFLr/dula/e8Qi4mki8Frn 74Cn2albwu5NiSiJkUxwnX+GoUo2PAmftRQcFEXICjfG5XFkqy3vDnegcgUAAY+VooDh 9+bQ== X-Received: by 10.112.35.196 with SMTP id k4mr11205733lbj.3.1446504550835; Mon, 02 Nov 2015 14:49:10 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id j136sm2577655lfe.38.2015.11.02.14.49.10 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Nov 2015 14:49:10 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Adrian Chadd" , "freebsd-wireless@freebsd.org" Subject: Re: bridge/wifi panic References: <1446174922.809135.424262409.16BCE412@webmail.messagingengine.com> <1446474203.3014685.426732569.13D78488@webmail.messagingengine.com> Date: Tue, 03 Nov 2015 00:49:07 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 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, 02 Nov 2015 22:49:19 -0000 Tue, 03 Nov 2015 00:38:45 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Adrian Chadd = : > Actually, this is more annoying than I'd thought. There's a whole > bunch of places where mbufs can change during processing in ath(4) and= > yeah, we can't guarantee the original mbuf is available. > > I wonder how many other drivers are doing this - stuff like > m_collapse(), m_defrag(), etc. If this is called then the original > mbuf can't be returned upon error. I have thinked about that few hours ago - there are many ways to fix it:= 1) add a guarantee for current m_collapse() / m_defrag() that current mbuf pointer will not change (like it works in OpenBSD); 2) implement third function with this guarantee (for backward = compatibility); 3) pass pointer to mbuf pointer via ic_raw_xmit() / ic_transmit() - then the caller can change it (that's the way I've seen in other m_collapse() consumers); 4) move m_defrag() / m_collapse() to the net80211 (to the = ieee80211_encap() ?). This will require an additional parameter, which will limit max number of segments for device. ... (something else?) *) leave it 'as is'. > > I'm torn as to whether to back out the mbuf API change and have the > driver consume it, or whether we want to go through the pain of fixing= > things. > > Let's figure this out ASAP. > > Thanks, > > > -adrian > > > On 2 November 2015 at 14:35, Adrian Chadd wrote: >> Ok, yeah, I think your initial churn of ath(4) for error handling is >> way incomplete, and we're going to have to fix this stuff before it >> causes lots more issues in -HEAD. >> >> >> >> -a