bge & vlan stranges

John Polstra jdp at polstra.com
Fri Aug 1 10:15:22 PDT 2003


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


More information about the freebsd-current mailing list