From owner-svn-src-head@freebsd.org Thu May 10 09:33:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E080FBEF40; Thu, 10 May 2018 09:33:00 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C16336C7EE; Thu, 10 May 2018 09:32:59 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CFD51E95A; Thu, 10 May 2018 09:32:59 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4A9WxXa072656; Thu, 10 May 2018 09:32:59 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4A9WxvQ072655; Thu, 10 May 2018 09:32:59 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201805100932.w4A9WxvQ072655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Thu, 10 May 2018 09:32:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333454 - head/sys/dev/ena X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: head/sys/dev/ena X-SVN-Commit-Revision: 333454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 09:33:00 -0000 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 Reviewed by: Michal Krawczyk 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);