svn commit: r217707 - head/sys/dev/ixgbe

Jack F Vogel jfv at FreeBSD.org
Sat Jan 22 00:19:15 UTC 2011


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:


More information about the svn-src-all mailing list