From owner-freebsd-net@FreeBSD.ORG Thu Mar 22 15:39:48 2007 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D79416A40A for ; Thu, 22 Mar 2007 15:39:48 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 97E8E13C4CC for ; Thu, 22 Mar 2007 15:39:45 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l2MFdW0N006722; Thu, 22 Mar 2007 18:39:32 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l2MFdRtj006721; Thu, 22 Mar 2007 18:39:27 +0300 (MSK) (envelope-from yar) Date: Thu, 22 Mar 2007 18:39:26 +0300 From: Yar Tikhiy To: Julian Elischer Message-ID: <20070322153926.GY41715@comp.chem.msu.su> References: <20070321201936.GN41715@comp.chem.msu.su> <20070321132306.A1936@xorpc.icir.org> <4601B28B.7090204@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4601B28B.7090204@elischer.org> User-Agent: Mutt/1.5.9i Cc: Luigi Rizzo , net@freebsd.org Subject: Re: A dummy Ethernet driver X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2007 15:39:48 -0000 On Wed, Mar 21, 2007 at 03:32:43PM -0700, Julian Elischer wrote: > Luigi Rizzo wrote: > >On Wed, Mar 21, 2007 at 11:19:36PM +0300, Yar Tikhiy wrote: > >>Hi folks, > >> > >>We have disc(4) for testing and benchmarking. However, it's a > >>loopback driver, so such things as vlan or bridge cannot attach to > >>it. I needed a similar dummy interface mimicing Ethernet and failed > >>to find a ready solution. I tried ng_eiface+ng_hole, but it just > >>couldn't keep up with gigabit rates. So I knocked up a new dummy > >>driver, edsc(4): Ethernet discard interface. I'd like to commit it > >>if there are no objections. Then it could also serve as the bones > >>of an Ethernet driver for those who study kernel internals or want > >>to write a new driver. > > > >seems like a good idea. > > > > I think the question I have is why eiface couldn't cope..? > I think it should have so I'll look at it.. I believe that it can't keep pace because the packet isn't passed straight from if_start() to Netgraph due to some reservations about locking. A callback is used intead, which may introduce a delay. -- Yar