From owner-freebsd-arch@FreeBSD.ORG Mon Jul 24 00:27:59 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7694516A4DF; Mon, 24 Jul 2006 00:27:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id F413743D55; Mon, 24 Jul 2006 00:27:58 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 75D9046BC2; Sun, 23 Jul 2006 20:27:58 -0400 (EDT) Date: Mon, 24 Jul 2006 01:27:58 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: gnn@freebsd.org In-Reply-To: Message-ID: <20060724012707.A44945@fledge.watson.org> References: <20060723171734.K35186@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: sosend/soreceive consistency improvements X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2006 00:27:59 -0000 On Mon, 24 Jul 2006, gnn@freebsd.org wrote: > At Sun, 23 Jul 2006 19:57:56 +0100 (BST), > rwatson wrote: > >> Rather than continue in this "in between state", in which the uio/mbuf >> chain sosend and soreceive are reached via the protocol switch in each >> occurrence, I propose a change: sosend() and soreceive() will now be the >> formal APIs for sending and receiveing on sockets within the kernel, as is >> the case with many other so*() functions, and they will perform the >> protocol switch dereference. The existing functions are renamed to >> sosend_generic() and soreceive_generic(), and in most cases are never >> referenced by protocols since our protocol domain registration already uses >> sosend() and soreceive() as the defaults today. The new code strikes me as >> quite a bit more readable, and likely easier for socket consumers to use. >> >> Any thoughts and/or objections? > > Makes sense to me. Can we document these? That is, is there a man page in > section 9 we could add these to? I have plans to add a socket(9) man page, but because I'm still tearing things up, I've deferred doing that. I've started increasing the number of notes in uipc_socket.c in order to document some of the things that will eventually be in socket(9). Robert N M Watson Computer Laboratory University of Cambridge