Date: Thu, 22 Jun 2017 05:30:27 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320219 - stable/11/sys/dev/xen/netfront Message-ID: <201706220530.v5M5UR4w039751@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Thu Jun 22 05:30:27 2017 New Revision: 320219 URL: https://svnweb.freebsd.org/changeset/base/320219 Log: MFC r319491: Skip setting the MTU in the netfront driver (xn# devices) if the new MTU is the same as the old MTU. In particular, on Amazon EC2 "T2" instances without this change, the network interface is reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained. Approved by: re (delphij) Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:26:08 2017 (r320218) +++ stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:30:27 2017 (r320219) @@ -1767,6 +1767,9 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif break; case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; + ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xn_ifinit(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706220530.v5M5UR4w039751>