From: Auke Kok <auke-jan.h.kok@intel.com>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, krkumar2@in.ibm.com
Subject: [PATCH 2/2] e1000e: Simple optimizations in e1000_xmit_frame
Date: Fri, 05 Oct 2007 14:15:23 -0700 [thread overview]
Message-ID: <20071005211523.13167.53985.stgit@localhost.localdomain> (raw)
In-Reply-To: <20071005211516.13167.80891.stgit@localhost.localdomain>
After an e1000 patch from Krishna Kumar <krkumar2@in.ibm.com>.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---
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 71c9fed..033e124 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);
next prev parent reply other threads:[~2007-10-05 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 21:15 [PATCH 1/2] e1000: Simple optimizations in e1000_xmit_frame Auke Kok
2007-10-05 21:15 ` Auke Kok [this message]
2007-10-10 0:38 ` Jeff Garzik
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=20071005211523.13167.53985.stgit@localhost.localdomain \
--to=auke-jan.h.kok@intel.com \
--cc=jeff@garzik.org \
--cc=krkumar2@in.ibm.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