From owner-cvs-src@FreeBSD.ORG Thu May 13 02:03:01 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15DF816A4CE; Thu, 13 May 2004 02:03:01 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB9FD43D5A; Thu, 13 May 2004 02:03:00 -0700 (PDT) (envelope-from dds@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i4D930Ge085981; Thu, 13 May 2004 02:03:00 -0700 (PDT) (envelope-from dds@repoman.freebsd.org) Received: (from dds@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i4D930tS085950; Thu, 13 May 2004 02:03:00 -0700 (PDT) (envelope-from dds) Message-Id: <200405130903.i4D930tS085950@repoman.freebsd.org> From: Diomidis Spinellis Date: Thu, 13 May 2004 02:03:00 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/ppp ip.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 09:03:01 -0000 dds 2004/05/13 02:03:00 PDT FreeBSD src repository Modified files: usr.sbin/ppp ip.c Log: Make getprotobynumber() calls in FilterCheck conditional on the log levels by which they are used. On a typical production setting (no debug or filter logging) this will save an open/read/close system call sequence per packet, approximately halving the system overhead and reducing the overall overhead by 38%. dd bs=1k count=512 if=/usr/share/dict/web2 | ssh ppp-linked-host dd of=/dev/null # time original-ppp -nat -foreground connection Working in foreground mode Using interface: tun0 2.822u 2.404s 2:00.31 4.3% 392+496k 8+18io 3pf+0w # time new-ppp -nat -foreground connection Working in foreground mode Using interface: tun0 2.082u 1.173s 1:26.06 3.7% 379+450k 0+18io 0pf+0w MFC after: 3 weeks Revision Changes Path 1.101 +43 -13 src/usr.sbin/ppp/ip.c