Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 19:26:10 -0700 (PDT)
From:      Doug Ambrisko <ambrisko@ambrisko.com>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        Mike Tancsa <mike@sentex.net>
Subject:   Re: vlan0 on em0 has mtu 1496
Message-ID:  <200304180226.h3I2QAu1099873@www.ambrisko.com>
In-Reply-To: <20030418004010.GA25152@Odin.AC.HMC.Edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304180226.h3I2QAu1099873>