From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 20 01:29:49 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D722D16A404; Tue, 20 Mar 2007 01:29:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id C624D13C448; Tue, 20 Mar 2007 01:29:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from freefall.freebsd.org (bms@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2K1Tn5F085107; Tue, 20 Mar 2007 01:29:49 GMT (envelope-from bms@freefall.freebsd.org) Received: (from bms@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2K1Tl2W085103; Tue, 20 Mar 2007 01:29:47 GMT (envelope-from bms) Date: Tue, 20 Mar 2007 01:29:47 GMT From: Bruce M Simpson Message-Id: <200703200129.l2K1Tl2W085103@freefall.freebsd.org> To: wawa@yandex-team.ru, bms@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: Subject: Re: kern/108375: net.inet.raw.maxdgram shouldn't be less than MTU size. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2007 01:29:49 -0000 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