From owner-freebsd-hackers Fri Jul 30 8:56:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (Postfix) with ESMTP id CDF0B14D7D for ; Fri, 30 Jul 1999 08:56:25 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from [204.68.178.224] (helo=softweyr.com) by mail.xmission.com with esmtp (Exim 2.12 #1) id 11AEyp-000740-00; Fri, 30 Jul 1999 09:53:55 -0600 Message-ID: <37A1CA90.79820BB2@softweyr.com> Date: Fri, 30 Jul 1999 09:53:52 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 3.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Ville-Pertti Keinonen Cc: hackers@FreeBSD.ORG Subject: Re: Documenting writev(2) ENOBUFS error References: <19990728170119.A47890@kilt.nothing-going-on.org> <37A06B6B.B5BF74CF@softweyr.com> <86yafy5x55.fsf@not.demophon.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ville-Pertti Keinonen wrote: > > wes@softweyr.com (Wes Peters) writes: > > > [ENOBUFS] Insufficient system buffer space exists to complete the op- > > eration. > > Do you know what kind of circumstances that error *really* occurs > under? > > If it happened with files, that would be a bug and should be fixed. > The call is supposed to block to wait for writes to be possible. This > applies to stream sockets in most cases, as well. Based on a quick > look at the code, out-of-band TCP data seems to be the only case where > ENOBUFS might be returned for streams, and that obviously doesn't > apply to write/writev. The only way writev can pick up an ENOBUFS error is in the call to (*fp->f_ops->fo_write)(fp, &auio, fp->f_cred, 0) on line 447 (in -CURRENT). ENOBUFS can happen on any network object if the system is completely out of mbufs, right? So it could return ENOBUFS for any connected socket specified as the fd in a write or writev operation. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://softweyr.com/ wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message