From owner-cvs-all@FreeBSD.ORG Wed Oct 8 19:48:44 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9114E1065690; Wed, 8 Oct 2008 19:48:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6756E8FC08; Wed, 8 Oct 2008 19:48:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 0508946B29; Wed, 8 Oct 2008 15:48:44 -0400 (EDT) Date: Wed, 8 Oct 2008 20:48:43 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200810081114.40433.jhb@freebsd.org> Message-ID: References: <200810072058.m97Kw3q0073534@repoman.freebsd.org> <200810071736.50999.jhb@freebsd.org> <200810081114.40433.jhb@freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern uipc_socket.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 19:48:44 -0000 On Wed, 8 Oct 2008, John Baldwin wrote: >>>> In soreceive_dgram, when a 0-length buffer is passed into recv(2) and >>>> no data is ready, return 0 rather than blocking or returning EAGAIN. >>>> This is consistent with the behavior of soreceive_generic (soreceive) >>>> in earlier versions of FreeBSD, and restores this behavior for UDP. .. >> >> Yes, I agree it's odd, and I'm not sure I like it. I discovered the >> problem while writing edge-case regression tests for socket receive to >> better exercise soreceive_dgram, at first concluding it was a bug in >> soreceive_generic! My feeling, though, is that I should leave behavior >> "compatible" for 7.1, and perhaps we should change it for 7.2. > > Ok, so I guess you will revert this from HEAD after the MFC? That and modify soreceive_generic() to do the same thing in the same circumstances -- soreceive_dgram() falls back on soreceive_generic() for any non-fast path (complicated) cases, so consistency of semantics is quite important. Robert N M Watson Computer Laboratory University of Cambridge