From owner-freebsd-wireless@FreeBSD.ORG Thu Mar 8 19:38:10 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 D0694106567C; Thu, 8 Mar 2012 19:38:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC258FC12; Thu, 8 Mar 2012 19:38:10 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so2086137pbc.13 for ; Thu, 08 Mar 2012 11:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8xn50JUy7ebRHhjydgsfQSkBeuFjZT8oix1HAScfp1Q=; b=Ucxy0WcQdImFYV3me8hJQC0ws8uLsMBYZAK8zw41Ti1gb6JjUaZNKo+cOPsjx6HGw1 Im/9ecZunB6VMNACZsy6ceQvkNNvricOzSIrXB8BzUtFVVF444enwTAQmdIbKGeatug0 PLRLon0gdjrcipp5VHMaWSEtchFyOxAtsMcQaLvRTDcbwFh7utLZSbfOPK9GFMEfMng8 z2WgzX7y7vzB3PkbWdr4LfGX28estN1x5ZD02usjHrzs5nsBSuUeiS6he/TruejYjGZx 80HlDwTonGPCfP/GHAw0xQFJNG3NCypDSDys28a0mfIYCQR8VHnCHlVU2gWpU+BBoFRS uDxg== MIME-Version: 1.0 Received: by 10.68.204.6 with SMTP id ku6mr11414651pbc.157.1331235490114; Thu, 08 Mar 2012 11:38:10 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.142.72.11 with HTTP; Thu, 8 Mar 2012 11:38:09 -0800 (PST) In-Reply-To: <201203081043.44801.jhb@freebsd.org> References: <20120306.024212.108736612.iwasaki@jp.FreeBSD.org> <201203072017.44409.bschmidt@freebsd.org> <201203081043.44801.jhb@freebsd.org> Date: Thu, 8 Mar 2012 11:38:09 -0800 X-Google-Sender-Auth: eg5-9A87MZ7bEdcqdkVTl0uhcE8 Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, freebsd-wireless@freebsd.org, Bernhard Schmidt Subject: Re: patches for if_iwi and wlan for WEP mode 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: Thu, 08 Mar 2012 19:38:10 -0000 On 8 March 2012 07:43, John Baldwin wrote: > However, you could do that by having a net80211_ifattach() type thing tha= t > sets if_transmit and invokes the driver-provided if_start. =A0I don't thi= nk > wireless devices are using multiple transmit queues in such a way that > if_transmit would be a benefit, and if_start is a simpler model. THe problem is that the default if_transmit uses IFQ_ENQUEUE and the _start() versions out there use IFQ_DEQUEUE without necessarily handling fragments at all. We end up having m->m_nextpkt NULL'ed upon IFQ_ENQUEUE, thus not only making a fragment list entirely broken, the fragments themselves are actually leaked. So we end up running out of mbufs. The solution I can see working at the moment is creating if_transmit for each wireless device and correctly handling any fragments in the head mbuf before calling IFQ_DEQUEUE. Adrian