Re: bge & vlan stranges

From: John Polstra <jdp_at_polstra.com>
Date: Fri, 1 Aug 2003 10:15:12 -0700 (PDT)
In article <1059741739.39578.67.camel_at_rocklobster.openet-telecom.lan>,
Peter Edwards  <pmedwards_at_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
Received on Fri Aug 01 2003 - 08:15:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:17 UTC