From owner-freebsd-net Tue Mar 13 17: 2:56 2001 Delivered-To: freebsd-net@freebsd.org Received: from Awfulhak.org (awfulhak.demon.co.uk [194.222.196.252]) by hub.freebsd.org (Postfix) with ESMTP id 94CE137B718 for ; Tue, 13 Mar 2001 17:02:52 -0800 (PST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [172.16.0.12]) by Awfulhak.org (8.11.2/8.11.2) with ESMTP id f2E155C16939; Wed, 14 Mar 2001 01:05:06 GMT (envelope-from brian@lan.Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.11.3/8.11.3) with ESMTP id f2E161a09824; Wed, 14 Mar 2001 01:06:01 GMT (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200103140106.f2E161a09824@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Lars Eggert Cc: net@FreeBSD.ORG, brian@Awfulhak.org Subject: Re: Changing UDP select() behavior In-Reply-To: Message from Lars Eggert of "Tue, 13 Mar 2001 16:43:26 PST." <3AAEBEAE.F823CB8E@isi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Mar 2001 01:06:01 +0000 From: Brian Somers Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Hi, > > I'm wondering if anyone has ever considered modifying the UDP behavior with > regard to selecting: > > Currently, writing to a UDP socket either enqueues packets in the interface > queue (returning success), or drops them on the floor (returning ENOBUFS) > if the queue is full. Selecting-to-write on a UDP socket always succeeds, > never blocks. > > I'm considering changing this, so that a select-to-write on a UDP socket > will block until queue space becomes available. (I don't think this would > violate UDP semantics, but is a big enough change to warrant a new sockopt > to enable it.) > > Has this been considered/implemented in any OS? Does anyone see any serious > problems with it? Feedback greatly appreciated! This'd be nice if it could be made to work. I guess the problem is that you don't actually know if a write() will succeed 'till you try it (and try to allocate an mbuf). Having said this, it would be nice if it was possible to pre-allocate (a small number of) mbufs for a pipe() or socketpair(), giving a reliable SOCK_DGRAM file-descriptor based ipc mechanism. > Lars > -- > Lars Eggert Information Sciences Institute > http://www.isi.edu/larse/ University of Southern California -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message