Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* sendmsg returns ENOBUFS (UDP & broadcast)
@ 1996-03-25  5:00 Laurent Deniel
  1996-03-25  5:00 ` James Carlson
  1996-03-25  5:00 ` W. Richard Stevens
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Deniel @ 1996-03-25  5:00 UTC (permalink / raw)


On Digital UNIX 3.2, sendmsg on a UDP sock_dgram socket return
ENOBUFS (broadcast mode), the manual page specifies that :
The system was unable to allocate an internal buffer.

I wonder if this is related to the sending buffer associated with
the socket (which can be tuned by the use of setsockopt(SO_SNDBUF)
or if this is due to a kernel buffer overflow. In the last case,
can I increase this buffer, and what is the associated kernel variable ?

Thanks in advance,

Laurent.


--
Laurent Deniel              | E-mail: deniel@worldnet.fr
106 rue de Malabry          | WWW   : http://www.worldnet.net/~deniel
F-92350 Le Plessis Robinson | Voice : +(33) (1) 46838662



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sendmsg returns ENOBUFS (UDP & broadcast)
  1996-03-25  5:00 sendmsg returns ENOBUFS (UDP & broadcast) Laurent Deniel
  1996-03-25  5:00 ` James Carlson
@ 1996-03-25  5:00 ` W. Richard Stevens
  1 sibling, 0 replies; 3+ messages in thread
From: W. Richard Stevens @ 1996-03-25  5:00 UTC (permalink / raw)


> On Digital UNIX 3.2, sendmsg on a UDP sock_dgram socket return
> ENOBUFS (broadcast mode), the manual page specifies that :
> The system was unable to allocate an internal buffer.
>
> I wonder if this is related to the sending buffer associated with
> the socket (which can be tuned by the use of setsockopt(SO_SNDBUF)
> or if this is due to a kernel buffer overflow. In the last case,
> can I increase this buffer, and what is the associated kernel variable ?

I've never seen Digital Unix, but on Berkeley-derived kernels, this
means the interface output queue was full.  UDP does not save a copy
of the outgoing datagrams so there really isn't a "socket send buffer"
for a UDP socket: the size you set with SO_SNDBUF just specifies the
largest UDP datagram that you can send on the socket.

Try "netstat -id" if Digital Unix supports it, to see how many packets
have been dropped by the interface on output.  If this is the problem,
then I wonder if the ifq_maxlen value is still the old classic 50?

	Rich Stevens



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sendmsg returns ENOBUFS (UDP & broadcast)
  1996-03-25  5:00 sendmsg returns ENOBUFS (UDP & broadcast) Laurent Deniel
@ 1996-03-25  5:00 ` James Carlson
  1996-03-25  5:00 ` W. Richard Stevens
  1 sibling, 0 replies; 3+ messages in thread
From: James Carlson @ 1996-03-25  5:00 UTC (permalink / raw)
  To: Laurent Deniel


In article <3156EF4D.177F623F@worldnet.fr>, Laurent Deniel <deniel@worldnet.fr> writes:
|> On Digital UNIX 3.2, sendmsg on a UDP sock_dgram socket return
|> ENOBUFS (broadcast mode), the manual page specifies that :
|> The system was unable to allocate an internal buffer.
|> 
|> I wonder if this is related to the sending buffer associated with
|> the socket (which can be tuned by the use of setsockopt(SO_SNDBUF)
|> or if this is due to a kernel buffer overflow. In the last case,
|> can I increase this buffer, and what is the associated kernel variable ?

No, that's not causing it.

There are two possible causes of ENOBUFS -- the kernel couldn't find or
allocate an mbuf (unlikely with most Unix systems) or the interface
output queue itself is full (quite likely with most UDP applications).

Unfortunately, most BSD-derived systems return ENOBUFS when the output
queue limit is reached.  That limit defaults to 50 packets and usually
is not configurable.  (In our kernel, we hacked this to return a new
and more meaningful error, ENOQUEUE, but this doesn't help you much ...)

You need to start pacing your output with a timer, or just accept the
inevitable packet loss as just part of the deal you make when using UDP.

-- 
James Carlson <carlson@xylogics.com>            Tel:  +1 617 272 8140
Annex Interface Development / Xylogics, Inc.          +1 800 225 3317
53 Third Avenue / Burlington MA  01803-4491     Fax:  +1 617 272 2618



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-03-25  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-25  5:00 sendmsg returns ENOBUFS (UDP & broadcast) Laurent Deniel
1996-03-25  5:00 ` James Carlson
1996-03-25  5:00 ` W. Richard Stevens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox