From owner-freebsd-net@FreeBSD.ORG Sat Mar 12 18:26:44 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB30216A4CE; Sat, 12 Mar 2005 18:26:44 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 924F343D1D; Sat, 12 Mar 2005 18:26:44 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.91] (sam@[66.127.85.91]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j2CIQems081443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 Mar 2005 10:26:42 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <423334C4.9060401@errno.com> Date: Sat, 12 Mar 2005 10:28:20 -0800 From: Sam Leffler User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <20050311110234.GA87255@cell.sick.ru> <20050311141450.GF9291@darkness.comp.waw.pl> <20050311142805.GB88801@cell.sick.ru> <42320A3E.1020708@elischer.org> <20050311213544.GH9291@darkness.comp.waw.pl> <42322875.4030404@errno.com> <42331EED.D7714E05@freebsd.org> In-Reply-To: <42331EED.D7714E05@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: dima <_pppp@mail.ru> cc: Pawel Jakub Dawidek cc: John Baldwin cc: Luigi Rizzo cc: rwatson@freebsd.org cc: Julian Elischer cc: net@freebsd.org Subject: Re: Giant-free polling [PATCH] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2005 18:26:45 -0000 Andre Oppermann wrote: > Sam Leffler wrote: > >>Pawel Jakub Dawidek wrote: >> >>>On Fri, Mar 11, 2005 at 01:14:38PM -0800, Julian Elischer wrote: >>>+> >P> There is still an unresolved problem (in your and our patch as well) of >>>+> >P> using ifnet structure fields without synchronization, as we don't have >>>+> >P> access tointerface's internal mutex, which protects those fields. >>>+> > >>>+> > >>>+> >>>+> you need to add an interface method that has access to it.. >>> >>>I was thinking more about moving interface mutex into ifnet structure, >>>but Robert has some objections IIRC. >>> >> >>I don't know what Robert's objections are but I've considered doing it >>for a while to deal with some locking issues in net80211-based drivers. >> The only issue I can see is if this mutex boxes drivers into a locking >>model that interlocks the rx+tx paths. > > > We don't want this. This would paint us into a corner with modern > high speed hardware that can hanle the rx+tx paths simulaneously. > Depending on the hardware DMA model and driver architecture you > want to have a different locking model. I agree with Robert in > objecting to this. > You did not read what I wrote. The ath driver has separate tx+rx paths and it could benefit from the mutex being in the ifnet structure. Sam