From owner-freebsd-stable Mon Jan 6 11:44: 1 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F9D537B401 for ; Mon, 6 Jan 2003 11:43:59 -0800 (PST) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6060843EE5 for ; Mon, 6 Jan 2003 11:43:55 -0800 (PST) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.6/8.12.6) with ESMTP id h06JhPro023673 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 6 Jan 2003 14:43:26 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id h06JhKk58008; Mon, 6 Jan 2003 14:43:20 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15897.56408.793022.131019@grasshopper.cs.duke.edu> Date: Mon, 6 Jan 2003 14:43:20 -0500 (EST) To: "M. Warner Losh" Cc: freebsd-stable@FreeBSD.ORG Subject: Re: wi0 and mtu setting [bad idea] In-Reply-To: <20030106.102538.57922346.imp@bsdimp.com> References: <20030106.100238.69366019.imp@bsdimp.com> <20030106.102538.57922346.imp@bsdimp.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG M. Warner Losh writes: > > Well, this converstation needs to take place on the net@ list. In > -current, at least, if_ethersubr.c prevents 'ethernet' drivers from > setting the mtu higher. There's some experimental patches that make It doesn't prevent anything. It just sets the mtu to a default of ETHER_MTU, which is what 98% of ethernet drivers want. If you want something higher (or lower) as your default, you just need to reset the mtu after calling ether_ifattach(). For example, the following code at the bottom of my attach function has worked fine for years..: (GM_IP_MTU is 9K on some firmware, 4K on older firmware) #if (__FreeBSD_version >= 500000) ether_ifattach (ifp, sc->is_addr); #elif (__FreeBSD_version >= 410000) ether_ifattach (ifp, ETHER_BPF_SUPPORTED); #else if_attach (ifp); ether_ifattach (ifp); #endif /*ether_ifattach resets mtu */ ifp->if_mtu = GM_IP_MTU; return 0; Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message