From: carlson@xylogics.com (James Carlson)
To: Laurent Deniel <deniel@worldnet.fr>
Subject: Re: sendmsg returns ENOBUFS (UDP & broadcast)
Date: 1996/03/25 [thread overview]
Message-ID: <4j73bf$as6@newhub.xylogics.com> (raw)
In-Reply-To: 3156EF4D.177F623F@worldnet.fr
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
next prev parent reply other threads:[~1996-03-25 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-03-25 5:00 sendmsg returns ENOBUFS (UDP & broadcast) Laurent Deniel
1996-03-25 5:00 ` James Carlson [this message]
1996-03-25 5:00 ` W. Richard Stevens
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox