netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: "Garzik, Jeff" <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, "Brandeburg,
	Jesse" <jesse.brandeburg@intel.com>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	"Kok, Auke" <auke@foo-projects.org>,
	"Ronciak, John" <john.ronciak@intel.com>
Subject: [PATCH 09/18] e1000: Remove unneeded and unwanted memsets
Date: Wed, 01 Nov 2006 09:51:49 -0800	[thread overview]
Message-ID: <20061101175148.2356.73152.stgit@gitlost.site> (raw)
In-Reply-To: <20061101175043.2356.13659.stgit@gitlost.site>


This memsetting was added in a paranoid rage debugging TX hangs, but
are no longer of importance. We can beef up the performance quite a
bit removing them. Make sure to fill in next_to_watch to allow this.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---

 drivers/net/e1000/e1000_main.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7f3d243..2cd5009 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1993,10 +1993,13 @@ e1000_unmap_and_free_tx_resource(struct 
 				buffer_info->dma,
 				buffer_info->length,
 				PCI_DMA_TODEVICE);
+		buffer_info->dma = 0;
 	}
-	if (buffer_info->skb)
+	if (buffer_info->skb) {
 		dev_kfree_skb_any(buffer_info->skb);
-	memset(buffer_info, 0, sizeof(struct e1000_buffer));
+		buffer_info->skb = NULL;
+	}
+	/* buffer_info must be completely set up in the transmit path */
 }
 
 /**
@@ -2661,6 +2664,7 @@ e1000_tso(struct e1000_adapter *adapter,
 		context_desc->cmd_and_length = cpu_to_le32(cmd_length);
 
 		buffer_info->time_stamp = jiffies;
+		buffer_info->next_to_watch = i;
 
 		if (++i == tx_ring->count) i = 0;
 		tx_ring->next_to_use = i;
@@ -2695,6 +2699,7 @@ e1000_tx_csum(struct e1000_adapter *adap
 		context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT);
 
 		buffer_info->time_stamp = jiffies;
+		buffer_info->next_to_watch = i;
 
 		if (unlikely(++i == tx_ring->count)) i = 0;
 		tx_ring->next_to_use = i;
@@ -2763,6 +2768,7 @@ e1000_tx_map(struct e1000_adapter *adapt
 				size,
 				PCI_DMA_TODEVICE);
 		buffer_info->time_stamp = jiffies;
+		buffer_info->next_to_watch = i;
 
 		len -= size;
 		offset += size;
@@ -2802,6 +2808,7 @@ e1000_tx_map(struct e1000_adapter *adapt
 					size,
 					PCI_DMA_TODEVICE);
 			buffer_info->time_stamp = jiffies;
+			buffer_info->next_to_watch = i;
 
 			len -= size;
 			offset += size;
@@ -3620,7 +3627,7 @@ e1000_clean_tx_irq(struct e1000_adapter 
 			cleaned = (i == eop);
 
 			e1000_unmap_and_free_tx_resource(adapter, buffer_info);
-			memset(tx_desc, 0, sizeof(struct e1000_tx_desc));
+			tx_desc->upper.data = 0;
 
 			if (unlikely(++i == tx_ring->count)) i = 0;
 		}



---
Auke Kok <auke-jan.h.kok@intel.com>

  parent reply	other threads:[~2006-11-01 17:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 17:50 [PATCH 00/18] e1000: features, updates, documentation Kok, Auke
2006-11-01 17:51 ` [PATCH 01/18] e1000: whitespace changes, comments, typos Kok, Auke
2006-11-01 17:51 ` [PATCH 02/18] e1000: Remove DISABLE_MULR debug code Kok, Auke
2006-11-01 17:51 ` [PATCH 03/18] e1000: FIX: enable hw TSO for IPV6 Kok, Auke
2006-11-01 17:51 ` [PATCH 04/18] e1000: Enble early receive (ERT) on 82573 Kok, Auke
2006-11-01 17:51 ` [PATCH 05/18] e1000: add mmiowb() for IA64 to sync tail writes Kok, Auke
2006-11-01 17:51 ` [PATCH 06/18] e1000: fix VR powerdown code Kok, Auke
2006-11-01 17:51 ` [PATCH 07/18] e1000: reorder pci-e infor struct Kok, Auke
2006-11-01 17:51 ` [PATCH 08/18] e1000: simplify skb_put call Kok, Auke
2006-11-01 17:51 ` Kok, Auke [this message]
2006-11-01 17:51 ` [PATCH 10/18] e1000: New hardware support Kok, Auke
2006-11-01 17:51 ` [PATCH 11/18] e1000: add queue restart counter Kok, Auke
2006-11-01 17:51 ` [PATCH 12/18] e1000: rename ICH8 flash macros Kok, Auke
2006-11-01 17:51 ` [PATCH 13/18] e1000: Only set IDE for tx when we are using TIDV/TADV Kok, Auke
2006-11-01 17:52 ` [PATCH 14/18] e1000: reorder e1000_param.c Kok, Auke
2006-11-01 17:52 ` [PATCH 15/18] e1000: add dynamic generic MSI interrupt routine Kok, Auke
2006-11-01 17:52 ` [PATCH 16/18] e1000: add dynamic itr modes Kok, Auke
2006-11-01 17:52 ` [PATCH 17/18] e1000: increment version to 7.3.15-k2 Kok, Auke
2006-11-01 17:52 ` [PATCH 18/18] e1000: update README for e1000 Kok, Auke
2006-11-06  8:08 ` [PATCH 00/18] e1000: features, updates, documentation Jeff Garzik
2006-11-06 15:23   ` Auke Kok

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=20061101175148.2356.73152.stgit@gitlost.site \
    --to=auke-jan.h.kok@intel.com \
    --cc=auke@foo-projects.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.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 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).