Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 2003 10:15:12 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        current@freebsd.org
Cc:        pmedwards@eircom.net
Subject:   Re: bge & vlan stranges
Message-ID:  <200308011715.h71HFCBe071755@strings.polstra.com>
In-Reply-To: <1059741739.39578.67.camel@rocklobster.openet-telecom.lan>
References:  <3F2A2B17.4020700@tagnet.ru> <1059741739.39578.67.camel@rocklobster.openet-telecom.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <1059741739.39578.67.camel@rocklobster.openet-telecom.lan>,
Peter Edwards  <pmedwards@eircom.net> wrote:
> Hm. A bit of a stab in the dark, but from sys/dev/bge/if_bge.c, line
> 3185 (on 5.1 release, 2399)
> 
> >         /* Specify MTU. */
> >         CSR_WRITE_4(sc, BGE_RX_MTU, ifp->if_mtu +
> >             ETHER_HDR_LEN + ETHER_CRC_LEN);
> > 
> > 
> Wonder if this should be
>   
> >         /* Specify MTU. */
> >         CSR_WRITE_4(sc, BGE_RX_MTU, ifp->if_mtu +
> >             ETHER_HDR_LEN + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN);
> > 
> 
> Given that bge advertises IFCAP_VLAN_MTU??

Good guess, but the approved way of doing it is to add this code
near the point where IFCAP_VLAN_MTU is set:

    ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);

See "sys/dev/fxp/if_fxp.c" for an example that works.

John
-- 
  John Polstra
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Two buttocks cannot avoid friction."                     -- Malawi saying



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