kern/108375: net.inet.raw.maxdgram shouldn't be less than MTU size.

Bruce M Simpson bms at FreeBSD.org
Tue Mar 20 01:29:49 UTC 2007


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


More information about the freebsd-bugs mailing list