aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2007-10-05 17:15:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:24 -0400
commit6d1e3aa7bd47faacc08fdda8f58896bfd13ad90a (patch)
treeb75a92a80167f1e43996a71602451b71280ef606 /drivers
parente2f036da2f8f72894988670953a1141da785e4f5 (diff)
e1000: Simple optimizations in e1000_xmit_frame
Some simple optimizations in e1000_xmit_frame. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/e1000_main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 10505de00bcc..047263830e6a 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)
3261 unsigned int first, max_per_txd = E1000_MAX_DATA_PER_TXD; 3261 unsigned int first, max_per_txd = E1000_MAX_DATA_PER_TXD;
3262 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR; 3262 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
3263 unsigned int tx_flags = 0; 3263 unsigned int tx_flags = 0;
3264 unsigned int len = skb->len; 3264 unsigned int len = skb->len - skb->data_len;
3265 unsigned long flags; 3265 unsigned long flags;
3266 unsigned int nr_frags = 0; 3266 unsigned int nr_frags;
3267 unsigned int mss = 0; 3267 unsigned int mss;
3268 int count = 0; 3268 int count = 0;
3269 int tso; 3269 int tso;
3270 unsigned int f; 3270 unsigned int f;
3271 len -= skb->data_len;
3272 3271
3273 /* This goes back to the question of how to logically map a tx queue 3272 /* This goes back to the question of how to logically map a tx queue
3274 * to a flow. Right now, performance is impacted slightly negatively 3273 * 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)
3302 * points to just header, pull a few bytes of payload from 3301 * points to just header, pull a few bytes of payload from
3303 * frags into skb->data */ 3302 * frags into skb->data */
3304 hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 3303 hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
3305 if (skb->data_len && (hdr_len == (skb->len - skb->data_len))) { 3304 if (skb->data_len && hdr_len == len) {
3306 switch (adapter->hw.mac_type) { 3305 switch (adapter->hw.mac_type) {
3307 unsigned int pull_size; 3306 unsigned int pull_size;
3308 case e1000_82544: 3307 case e1000_82544: