diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2007-10-05 23:15:23 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:55:25 +0200 |
commit | 4e6c709c5ab886be0ddbc96c4f96534e55920e68 (patch) | |
tree | 5eb50879312437b444a1f0a786671ee81c10715e /drivers/net/e1000e | |
parent | e1000: Simple optimizations in e1000_xmit_frame (diff) | |
download | linux-4e6c709c5ab886be0ddbc96c4f96534e55920e68.tar.xz linux-4e6c709c5ab886be0ddbc96c4f96534e55920e68.zip |
e1000e: Simple optimizations in e1000_xmit_frame
After an e1000 patch from Krishna Kumar <krkumar2@in.ibm.com>.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 3a0bb2afe387..600538bc932f 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c @@ -3424,14 +3424,13 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) unsigned int max_per_txd = E1000_MAX_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 irq_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; if (test_bit(__E1000_DOWN, &adapter->state)) { dev_kfree_skb_any(skb); @@ -3459,7 +3458,7 @@ static int 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)) { unsigned int pull_size; pull_size = min((unsigned int)4, skb->data_len); |