From owner-cvs-src-old@FreeBSD.ORG Sat Mar 27 17:48:33 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84758106575B for ; Sat, 27 Mar 2010 17:48:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7284C8FC14 for ; Sat, 27 Mar 2010 17:48:33 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o2RHmXHc070795 for ; Sat, 27 Mar 2010 17:48:33 GMT (envelope-from bz@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o2RHmX1O070794 for cvs-src-old@freebsd.org; Sat, 27 Mar 2010 17:48:33 GMT (envelope-from bz@repoman.freebsd.org) Message-Id: <201003271748.o2RHmX1O070794@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to bz@repoman.freebsd.org using -f From: "Bjoern A. Zeeb" Date: Sat, 27 Mar 2010 17:48:13 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/net if_epair.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2010 17:48:33 -0000 bz 2010-03-27 17:48:13 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/net if_epair.c Log: SVN rev 205760 on 2010-03-27 17:48:13Z by bz MFC r204805: Rework reference counting in case we queue into the netisr, or overflow the netisr queue and fall back to the interface queue so that we can garuantee that the ifnet pointer stays valid. Formerly we ended up with reference counts <= 0 in case the netisr had returned ENOBUFS. The idea is to track any packet in the netisr queue and only change the refount on edge operations for the fallback interface queue. This also avoids problems in case the if_snd.ifq_len lies to us. Also rework refount assertions to make sure they trigger if we go below 1. Formerly a negative refence count did not trigger the assert as the refcount variable is u_int. Revision Changes Path 1.3.2.3 +71 -20 src/sys/net/if_epair.c