From owner-cvs-all@FreeBSD.ORG Mon Jun 14 19:24:29 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 E971716A4D0; Mon, 14 Jun 2004 19:24:29 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7608543D41; Mon, 14 Jun 2004 19:24:29 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i5EJNDCc038585; Mon, 14 Jun 2004 15:23:13 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i5EJNDrh038582; Mon, 14 Jun 2004 15:23:13 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 14 Jun 2004 15:23:12 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Alfred Perlstein In-Reply-To: <20040614190209.GE61448@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_descrip.c uipc_socket.c uipc_syscalls.c uipc_usrreq.c src/sys/net raw_cb.c raw_usrreq.c src/sys/netatm atm_socket.c src/sys/netatalk ddp_pcb.c src/sys/netgraph ng_ksocket.c src/sys/netgraph/bluetooth/socket ... 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: Mon, 14 Jun 2004 19:24:30 -0000 On Mon, 14 Jun 2004, Alfred Perlstein wrote: > * Robert Watson [040612 13:47] wrote: > > rwatson 2004-06-12 20:47:32 UTC > > > > FreeBSD src repository > > > > Modified files: > > > > - Note that sofree()/sotryfree() will release the socket lock even if > > they don't free the socket. > > Please use one of the existing conventions when doing refcount based > operations, namely either: sorele, soput, sodrop. > > (from: vrele, vput, fdrop, etc) We chose to maintain the existing naming scheme for sockets present in the code since it's origins in BSD, and consistent with other BSD platforms. Otherwise, I generally agree :-). Given the volume of other changes going in here, I was reluctant to introduce non-functional changes in order to ease merging. Once we have the basic version of locking in place, we will have the opportunity to revisit this (and a great many other things). One thing I should point out, though, is that the reference counting in sockets isn't a simple reference count, since in addition to so_count, there's also a flag indicating whether a file descriptor reference is present, and an un-counted reference from the pcb to the socket, which is also considered "real". The various sofree()/sotryfree()/sorele()/soref()/.. APIs reflect this complexity, and hence some inconsistency with a more simple API. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research