net: Fix GRO for multiple page fragments
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 16 Apr 2009 08:04:20 +0000 (08:04 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2009 09:20:30 +0000 (02:20 -0700)
This loop over fragments in napi_fraginfo_skb() was "interesting".

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 001a4c551d4498f1c3c8f02f8b0b4992f3015359..308a7d0c277f97a1f87662b8c2b97af44db7fd36 100644 (file)
@@ -2545,9 +2545,9 @@ struct sk_buff *napi_fraginfo_skb(struct napi_struct *napi,
        }
 
        BUG_ON(info->nr_frags > MAX_SKB_FRAGS);
-       frag = &info->frags[info->nr_frags - 1];
+       frag = info->frags;
 
-       for (i = skb_shinfo(skb)->nr_frags; i < info->nr_frags; i++) {
+       for (i = 0; i < info->nr_frags; i++) {
                skb_fill_page_desc(skb, i, frag->page, frag->page_offset,
                                   frag->size);
                frag++;