From owner-cvs-all@FreeBSD.ORG Thu Aug 5 02:37:37 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35C8416A4CE; Thu, 5 Aug 2004 02:37:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17B3243D31; Thu, 5 Aug 2004 02:37:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i752bapv049514; Thu, 5 Aug 2004 02:37:36 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i752baAT049513; Thu, 5 Aug 2004 02:37:36 GMT (envelope-from rwatson) Message-Id: <200408050237.i752baAT049513@repoman.freebsd.org> From: Robert Watson Date: Thu, 5 Aug 2004 02:37:36 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net bpf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 02:37:37 -0000 rwatson 2004-08-05 02:37:36 UTC FreeBSD src repository Modified files: sys/net bpf.c Log: Do a lockless read of the BPF interface structure descriptor list head before grabbing BPF locks to see if there are any entries in order to avoid the cost of locking if there aren't any. Avoids a mutex lock/ unlock for each packet received if there are no BPF listeners. Revision Changes Path 1.132 +21 -0 src/sys/net/bpf.c