From owner-freebsd-net@FreeBSD.ORG Tue Jan 20 12:42:05 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E45016A4CE for ; Tue, 20 Jan 2004 12:42:05 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5953743D79 for ; Tue, 20 Jan 2004 12:41:23 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 96184 invoked from network); 20 Jan 2004 20:41:22 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 20 Jan 2004 20:41:22 -0000 Message-ID: <400D9271.1259CBC8@freebsd.org> Date: Tue, 20 Jan 2004 21:41:21 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Andrew Gallatin References: <16397.36782.415899.626311@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org Subject: Re: tcp mss MCLBYTES restriction X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2004 20:42:05 -0000 Andrew Gallatin wrote: > > For the case where the mtu is larger than MCLBYTES (2048), FreeBSD's > TCP implementation restricts the mss to a multiple of MCLBYTES. This > appears to have been inherited from 4.4BSD-lite. > > On adapters with 9000 byte jumbo frames, this limits the mss to 8192 > bytes, and wastes nearly 1KB out of each frame. This is especially > annoying because many drivers for adapters which support 9000 byte mtus > allocate their own 9000 byte receive buffers and don't even use mbufs > which are MCLBYTES in length. In this case, the mss restriction guarantees > a nearly 1000 byte wastage per frame. When I was implementing the tcp_hostcache I reorganized/redid the tcp_mss() function and wondered about that too. I don't know if this rounding to MCLBYTES is still the right thing to do. > Would it be OK if I made this code optional via a sysctl? Could you run some bechmarks with the current MCLBYTES rounding and without it on 100Mbit 1.5kMTU and GigE with 9k MTU? -- Andre