Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2019 17:19:17 +0000 (UTC)
From:      Eric Joyner <erj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353658 - head/sys/dev/ixl
Message-ID:  <201910161719.x9GHJHux068505@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: erj
Date: Wed Oct 16 17:19:17 2019
New Revision: 353658
URL: https://svnweb.freebsd.org/changeset/base/353658

Log:
  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

Modified:
  head/sys/dev/ixl/ixl_pf_main.c

Modified: head/sys/dev/ixl/ixl_pf_main.c
==============================================================================
--- head/sys/dev/ixl/ixl_pf_main.c	Wed Oct 16 17:16:32 2019	(r353657)
+++ head/sys/dev/ixl/ixl_pf_main.c	Wed Oct 16 17:19:17 2019	(r353658)
@@ -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;
@@ -2676,6 +2677,13 @@ ixl_update_stats_counters(struct ixl_pf *pf)
 	ixl_stat_update32(hw, I40E_GLPRT_LXOFFTXC(hw->port),
 			   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),



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910161719.x9GHJHux068505>