netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: Krishna Kumar <krkumar2@in.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] e1000: Simple optimizations in e1000_xmit_frame
Date: Tue, 08 May 2007 08:36:07 -0700	[thread overview]
Message-ID: <464098E7.7070600@intel.com> (raw)
In-Reply-To: <20070508073127.17544.18180.sendpatchset@localhost.localdomain>

Krishna Kumar wrote:
> Some simple optimizations in e1000_xmit_frame.
> 
> Patch against net-2.6.22.git
> 
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>


looks good. I'll queue this and push it upstream.

Thanks,

Auke


> ---
> diff -ruNp org/drivers/net/e1000/e1000_main.c new/drivers/net/e1000/e1000_main.c
> --- org/drivers/net/e1000/e1000_main.c	2007-04-09 12:40:02.000000000 +0530
> +++ new/drivers/net/e1000/e1000_main.c	2007-04-09 12:42:28.000000000 +0530
> @@ -3264,14 +3264,13 @@ e1000_xmit_frame(struct sk_buff *skb, st
>  	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
> @@ -3305,7 +3304,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
>  		* 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:
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2007-05-08 15:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08  7:31 [PATCH] e1000: Simple optimizations in e1000_xmit_frame Krishna Kumar
2007-05-08 15:36 ` Kok, Auke [this message]

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=464098E7.7070600@intel.com \
    --to=auke-jan.h.kok@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).