From owner-svn-src-all@FreeBSD.ORG Sat Jan 22 00:19:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C73D4106564A; Sat, 22 Jan 2011 00:19:15 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67C28FC1A; Sat, 22 Jan 2011 00:19:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0M0JFEH072540; Sat, 22 Jan 2011 00:19:15 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0M0JFUO072538; Sat, 22 Jan 2011 00:19:15 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201101220019.p0M0JFUO072538@svn.freebsd.org> From: Jack F Vogel Date: Sat, 22 Jan 2011 00:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217707 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2011 00:19:15 -0000 Author: jfv Date: Sat Jan 22 00:19:15 2011 New Revision: 217707 URL: http://svn.freebsd.org/changeset/base/217707 Log: Don't bother to run the flowcontrol code if there is no change. Thanks to Andrew for the tweak. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Sat Jan 22 00:08:06 2011 (r217706) +++ head/sys/dev/ixgbe/ixgbe.c Sat Jan 22 00:19:15 2011 (r217707) @@ -5268,13 +5268,17 @@ static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS) { int error; + int last = ixgbe_flow_control; struct adapter *adapter; error = sysctl_handle_int(oidp, &ixgbe_flow_control, 0, req); - if (error) return (error); + /* Don't bother if it's not changed */ + if (ixgbe_flow_control == last) + return (0); + adapter = (struct adapter *) arg1; switch (ixgbe_flow_control) { case ixgbe_fc_rx_pause: