Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jun 2017 19:40:27 +0000
From:      Colin Percival <cperciva@tarsnap.com>
To:        =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <roger.pau@citrix.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r319491 - head/sys/dev/xen/netfront
Message-ID:  <0100015c6a52c2bd-bd20846f-2206-411a-9488-38aeec23acbf-000000@email.amazonses.com>
In-Reply-To: <20170602102922.stlu47ceumggu6o7@dhcp-3-128.uk.xensource.com>
References:  <201706020703.v5273V5A085287@repo.freebsd.org> <20170602102922.stlu47ceumggu6o7@dhcp-3-128.uk.xensource.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0100015c6a52c2bd-bd20846f-2206-411a-9488-38aeec23acbf-000000>