aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixl
diff options
context:
space:
mode:
authorEric Joyner <erj@FreeBSD.org>2019-10-16 17:19:17 +0000
committerEric Joyner <erj@FreeBSD.org>2019-10-16 17:19:17 +0000
commitf17e0a71cd65dcfa16e89a4c139e86921711cf38 (patch)
tree2bbc2ea73119714a25f589189a9b63b7875ccdef /sys/dev/ixl
parente37d3dc11c2087cc3ce3e87176638eecf5e99243 (diff)
downloadsrc-f17e0a71cd65dcfa16e89a4c139e86921711cf38.tar.gz
src-f17e0a71cd65dcfa16e89a4c139e86921711cf38.zip
ixl: report whether device received pause frames
From Jake: When updating the device statistics, report whether or not we have received any pause frames to the iflib stack. This allows the iflib stack to avoid generating a Tx hang message while the device is paused. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: gallatin@ Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D21870
Notes
Notes: svn path=/head/; revision=353658
Diffstat (limited to 'sys/dev/ixl')
-rw-r--r--sys/dev/ixl/ixl_pf_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c
index f385877ffa72..14fe548ce121 100644
--- a/sys/dev/ixl/ixl_pf_main.c
+++ b/sys/dev/ixl/ixl_pf_main.c
@@ -2592,6 +2592,7 @@ ixl_update_stats_counters(struct ixl_pf *pf)
struct i40e_hw *hw = &pf->hw;
struct ixl_vsi *vsi = &pf->vsi;
struct ixl_vf *vf;
+ u64 prev_link_xoff_rx = pf->stats.link_xoff_rx;
struct i40e_hw_port_stats *nsd = &pf->stats;
struct i40e_hw_port_stats *osd = &pf->stats_offsets;
@@ -2677,6 +2678,13 @@ ixl_update_stats_counters(struct ixl_pf *pf)
pf->stat_offsets_loaded,
&osd->link_xoff_tx, &nsd->link_xoff_tx);
+ /*
+ * For watchdog management we need to know if we have been paused
+ * during the last interval, so capture that here.
+ */
+ if (pf->stats.link_xoff_rx != prev_link_xoff_rx)
+ adapter->shared->isc_pause_frames = 1;
+
/* Packet size stats rx */
ixl_stat_update48(hw, I40E_GLPRT_PRC64H(hw->port),
I40E_GLPRT_PRC64L(hw->port),