From owner-svn-src-head@freebsd.org Wed Oct 16 17:19:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4349614BB5A; Wed, 16 Oct 2019 17:19:18 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46tfD60N2Kz43Qv; Wed, 16 Oct 2019 17:19:18 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0E08A443; Wed, 16 Oct 2019 17:19:17 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9GHJHmS068506; Wed, 16 Oct 2019 17:19:17 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9GHJHux068505; Wed, 16 Oct 2019 17:19:17 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201910161719.x9GHJHux068505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Wed, 16 Oct 2019 17:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353658 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: erj X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 353658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2019 17:19:18 -0000 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 Submitted by: Jacob Keller 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),