From owner-freebsd-net Tue Jun 4 9: 7:24 2002 Delivered-To: freebsd-net@freebsd.org Received: from iguana.icir.org (iguana.icir.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 67ADA37B404 for ; Tue, 4 Jun 2002 09:07:21 -0700 (PDT) Received: (from rizzo@localhost) by iguana.icir.org (8.11.6/8.11.3) id g54G7JG88759; Tue, 4 Jun 2002 09:07:19 -0700 (PDT) (envelope-from rizzo) Date: Tue, 4 Jun 2002 09:07:19 -0700 From: Luigi Rizzo To: Lars Eggert Cc: net@FreeBSD.ORG Subject: Re: Dummynet WFQ Message-ID: <20020604090719.A88701@iguana.icir.org> References: <3CFB9BC4.9080506@isi.edu> <20020603122913.A78688@iguana.icir.org> <3CFCE101.3040108@isi.edu> <3CFCE1CF.2070001@isi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3CFCE1CF.2070001@isi.edu>; from larse@ISI.EDU on Tue, Jun 04, 2002 at 08:50:39AM -0700 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Most device drivers batch transmissions, but if you use the interface as a clock for the pipe, dummynet will only send a single packet at a time to the device, so you won't have to bother about the batching. The overhead is in the fact that if_tx_rdy() has to scan all pipes to find the one who needs the signal. Polling won't help on this, whereas it would to have a direct pointer from the interface to the pipe (but we'd need to extend the struct ifnet, and do the appropriate garbage collection when interfaces and/or pipes are added/deleted). BTW if you use polling, you have to be careful in the place where you put the call to if_tx_rdy() to make sure that it catches the tx queue becoming empty only once and not at every polling cycle. cheers luigi p.s. the soekris boxes are becoming popular, aren't they! On Tue, Jun 04, 2002 at 08:50:39AM -0700, Lars Eggert wrote: > Lars Eggert wrote: > > I'm trying to merge this into the sis driver, which seems to batch > > transmissions together. For clarification, do you expect one if_tx_rdy() > > call per packet or one per batch? Per packet may result in a burst of > > these calls, does dummynet handle this? > > Oh, I'm also using your "polling" version of the sis driver - maybe > that'd reduce the overhead of if_tx_rdy() you mentioned? > > Lars > -- > Lars Eggert USC Information Sciences Institute To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message