svn commit: r353657 - head/sys/dev/ixgbe
Eric Joyner
erj at FreeBSD.org
Wed Oct 16 17:16:33 UTC 2019
Author: erj
Date: Wed Oct 16 17:16:32 2019
New Revision: 353657
URL: https://svnweb.freebsd.org/changeset/base/353657
Log:
ix: report isc_pause_frames during stat update
From Jake:
Notify the iflib stack of whether we received any pause frames during
the timer window. This allows the stack to avoid reporting a Tx hang due
to the device being paused.
Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
Submitted by: Jacob Keller <jacob.e.keller at intel.com>
Reviewed by: gallatin@
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D21869
Modified:
head/sys/dev/ixgbe/if_ix.c
Modified: head/sys/dev/ixgbe/if_ix.c
==============================================================================
--- head/sys/dev/ixgbe/if_ix.c Wed Oct 16 17:13:46 2019 (r353656)
+++ head/sys/dev/ixgbe/if_ix.c Wed Oct 16 17:16:32 2019 (r353657)
@@ -1393,6 +1393,7 @@ ixgbe_update_stats_counters(struct adapter *adapter)
struct ixgbe_hw *hw = &adapter->hw;
struct ixgbe_hw_stats *stats = &adapter->stats.pf;
u32 missed_rx = 0, bprc, lxon, lxoff, total;
+ u32 lxoffrxc;
u64 total_missed_rx = 0;
stats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS);
@@ -1422,15 +1423,24 @@ ixgbe_update_stats_counters(struct adapter *adapter)
stats->tor += IXGBE_READ_REG(hw, IXGBE_TORL) +
((u64)IXGBE_READ_REG(hw, IXGBE_TORH) << 32);
stats->lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXCNT);
- stats->lxoffrxc += IXGBE_READ_REG(hw, IXGBE_LXOFFRXCNT);
+ lxoffrxc = IXGBE_READ_REG(hw, IXGBE_LXOFFRXCNT);
+ stats->lxoffrxc += lxoffrxc;
} else {
stats->lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXC);
- stats->lxoffrxc += IXGBE_READ_REG(hw, IXGBE_LXOFFRXC);
+ lxoffrxc = IXGBE_READ_REG(hw, IXGBE_LXOFFRXC);
+ stats->lxoffrxc += lxoffrxc;
/* 82598 only has a counter in the high register */
stats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCH);
stats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH);
stats->tor += IXGBE_READ_REG(hw, IXGBE_TORH);
}
+
+ /*
+ * For watchdog management we need to know if we have been paused
+ * during the last interval, so capture that here.
+ */
+ if (lxoffrxc)
+ adapter->shared->isc_pause_frames = 1;
/*
* Workaround: mprc hardware is incorrectly counting
More information about the svn-src-all
mailing list