public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] e1000: Simple optimizations in e1000_xmit_frame
@ 2007-10-05 21:15 Auke Kok
  2007-10-05 21:15 ` [PATCH 2/2] e1000e: " Auke Kok
  2007-10-10  0:38 ` [PATCH 1/2] e1000: " Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Auke Kok @ 2007-10-05 21:15 UTC (permalink / raw)
  To: jeff; +Cc: netdev, krkumar2

From: Krishna Kumar <krkumar2@in.ibm.com>

Some simple optimizations in e1000_xmit_frame.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---

 drivers/net/e1000/e1000_main.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 10505de..0472638 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3261,14 +3261,13 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 	unsigned int first, max_per_txd = E1000_MAX_DATA_PER_TXD;
 	unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
 	unsigned int tx_flags = 0;
-	unsigned int len = skb->len;
+	unsigned int len = skb->len - skb->data_len;
 	unsigned long flags;
-	unsigned int nr_frags = 0;
-	unsigned int mss = 0;
+	unsigned int nr_frags;
+	unsigned int mss;
 	int count = 0;
 	int tso;
 	unsigned int f;
-	len -= skb->data_len;
 
 	/* This goes back to the question of how to logically map a tx queue
 	 * to a flow.  Right now, performance is impacted slightly negatively
@@ -3302,7 +3301,7 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 		* points to just header, pull a few bytes of payload from
 		* frags into skb->data */
 		hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
-		if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) {
+		if (skb->data_len && hdr_len == len) {
 			switch (adapter->hw.mac_type) {
 				unsigned int pull_size;
 			case e1000_82544:

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-10  0:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 21:15 [PATCH 1/2] e1000: Simple optimizations in e1000_xmit_frame Auke Kok
2007-10-05 21:15 ` [PATCH 2/2] e1000e: " Auke Kok
2007-10-10  0:38 ` [PATCH 1/2] e1000: " Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox