Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 2004 03:08:21 -0600 (CST)
From:      Mike Silbersack <silby@silby.com>
To:        Andrew <andrew@ugh.net.au>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: select, sendto and ENOBUFS
Message-ID:  <20040211030445.A1798@odysseus.silby.com>
In-Reply-To: <20040210111013.G56192-100000@starbug.ugh.net.au>
References:  <20040210111013.G56192-100000@starbug.ugh.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 10 Feb 2004, Andrew wrote:

> The conclusion being that send, sendto and select will never block on a
> UDP socket and the man page just doesn't make it too clear. I'm assuming
> it is the same for raw sockets.
>
> UNPv1 section 6.3 seems to say that select should work for UDP...Part 2
> under "Under What Conditions Is a Descriptor Ready" certainly indicates
> that select should work.
>
> Anyway a bug or not, is there a better work around than sleeping? I'm
> guessing not...
>
> Thanks,
>
> Andrew

Well, one workaround would be to figure out a way to have the kernel
implement the behavior you desire. :)

I doubt that anyone will put effort into this problem soon; it looks like
it would be quite a large change to the network stack, and we all have
plenty of projects to work on.

Maybe you could figure out where in the kernel the ENOBUFS is occuring,
and then add a tsleep which would be woken when the transmit queue cleared
a bit.  That would introduce unexpected blocking, but I can't imagine that
waiting for a few packets to exit the queue would take much time.

Mike "Silby" Silbersack



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040211030445.A1798>