summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2011-01-22 00:19:15 +0000
committerjfv <jfv@FreeBSD.org>2011-01-22 00:19:15 +0000
commit809122d5c7c9019a4d1ff6ae7205400a6ca76f88 (patch)
tree2b7bd78ca918713f79c4c54e5371e9793315594d /sys/dev/ixgbe
parent2d67362e244f13858077c2e34f243a553ce8e2aa (diff)
downloadFreeBSD-src-809122d5c7c9019a4d1ff6ae7205400a6ca76f88.zip
FreeBSD-src-809122d5c7c9019a4d1ff6ae7205400a6ca76f88.tar.gz
Don't bother to run the flowcontrol code if there
is no change. Thanks to Andrew for the tweak.
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r--sys/dev/ixgbe/ixgbe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ixgbe/ixgbe.c b/sys/dev/ixgbe/ixgbe.c
index bfd5715..127f57d 100644
--- a/sys/dev/ixgbe/ixgbe.c
+++ b/sys/dev/ixgbe/ixgbe.c
@@ -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:
OpenPOWER on IntegriCloud