From owner-freebsd-net@FreeBSD.ORG Thu Oct 14 20:23:09 2004 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 44E6C16A4CE for ; Thu, 14 Oct 2004 20:23:09 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CAB243D46 for ; Thu, 14 Oct 2004 20:23:08 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i9EKN68J050411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Oct 2004 00:23:06 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i9EKN5OH050410; Fri, 15 Oct 2004 00:23:06 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Fri, 15 Oct 2004 00:23:05 +0400 From: Gleb Smirnoff To: Andre Oppermann Message-ID: <20041014202305.GA50360@cell.sick.ru> References: <20041014174225.GB49508@cell.sick.ru> <416EBF0A.CB1C0366@networx.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <416EBF0A.CB1C0366@networx.ch> User-Agent: Mutt/1.5.6i cc: net@freebsd.org Subject: Re: small tun(4) improvement 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: Thu, 14 Oct 2004 20:23:09 -0000 On Thu, Oct 14, 2004 at 08:01:46PM +0200, Andre Oppermann wrote: A> > any objections about commiting this improvement to tun(4)? A> > In my ng_device I have a similar function ngdwrite(), which was A> > cut-n-pasted from tunwrite(). And my tests with a patched ng_device have A> > shown 30% speedup on large writes. I don't think it will help tun(4) A> > to be a much faster, since tunwrite() isn't a bottleneck, but I think A> > it is worth considering. The patch was tested on a production PPPoE access A> > concentrator (RELENG_4 however). A> A> Could you check tap(4) as well? You can do the same optimization there A> as well (IIRC). Yes, you are right. We are going to have triple cut'n'paste: if_tun.c, ng_device.c, if_tap.c. What about m_uiocopy()? The question is where can we put this function? P.S. We already have md_get_uio() in libmchain. But it doesn't do exactly same thing. And libmchain does not support Big Endians, so we probably don't want to make tun and tap depend on libmchain. P.P.S. BTW, ng_eiface+ng_device is going to supersede tap(4), same way as ng_iface+ng_device is going to supersede tun(4). :) -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE