Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2007 01:29:47 GMT
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        wawa@yandex-team.ru, bms@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject:   Re: kern/108375: net.inet.raw.maxdgram shouldn't be less than MTU size.
Message-ID:  <200703200129.l2K1Tl2W085103@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
Synopsis: net.inet.raw.maxdgram shouldn't be less than MTU size.

State-Changed-From-To: open->feedback
State-Changed-By: bms
State-Changed-When: Tue Mar 20 01:28:38 UTC 2007
State-Changed-Why: 
Hi,

Unfortunately we can't auto-tune the size of the mbuf allocation for
a given socket based on interface MTU until the socket is bound. In
many situations a socket may not be bound.

udp_sendspace is used to call sbreserve() to reserve mbuf allocation
on udp_attach.

The legacy HARP ATM code does call sbreserve() to autotune socket buffers
based on the SDU size used for an AAL5 connection but this is largely of
historical interest and not relevant to UDP/IP.

XORP, for example, does not suffer from this problem, as it uses SO_SNDBUF
to allocate more receive buffers. So the problem you are seeing can
actually be solved in the application; it is possible to discover the
interface MTU by using SIOCGIFCONF and examining ifr_mtu and then
autotune SO_SNDBUF based on that.

Perhaps quagga's ospfd could be patched to do the same.

Is it OK to close this PR?

Thanks!
BMS


http://www.freebsd.org/cgi/query-pr.cgi?pr=108375



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