Date: Thu, 10 May 2018 09:32:59 +0000 (UTC) From: Marcin Wojtas <mw@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333454 - head/sys/dev/ena Message-ID: <201805100932.w4A9WxvQ072655@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mw Date: Thu May 10 09:32:59 2018 New Revision: 333454 URL: https://svnweb.freebsd.org/changeset/base/333454 Log: Skip setting the MTU for ENA if it is not changing On AWS, a network interface can get reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained. This can cause packet drop, along with annoying syslog messages. Skip setting the MTU in the ena driver if the new MTU is the same as the old MTU. Note this fix is already in the netfront driver. Testing: Verified ena up/down messages do not appear every 30 min in /var/log/messages with the fix in place. Submitted by: Krishna Yenduri <kyenduri@brkt.com> Reviewed by: Michal Krawczyk <mk@semihalf.com> Modified: head/sys/dev/ena/ena.c Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Thu May 10 09:25:51 2018 (r333453) +++ head/sys/dev/ena/ena.c Thu May 10 09:32:59 2018 (r333454) @@ -2368,6 +2368,8 @@ ena_ioctl(if_t ifp, u_long command, caddr_t data) rc = 0; switch (command) { case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; sx_xlock(&adapter->ioctl_sx); ena_down(adapter);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805100932.w4A9WxvQ072655>