netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 14/15] i40e: use stored base_queue value
Date: Wed, 11 Jun 2014 09:33:23 -0700	[thread overview]
Message-ID: <1402504404-8954-15-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1402504404-8954-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Shannon Nelson <shannon.nelson@intel.com>

No need to read the PCI register for the PF's base queue on every single Tx
queue enable and disable as we already have the value stored from reading
the capability features at startup.

Change-ID: Ic02fb622757742f43cb8269369c3d972d4f66555
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index 8e4b33c..6e65f19 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -665,10 +665,9 @@ i40e_status i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
  **/
 void i40e_pre_tx_queue_cfg(struct i40e_hw *hw, u32 queue, bool enable)
 {
-	u32 reg_val = rd32(hw, I40E_PFLAN_QALLOC);
-	u32 first_queue = (reg_val & I40E_PFLAN_QALLOC_FIRSTQ_MASK);
-	u32 abs_queue_idx = first_queue + queue;
+	u32 abs_queue_idx = hw->func_caps.base_queue + queue;
 	u32 reg_block = 0;
+	u32 reg_val;
 
 	if (abs_queue_idx >= 128)
 		reg_block = abs_queue_idx / 128;
-- 
1.9.3

  parent reply	other threads:[~2014-06-11 16:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 16:33 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2014-06-11 Jeff Kirsher
2014-06-11 16:33 ` [net-next 01/15] igb: unhide invariant returns Jeff Kirsher
2014-06-11 16:33 ` [net-next 02/15] igb: separate hardware setting from the set_ts_config ioctl Jeff Kirsher
2014-06-11 16:33 ` [net-next 03/15] i40e/i40evf: set headwb Tx context flags and use them Jeff Kirsher
2014-06-11 16:33 ` [net-next 04/15] i40e/i40evf: AdminQ API update for new FW Jeff Kirsher
2014-06-11 16:33 ` [net-next 05/15] i40e: Change the notion of src and dst for FD_SB in ethtool Jeff Kirsher
2014-06-11 16:33 ` [net-next 06/15] i40evf: don't go further down Jeff Kirsher
2014-06-11 16:33 ` [net-next 07/15] i40e: Separate out DCB capability and enabled flags Jeff Kirsher
2014-06-12  8:22   ` Or Gerlitz
2014-06-12 16:59     ` Parikh, Neerav
2014-06-11 16:33 ` [net-next 08/15] i40e: Do not accept tagged packets by default Jeff Kirsher
2014-06-11 16:33 ` [net-next 09/15] i40e/i40evf: User ether_addr_copy instead of memcpy Jeff Kirsher
2014-06-11 16:33 ` [net-next 10/15] i40evf: check admin queue error bits Jeff Kirsher
2014-06-11 16:33 ` [net-next 11/15] i40e/i40evf: remove FTYPE Jeff Kirsher
2014-06-11 16:33 ` [net-next 12/15] i40e/i40evf: Add Flow director stats to PF stats Jeff Kirsher
2014-06-11 16:33 ` [net-next 13/15] i40e: Fix a bug in ethtool for FD drop packet filter action Jeff Kirsher
2014-06-11 16:33 ` Jeff Kirsher [this message]
2014-06-11 16:33 ` [net-next 15/15] i40e/i40evf: Bump i40e to version 0.4.10 and i40evf to 0.9.34 Jeff Kirsher
2014-06-11 19:25 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2014-06-11 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=1402504404-8954-15-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.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).