From owner-svn-src-head@FreeBSD.ORG Thu Mar 1 11:03:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96415106564A; Thu, 1 Mar 2012 11:03:39 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81EDC8FC0C; Thu, 1 Mar 2012 11:03:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q21B3d9p075587; Thu, 1 Mar 2012 11:03:39 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q21B3dc8075585; Thu, 1 Mar 2012 11:03:39 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203011103.q21B3dc8075585@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 1 Mar 2012 11:03:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232331 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2012 11:03:40 -0000 Author: pluknet Date: Thu Mar 1 11:03:39 2012 New Revision: 232331 URL: http://svn.freebsd.org/changeset/base/232331 Log: Document ifnet refcount. MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Thu Mar 1 10:55:01 2012 (r232330) +++ head/share/man/man9/ifnet.9 Thu Mar 1 11:03:39 2012 (r232331) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd March 1, 2012 .Dt IFNET 9 .Os .Sh NAME @@ -256,6 +256,11 @@ if a unit number is not associated with (Initialized by driver (usually via .Fn if_initname ) . ) +.It Va if_refcount +.Pq Vt u_int +The reference count. +(Initialized by +.Fn if_alloc . ) .It Va if_addrhead .Pq Vt "struct ifaddrhead" The head of the @@ -340,6 +345,20 @@ The output queue. .\"(Initialized by driver.) .El .Pp +References to +.Vt ifnet +structures are gained by calling the +.Fn if_ref +function and released by calling the +.Fn if_rele +function. +They are used to allow kernel code walking global interface lists +to release the +.Vt ifnet +lock yet keep the +.Vt ifnet +structure stable. +.Pp There are in addition a number of function pointers which the driver must initialize to complete its interface with the generic interface layer: