On 2007/08/03 16:18, Chris Cappuccio wrote:
> Stuart Henderson [EMAIL PROTECTED] wrote:
> >  
> >     case SIOCSIFMTU:
> > -           if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN)
> > +           if (ifr->ifr_mtu > ETHERMTU + ETHER_VLAN_ENCAP_LEN || 
> > +               ifr->ifr_mtu < ETHERMIN)
> >                     error = EINVAL;
> >             else if (ifp->if_mtu != ifr->ifr_mtu)
> >                     ifp->if_mtu = ifr->ifr_mtu;
> 
> This isn't the idea.  The MTU is not supposed to be set to 1504, it stays
> at 1500 and if_vlan sees IFCAP_VLAN_MTU and knows that the chip actually
> supports MTU + EVL_ENCAPLEN.

damn, yes you're right. Scrub this bit of the diff then.

> With this change, then on several chips, if the
> user expected to set 1504 and then use if_vlan on top of that (say, to pass
> packets that are alreay tagged by another device) then it would fail.

btw, you can stack tags (e.g. vlanYYY vlandev vlanXXX), at least on some
nics.

Reply via email to