sthen@ says this is likely a bit optimistic. while most of our drivers 
unconditionally configure their max mru, there's some stupid ones that still 
interpret the configured mtu as a what the mru should be.

dlg

On 21 Aug 2014, at 6:29, Chris Cappuccio <ch...@nmedia.net> wrote:

> ok chris@ 
> 
> David Gwynne [da...@gwynne.id.au] wrote:
>> this lets you have networks on the "native" vlan on an interface
>> at 1500, while setting a child vlan interfaces mtu to jumbos.
>> 
>> ok?
>> 
>> Index: if_vlan.c
>> ===================================================================
>> RCS file: /cvs/src/sys/net/if_vlan.c,v
>> retrieving revision 1.108
>> diff -u -p -r1.108 if_vlan.c
>> --- if_vlan.c        12 Jul 2014 18:44:22 -0000      1.108
>> +++ if_vlan.c        19 Aug 2014 23:52:15 -0000
>> @@ -528,9 +528,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
>>      case SIOCSIFMTU:
>>              if (ifv->ifv_p != NULL) {
>>                      if (ifv->ifv_p->if_capabilities & IFCAP_VLAN_MTU)
>> -                            p_mtu = ifv->ifv_p->if_mtu;
>> +                            p_mtu = ifv->ifv_p->if_hardmtu;
>>                      else
>> -                            p_mtu = ifv->ifv_p->if_mtu - EVL_ENCAPLEN;
>> +                            p_mtu = ifv->ifv_p->if_hardmtu - EVL_ENCAPLEN;
>>                      
>>                      if (ifr->ifr_mtu > p_mtu || ifr->ifr_mtu < ETHERMIN)
>>                              error = EINVAL;


Reply via email to