cxgb3: Replace LRO with GRO
diff mbox

Message ID 20090118225040.GA30418@gondor.apana.org.au
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Herbert Xu Jan. 18, 2009, 10:50 p.m. UTC
On Sun, Jan 18, 2009 at 12:33:42PM -0800, Divy Le Ray wrote:
> 
> Thanks for the patch. It does improve the performance.
> I'm now getting about 5.3Gbs.

Thanks for testing Divy!

> Here is a oprofile output:
>       33.929900  copy_user_generic_unrolled          vmlinux
>        7.150300  process_responses                  cxgb3.ko
>        6.261100  refill_fl                          cxgb3.ko
>        6.181700  memcpy                              vmlinux

I wonder why this is still up there.

Maybe this patch will help?


Cheers,

Patch
diff mbox

diff --git a/net/core/dev.c b/net/core/dev.c
index 3742397..3cc19fa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2554,7 +2554,8 @@  struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi,
 
 	BUG_ON(info->nr_frags > MAX_SKB_FRAGS);
 	skb_shinfo(skb)->nr_frags = info->nr_frags;
-	memcpy(skb_shinfo(skb)->frags, info->frags, sizeof(info->frags));
+	memcpy(skb_shinfo(skb)->frags, info->frags,
+	       info->nr_frags * sizeof(*info->frags));
 
 	skb->data_len = info->len;
 	skb->len += info->len;