netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Catherine Sullivan <catherine.sullivan@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 08/16] i40e/i40evf: reduce context descriptors
Date: Mon, 17 Mar 2014 05:45:08 -0700	[thread overview]
Message-ID: <1395060316-16897-9-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1395060316-16897-1-git-send-email-jeffrey.t.kirsher@intel.com>

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

We don't need context descriptors for every packet, only tso
or timesync.  This fixes a bug in the driver where it would
always add a context even if all the passed in values
to the context descriptor function were 0/default values.

Change-ID: I0101d2b893380707b5c2de61aab3e16d4310e9a1
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 3 ++-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 9892a69..752e680 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1950,7 +1950,8 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring,
 	struct i40e_tx_context_desc *context_desc;
 	int i = tx_ring->next_to_use;
 
-	if (!cd_type_cmd_tso_mss && !cd_tunneling && !cd_l2tag2)
+	if ((cd_type_cmd_tso_mss == I40E_TX_DESC_DTYPE_CONTEXT) &&
+	    !cd_tunneling && !cd_l2tag2)
 		return;
 
 	/* grab the next descriptor */
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index d4d9842..18f174d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1285,7 +1285,8 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring,
 	struct i40e_tx_context_desc *context_desc;
 	int i = tx_ring->next_to_use;
 
-	if (!cd_type_cmd_tso_mss && !cd_tunneling && !cd_l2tag2)
+	if ((cd_type_cmd_tso_mss == I40E_TX_DESC_DTYPE_CONTEXT) &&
+	    !cd_tunneling && !cd_l2tag2)
 		return;
 
 	/* grab the next descriptor */
-- 
1.8.3.1

  parent reply	other threads:[~2014-03-17 12:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 12:45 [net-next 00/16][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-17 12:45 ` [net-next 01/16] i40e: support VF link state ndo Jeff Kirsher
2014-03-17 21:24   ` Or Gerlitz
2014-03-17 21:40     ` Williams, Mitch A
2014-03-17 12:45 ` [net-next 02/16] i40evf: correctly program RSS HLUT table Jeff Kirsher
2014-03-17 12:45 ` [net-next 03/16] i40evf: Support RSS option in ethtool Jeff Kirsher
2014-03-17 14:40   ` Or Gerlitz
2014-03-17 18:55     ` Williams, Mitch A
2014-03-17 21:19       ` Or Gerlitz
2014-03-17 18:53   ` Ben Hutchings
2014-03-17 18:55     ` Williams, Mitch A
2014-03-26 19:21     ` Williams, Mitch A
2014-03-28  0:14       ` Ben Hutchings
2014-03-28 17:05         ` Williams, Mitch A
2014-03-17 12:45 ` [net-next 04/16] i40evf: use min_t Jeff Kirsher
2014-03-17 12:45 ` [net-next 05/16] i40e: Patch to enable Ethtool/netdev feature flag for NTUPLE control Jeff Kirsher
2014-03-17 12:45 ` [net-next 06/16] i40e: Refactor and cleanup i40e_open(), adding i40e_vsi_open() Jeff Kirsher
2014-03-17 12:45 ` [net-next 07/16] i40e/i40evf: enable hardware feature head write back Jeff Kirsher
2014-03-17 12:45 ` Jeff Kirsher [this message]
2014-03-17 12:45 ` [net-next 09/16] i40e: potential array underflow in i40e_vc_process_vf_msg() Jeff Kirsher
2014-03-17 12:45 ` [net-next 10/16] i40e/i40evf: Bump build versions Jeff Kirsher
2014-03-17 12:45 ` [net-next 11/16] e1000e: Fix Hardware Unit Hang Jeff Kirsher
2014-03-17 12:45 ` [net-next 12/16] e1000e: Fix Explicitly set Transmit Control Register Jeff Kirsher
2014-03-17 12:45 ` [net-next 13/16] igb: Add register defines needed for time sync functions Jeff Kirsher
2014-03-17 12:45 ` [net-next 14/16] ixgbe: add ixgbe_write_pci_cfg_word with ixgbe_removed check Jeff Kirsher
2014-03-17 12:45 ` [net-next 15/16] ixgbevf: Indicate removal state explicitly Jeff Kirsher
2014-03-17 12:45 ` [net-next 16/16] ixgbevf: Protect ixgbevf_down with __IXGBEVF_DOWN bit Jeff Kirsher

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=1395060316-16897-9-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=catherine.sullivan@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --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).