Subject: Re: fixing send(2) semantics (kern/29750)
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 03/27/2005 00:01:18
On Mar 26, 2005, at 10:37 PM, Emmanuel Dreyfus wrote:

> If we consider that what SUS does not talk about what happens in the
> link layer, then IMO, we should let the link layer drop packets  
> without
> returning ENOBUFS.

In addition to Jonathan's comments about the standard and its  
language about the sending socket, also note that the EAGAIN and  
ENOBUFS error cases are quite distinct in the documentation for send(2):

      [EAGAIN]           The socket is marked non-blocking and the  
requested
                         operation would block.

      [ENOBUFS]          The system was unable to allocate an  
internal buffer.
                         The operation may succeed when buffers  
become avail-
                         able.

      [ENOBUFS]          The output queue for a network interface was  
full.
                         This generally indicates that the interface has
                         stopped sending, but may be caused by  
transient con-
                         gestion.

To me, this suggests that cases where ENOBUFS can be returned were  
INTENDED to never block.

-- thorpej