From owner-freebsd-wireless@freebsd.org Wed Nov 4 18:18:31 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 E6C52A26DD2 for ; Wed, 4 Nov 2015 18:18:30 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB4E61B30 for ; Wed, 4 Nov 2015 18:18:30 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 6557C20479 for ; Wed, 4 Nov 2015 13:18:29 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute2.internal (MEProxy); Wed, 04 Nov 2015 13:18:29 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=9MGSK4t1NrKt5ii tI0jDVII5S2s=; b=AM9z1PftbGxWfHFju+DIYjS/Jimik83sc3mak3haU5WfXIE +2AbhA4fMCtkr5O6AoO+CtUT/1aFxg2YaXiIY1yhfG9vk14OBPSpqAL7PQhhKPLv J+SvfvT0mZMWn4Zwiwm1I1HYS8k/khgYOkZKm7/q0fI0qJ4u7Mw9AV6aGzTk= Received: by web3.nyi.internal (Postfix, from userid 99) id 3CCBF10B363; Wed, 4 Nov 2015 13:18:29 -0500 (EST) Message-Id: <1446661109.2248371.429186785.7A1E02D8@webmail.messagingengine.com> X-Sasl-Enc: N1jiOZbLCzjOEEDCcooZkVvZQbaiWxn5SYXmenbWP/RQ 1446661109 From: Mark Felder To: Adrian Chadd , Andriy Voskoboinyk Cc: freebsd-wireless@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-341322f1 In-Reply-To: References: Subject: Re: (untested) ath fix upon error Date: Wed, 04 Nov 2015 12:18:29 -0600 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: Wed, 04 Nov 2015 18:18:31 -0000 On Wed, Nov 4, 2015, at 12:11, Adrian Chadd wrote: > On 3 November 2015 at 08:12, Andriy Voskoboinyk wrote: > > Tue, 03 Nov 2015 17:31:18 +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 > > : > > > > > >> hiya, > >> > >> what do people think about this to fix ath(4) transmit errors: > >> > >> adrian@victoria:~/work/freebsd/head-embedded/src % svn diff sys/dev/ath > >> Index: sys/dev/ath/if_ath.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> --- sys/dev/ath/if_ath.c (revision 290048) > >> +++ sys/dev/ath/if_ath.c (working copy) > >> @@ -3320,6 +3320,9 @@ > >> * > >> * Note: if this fails, then the mbufs are freed but > >> * not the node reference. > >> + * > >> + * So, we now have to free the node reference ourselves here > >> + * and return OK up to the stack. > >> */ > >> next =3D m->m_nextpkt; > >> if (ath_tx_start(sc, ni, bf, m)) { > >> @@ -3336,7 +3339,14 @@ > >> */ > >> ath_txfrag_cleanup(sc, &frags, ni); > >> ATH_TXBUF_UNLOCK(sc); > >> - retval =3D ENOBUFS; > >> + > >> + /* > >> + * XXX: And free the node/return OK; ath_tx_start() may > >> have > >> + * modified the buffer. We currently have no way= to > >> + * signify that the mbuf was freed but there was = an > >> error. > >> + */ > >> + ieee80211_node_free(ni); > >> + retval =3D 0; > >> goto finish; > >> } > >> > >> > >> .. the idea is that we can't return failure once we've called > >> ath_tx_start(), as the mbuf needs to be consumed. So we return OK and > >> just count an error. > >> > > > > Yes, I think this (temporary?) workaround should fix the issue. > > >=20 > Cool, thanks! >=20 >=20 > -a I'm running it... if I can manage a few days uptime it has worked. --=20 Mark Felder ports-secteam member feld@FreeBSD.org