From owner-freebsd-net@FreeBSD.ORG Thu Apr 17 19:26:12 2003 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 E8BF937B401 for ; Thu, 17 Apr 2003 19:26:11 -0700 (PDT) Received: from www.ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 467A043FDD for ; Thu, 17 Apr 2003 19:26:11 -0700 (PDT) (envelope-from ambrisko@www.ambrisko.com) Received: from www.ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.8p1/8.12.8) with ESMTP id h3I2QAO7099874; Thu, 17 Apr 2003 19:26:10 -0700 (PDT) (envelope-from ambrisko@www.ambrisko.com) Received: (from ambrisko@localhost) by www.ambrisko.com (8.12.8p1/8.12.8/Submit) id h3I2QAu1099873; Thu, 17 Apr 2003 19:26:10 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200304180226.h3I2QAu1099873@www.ambrisko.com> In-Reply-To: <20030418004010.GA25152@Odin.AC.HMC.Edu> To: Brooks Davis Date: Thu, 17 Apr 2003 19:26:10 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII cc: freebsd-net@freebsd.org cc: Mike Tancsa Subject: Re: vlan0 on em0 has mtu 1496 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: Fri, 18 Apr 2003 02:26:12 -0000 Brooks Davis writes: -- Start of PGP signed section. | On Thu, Apr 17, 2003 at 08:34:47PM -0400, Mike Tancsa wrote: | > At 05:19 PM 17/04/2003 -0700, Brooks Davis wrote: | > >On Thu, Apr 17, 2003 at 08:13:55PM -0400, David Gilbert wrote: | > >> Why does a vlan created against em0 have a mtu of 1496. | > > | > >Because the vlan header takes up 4 bytes. With em(4) devices it looks | > >like fixing that should be a simple matter of raising the real | > >interface's MTU to 1504. | > | > Why the difference in behavior vs how the fxp driver works with respect to | > vlans ? | | I don't know. In current both have the VLAN_MTU capability set, but I | don't seem to be getting consistant results from 4.x systems. I think it needs this: #if __FreeBSD_version >= 500000 ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; #endif changed to: /* * Tell the upper layer(s) we support long frames. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); #if __FreeBSD_version >= 500000 ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; #endif to work for both -stable and -current. Tomorrow I can test it out at work, if someone beats me to it and commit it that's fine. Doug A.