All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catherine Sullivan <catherine.sullivan@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S9 05/15] i40e/i40evf: fix tx hang workaround code
Date: Thu, 23 Jul 2015 16:54:34 -0400	[thread overview]
Message-ID: <1437684884-222825-6-git-send-email-catherine.sullivan@intel.com> (raw)
In-Reply-To: <1437684884-222825-1-git-send-email-catherine.sullivan@intel.com>

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

The arm writeback (arm_wb) code is used for kicking the tx ring to
make sure any pending work is completed even if interrupts are
disabled. It was running when it didn't need to, and not clearing
the ring->arm_wb state after it was set.  This caused tx hangs
to still occur occasionally when there really was no hang.
Fix this by resetting the variable right after it was used.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Change-ID: I7bf75d552ba9c4bd203d40615213861a24bb5594
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 3 +--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 738aca6..8a3d596 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -793,8 +793,6 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 	    !test_bit(__I40E_DOWN, &tx_ring->vsi->state) &&
 	    (I40E_DESC_UNUSED(tx_ring) != tx_ring->count))
 		tx_ring->arm_wb = true;
-	else
-		tx_ring->arm_wb = false;
 
 	if (check_for_tx_hang(tx_ring) && i40e_check_tx_hang(tx_ring)) {
 		/* schedule immediate reset if we believe we hung */
@@ -1921,6 +1919,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
 	i40e_for_each_ring(ring, q_vector->tx) {
 		clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
 		arm_wb |= ring->arm_wb;
+		ring->arm_wb = false;
 	}
 
 	/* We attempt to distribute budget to each Rx queue fairly, but don't
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index a584e21..6c353b2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -309,8 +309,6 @@ static bool i40e_clean_tx_irq(struct i40e_ring *tx_ring, int budget)
 	    !test_bit(__I40E_DOWN, &tx_ring->vsi->state) &&
 	    (I40E_DESC_UNUSED(tx_ring) != tx_ring->count))
 		tx_ring->arm_wb = true;
-	else
-		tx_ring->arm_wb = false;
 
 	if (check_for_tx_hang(tx_ring) && i40e_check_tx_hang(tx_ring)) {
 		/* schedule immediate reset if we believe we hung */
@@ -1367,6 +1365,7 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)
 	i40e_for_each_ring(ring, q_vector->tx) {
 		clean_complete &= i40e_clean_tx_irq(ring, vsi->work_limit);
 		arm_wb |= ring->arm_wb;
+		ring->arm_wb = false;
 	}
 
 	/* We attempt to distribute budget to each Rx queue fairly, but don't
-- 
1.9.3


  parent reply	other threads:[~2015-07-23 20:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 20:54 [Intel-wired-lan] [next PATCH S9 00/15] i40e/i40evf updates Catherine Sullivan
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 01/15] i40e/i40evf: fix up type clash in i40e_aq_rc_to_posix conversion Catherine Sullivan
2015-07-28 20:33   ` Bowers, AndrewX
2015-09-29 21:44     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 02/15] i40e: Fix a port VLAN configuration bug Catherine Sullivan
2015-07-29 20:34   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 03/15] i40e: fixup padding issue in get_cee_dcb_cfg_v1_resp Catherine Sullivan
2015-07-28 20:40   ` Bowers, AndrewX
2015-09-29 21:45     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 04/15] i40e: rename variable to prevent clash of understanding Catherine Sullivan
2015-07-28 20:44   ` Bowers, AndrewX
2015-07-23 20:54 ` Catherine Sullivan [this message]
2015-07-28 20:49   ` [Intel-wired-lan] [next PATCH S9 05/15] i40e/i40evf: fix tx hang workaround code Bowers, AndrewX
2015-09-29 21:47     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 06/15] i40e: count drops in netstat interface Catherine Sullivan
2015-07-28 20:51   ` Bowers, AndrewX
2015-09-29 21:48     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 07/15] i40e: use qos field consistently Catherine Sullivan
2015-07-28 20:55   ` Bowers, AndrewX
2015-09-29 21:49     ` Sullivan, Catherine
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 08/15] i40e: limit debugfs io ops Catherine Sullivan
2015-07-28 21:09   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 09/15] i40e: Remove useless message Catherine Sullivan
2015-07-28 21:11   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 10/15] i40e/i40evf: add new device id 1588 Catherine Sullivan
2015-07-28 21:14   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 11/15] i40e: Strip VEB stats if they are disabled in HW Catherine Sullivan
2015-07-28 21:17   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 12/15] i40e: refactor interrupt enable Catherine Sullivan
2015-07-28 21:22   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 13/15] i40e: warn on double free Catherine Sullivan
2015-07-28 21:24   ` Bowers, AndrewX
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 14/15] i40evf: tighten up reset polling Catherine Sullivan
2015-07-23 20:54 ` [Intel-wired-lan] [next PATCH S9 15/15] i40e/i40evf: Bump i40e to 1.3.12 and i40evf to 1.3.6 Catherine Sullivan
2015-07-28 20:26   ` Bowers, AndrewX
2015-07-28 21:25   ` Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437684884-222825-6-git-send-email-catherine.sullivan@intel.com \
    --to=catherine.sullivan@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.