UDP sendto() returning ENOBUFS - "No buffer space available"
hiren panchasara
hiren.panchasara at gmail.com
Fri Jul 18 18:28:42 UTC 2014
On Wed, Jul 16, 2014 at 11:00 AM, Adrian Chadd <adrian at freebsd.org> wrote:
> Hi!
>
> So the UDP transmit path is udp_usrreqs->pru_send() == udp_send() ->
> udp_output() -> ip_output()
>
> udp_output() does do a M_PREPEND() which can return ENOBUFS. ip_output
> can also return ENOBUFS.
>
> it doesn't look like the socket code (eg sosend_dgram()) is doing any
> buffering - it's just copying the frame and stuffing it up to the
> driver. No queuing involved before the NIC.
Right. Thanks for confirming.
>
> So a _well behaved_ driver will return ENOBUFS _and_ not queue the
> frame. However, it's entirely plausible that the driver isn't well
> behaved - the intel drivers screwed up here and there with transmit
> queue and failure to queue vs failure to transmit.
>
> So yeah, try tweaking the tx ring descriptor for the driver your'e
> using and see how big a bufring it's allocating.
Yes, so I am dealing with Broadcom BCM5706/BCM5708 Gigabit Ethernet,
i.e. bce(4).
I bumped up tx_pages from 2 (default) to 8 where each page is 255
buffer descriptors.
I am seeing quite nice improvement on stable/10 where I can send
*more* stuff :-)
cheers,
Hiren
More information about the freebsd-net
mailing list