From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Anjali Singhai Jain <anjali.singhai@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 09/15] i40e: Do not disable queues in the Legacy/MSI Interrupt handler
Date: Thu, 18 Feb 2016 01:04:06 -0800 [thread overview]
Message-ID: <1455786252-71881-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1455786252-71881-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Anjali Singhai Jain <anjali.singhai@intel.com>
The queues should never be enabled/disabled in the interrupt handler,
ICR0 interrupt enable should be the only thing that needs to be
dynamically changed in the handler.
This patch fixes that. Without this patch X722 platforms were
seeing weird ping timings when in Legacy mode since it takes
a whole lot of time for the HW/FW to re-enable queues.
Change-ID: If065afc45d81c5a19d4a94a00cd5b8f61cefc40c
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++----------
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 13 -------------
2 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index adb2a04..7869d74 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3462,16 +3462,12 @@ static irqreturn_t i40e_intr(int irq, void *data)
struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi];
struct i40e_q_vector *q_vector = vsi->q_vectors[0];
- /* temporarily disable queue cause for NAPI processing */
- u32 qval = rd32(hw, I40E_QINT_RQCTL(0));
-
- qval &= ~I40E_QINT_RQCTL_CAUSE_ENA_MASK;
- wr32(hw, I40E_QINT_RQCTL(0), qval);
-
- qval = rd32(hw, I40E_QINT_TQCTL(0));
- qval &= ~I40E_QINT_TQCTL_CAUSE_ENA_MASK;
- wr32(hw, I40E_QINT_TQCTL(0), qval);
-
+ /* We do not have a way to disarm Queue causes while leaving
+ * interrupt enabled for all other causes, ideally
+ * interrupt should be disabled while we are in NAPI but
+ * this is not a performance path and napi_schedule()
+ * can deal with rescheduling.
+ */
if (!test_bit(__I40E_DOWN, &pf->state))
napi_schedule_irqoff(&q_vector->napi);
}
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 25e378c..65f2fd8 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2051,19 +2051,6 @@ tx_only:
if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
i40e_update_enable_itr(vsi, q_vector);
} else { /* Legacy mode */
- struct i40e_hw *hw = &vsi->back->hw;
- /* We re-enable the queue 0 cause, but
- * don't worry about dynamic_enable
- * because we left it on for the other
- * possible interrupts during napi
- */
- u32 qval = rd32(hw, I40E_QINT_RQCTL(0)) |
- I40E_QINT_RQCTL_CAUSE_ENA_MASK;
-
- wr32(hw, I40E_QINT_RQCTL(0), qval);
- qval = rd32(hw, I40E_QINT_TQCTL(0)) |
- I40E_QINT_TQCTL_CAUSE_ENA_MASK;
- wr32(hw, I40E_QINT_TQCTL(0), qval);
i40e_irq_dynamic_enable_icr0(vsi->back, false);
}
return 0;
--
2.5.0
next prev parent reply other threads:[~2016-02-18 9:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 9:03 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-17 Jeff Kirsher
2016-02-18 9:03 ` [net-next 01/15] i40e: get rid of magic number Jeff Kirsher
2016-02-18 9:03 ` [net-next 02/15] i40e: drop unused debugfs file "dump" Jeff Kirsher
2016-02-18 9:04 ` [net-next 03/15] i40evf: support packet split receive Jeff Kirsher
2016-02-18 9:04 ` [net-next 04/15] i40e: trivial: cleanup use of pf->hw Jeff Kirsher
2016-02-18 9:04 ` [net-next 05/15] i40e: Add a SW workaround for lost interrupts Jeff Kirsher
2016-02-18 9:04 ` [net-next 06/15] i40e: Fix PROMISC mode for Multi-function per port (MFP) devices Jeff Kirsher
2016-02-18 9:04 ` [net-next 07/15] i40e: Removal of code which relies on BASE VEB SEID Jeff Kirsher
2016-02-18 9:04 ` [net-next 08/15] i40e/i40evf: avoid atomics Jeff Kirsher
2016-02-18 9:04 ` Jeff Kirsher [this message]
2016-02-18 9:04 ` [net-next 10/15] i40e: expand comment Jeff Kirsher
2016-02-18 9:04 ` [net-next 11/15] i40e: better error reporting for nvmupdate Jeff Kirsher
2016-02-18 9:04 ` [net-next 12/15] i40evf: set adapter state on reset failure Jeff Kirsher
2016-02-18 9:04 ` [net-next 13/15] i40e: clean event descriptor before use Jeff Kirsher
2016-02-18 9:04 ` [net-next 14/15] i40e: When in promisc mode apply promisc mode to Tx Traffic as well Jeff Kirsher
2016-02-18 9:04 ` [net-next 15/15] i40e/i40evf: Bump i40e to 1.4.15 and i40evf to 1.4.11 Jeff Kirsher
2016-02-18 15:33 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2016-02-17 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=1455786252-71881-10-git-send-email-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=anjali.singhai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).