netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: NetDev <netdev@vger.kernel.org>
Cc: jeffrey.t.kirsher@intel.com
Subject: Question on e1000 patch, rx-copy-break related.
Date: Tue, 02 May 2006 12:56:26 -0700	[thread overview]
Message-ID: <4457B96A.4030808@candelatech.com> (raw)

In commit:  a292ca6efbc1f259ddfb9c902367f2588e0e8b0f
to e1000_main.c, there is the change below.

I am curious why the skb_put no longer subtracts ETHERNET_FCS_SIZE
from the length.  Is the idea that we will now always include the
FCS at the end of the skb?

It also seems that the skb_put for the else clause is missing here, but
I think it is fixed in some later patch.

The main reason I ask is that I have a patch that enabled reception of the
FCS in 2.6.13.  It used a flag to determine whether to subtract the ETHERNET_FCS_SIZE
from length (or not, if we are capturing FCS).  I am trying to figure out if this
is still needed in the later releases.

Thanks,
Ben

@@ -3613,17 +3618,40 @@ #endif
  			}
  		}

-		/* Good Receive */
-		skb_put(skb, length - ETHERNET_FCS_SIZE);
+		/* code added for copybreak, this should improve
+		 * performance for small packets with large amounts
+		 * of reassembly being done in the stack */
+#define E1000_CB_LENGTH 256
+		if ((length < E1000_CB_LENGTH) &&
+		   !rx_ring->rx_skb_top &&
+		   /* or maybe (status & E1000_RXD_STAT_EOP) && */
+		   !multi_descriptor) {
+			struct sk_buff *new_skb =
+			    dev_alloc_skb(length + NET_IP_ALIGN);
+			if (new_skb) {
+				skb_reserve(new_skb, NET_IP_ALIGN);
+				new_skb->dev = netdev;
+				memcpy(new_skb->data - NET_IP_ALIGN,
+				       skb->data - NET_IP_ALIGN,
+				       length + NET_IP_ALIGN);
+				/* save the skb in buffer_info as good */
+				buffer_info->skb = skb;
+				skb = new_skb;
+				skb_put(skb, length);
+			}
+		}
+
+		/* end copybreak code */



-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


             reply	other threads:[~2006-05-02 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02 19:56 Ben Greear [this message]
2006-05-03 17:22 ` Question on e1000 patch, rx-copy-break related Jesse Brandeburg
2006-05-03 18:12   ` Ben Greear
2006-05-03 18:21     ` Chris Leech
2006-05-04 16:00     ` Jesse Brandeburg
2006-05-04 16:48       ` Ben Greear

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=4457B96A.4030808@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=jeffrey.t.kirsher@intel.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).