svn commit: r319491 - head/sys/dev/xen/netfront

Colin Percival cperciva at tarsnap.com
Fri Jun 2 19:40:35 UTC 2017


On 06/02/17 03:29, Roger Pau Monn� wrote:
> On Fri, Jun 02, 2017 at 07:03:31AM +0000, Colin Percival wrote:
>>   Skip setting the MTU in the netfront driver (xn# devices) if the new MTU
>>   is the same as the old MTU. [...]
>>   Maintainers of other network interface drivers may wish to consider making
>>   the corresponding change; the handling of SIOCSIFMTU does not seem to
>>   exhibit a great deal of consistency between drivers.
> 
> Is there any reason this check (ifp->if_mtu == ifr->ifr_mtu) is not
> done at a higher level for all the drivers? It seems pointless to add
> this chunk everywhere.

I wondered about that.  Some drivers already do this (if_sk, if_age, if_jme,
if_tx, if_bge, if_vge, ...) but every driver seems to spell it differently;
and many drivers do things beyond merely recording the new value and
re-initializing.

I certainly have no objection to seeing a more generic handling of interface
MTU setting, but I don't know enough about the network stack to do this
myself.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid


More information about the svn-src-head mailing list