All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Alexander Duyck <alexander.h.duyck@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next v3 12/14] i40evf: Drop i40evf_fire_sw_int as it is prone to races
Date: Wed, 10 Jan 2018 12:46:49 -0800	[thread overview]
Message-ID: <20180110204651.35717-13-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20180110204651.35717-1-jeffrey.t.kirsher@intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>

Having the interrupts firing while we are polling causes extra overhead and
isn't needed for most systems out there. If an interrupt is lost us
experiencing a 2s latency spike before recovering is still not acceptable
and masks the issue. We are better off just identifying systems that lose
interrupts and instead enable workarounds for those systems.

To that end I am dropping the code that was strobing the interrupts as
there is a narrow window where having them enabled can actually cause
race issues anyway where a few stray packets might get misses if the
interrupt is re-enabled and fires before we call napi_complete.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 34 -------------------------
 1 file changed, 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 5fff62a45323..f92587aba3c7 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -281,33 +281,6 @@ void i40evf_irq_enable_queues(struct i40evf_adapter *adapter, u32 mask)
 	}
 }
 
-/**
- * i40evf_fire_sw_int - Generate SW interrupt for specified vectors
- * @adapter: board private structure
- * @mask: bitmap of vectors to trigger
- **/
-static void i40evf_fire_sw_int(struct i40evf_adapter *adapter, u32 mask)
-{
-	struct i40e_hw *hw = &adapter->hw;
-	int i;
-	u32 dyn_ctl;
-
-	if (mask & 1) {
-		dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTL01);
-		dyn_ctl |= I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK |
-			   I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK;
-		wr32(hw, I40E_VFINT_DYN_CTL01, dyn_ctl);
-	}
-	for (i = 1; i < adapter->num_msix_vectors; i++) {
-		if (mask & BIT(i)) {
-			dyn_ctl = rd32(hw, I40E_VFINT_DYN_CTLN1(i - 1));
-			dyn_ctl |= I40E_VFINT_DYN_CTLN1_SWINT_TRIG_MASK |
-				   I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK;
-			wr32(hw, I40E_VFINT_DYN_CTLN1(i - 1), dyn_ctl);
-		}
-	}
-}
-
 /**
  * i40evf_irq_enable - Enable default interrupt generation settings
  * @adapter: board private structure
@@ -1743,13 +1716,6 @@ static void i40evf_watchdog_task(struct work_struct *work)
 	if (adapter->state == __I40EVF_RUNNING)
 		i40evf_request_stats(adapter);
 watchdog_done:
-	if (adapter->state == __I40EVF_RUNNING) {
-		i40evf_irq_enable_queues(adapter, ~0);
-		i40evf_fire_sw_int(adapter, 0xFF);
-	} else {
-		i40evf_fire_sw_int(adapter, 0x1);
-	}
-
 	clear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);
 restart_watchdog:
 	if (adapter->state == __I40EVF_REMOVE)
-- 
2.15.1

  parent reply	other threads:[~2018-01-10 20:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 20:46 [net-next v3 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2018-01-10 Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 01/14] i40e: display priority_xon and priority_xoff stats Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 02/14] i40evf: don't rely on netif_running() outside rtnl_lock() Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 03/14] i40evf: use spinlock to protect (mac|vlan)_filter_list Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 04/14] i40evf: release bit locks in reverse order Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 05/14] i40evf: hold the critical task bit lock while opening Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 06/14] i40e: update VFs of link state after GET_VF_RESOURCES Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 07/14] i40e: add helper conversion function for link_speed Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 08/14] i40e/i40evf: Bump driver versions Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 09/14] i40e: remove redundant initialization of read_size Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 10/14] i40evf: Do not clear MSI-X PBA manually Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 11/14] i40evf: Clean-up flags for promisc mode to avoid high polling rate Jeff Kirsher
2018-01-10 20:46 ` Jeff Kirsher [this message]
2018-01-10 20:46 ` [net-next v3 13/14] i40e: change ppp name to ddp Jeff Kirsher
2018-01-10 20:46 ` [net-next v3 14/14] i40e: track id can be 0 Jeff Kirsher
2018-01-11 17:00 ` [net-next v3 00/14][pull request] 40GbE Intel Wired LAN Driver Updates 2018-01-10 David Miller

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=20180110204651.35717-13-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /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.