NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ENOBUFS when setting SO_SNDBUF



On Sun, Oct 10, 2010 at 04:25:04AM +0200, Emmanuel Dreyfus wrote:
> Thor Lancelot Simon <tls%panix.com@localhost> wrote:
> 
> > Also, setting this limit by hand disables automatic socket buffer sizing
> > for TCP sockets, which is a thing worth keeping in mind.
> 
> I also get a ENOBUFS on a writev later. 

So you really *are* out of mbufs.  What network driver are you using?
Maybe it leaks.

> What should the program do on a ENOBUFS? Whould it handle it like
> EAGAIN?

Delay a little first maybe -- or you might make it worse.  But the case
where you get ENOBUFS when trying to increase the socket buffer size is
usually caused by hitting the relevant limit; the right thing to do is
to request a little less space until you get what you asked for.

Thor


Home | Main Index | Thread Index | Old Index