summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-04-16 10:04:20 +0200
committerDavid S. Miller <davem@davemloft.net>2009-04-20 11:20:30 +0200
commit5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf (patch)
treebcbd94417893127e8ca8f765d184ac71d16659f9
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtma... (diff)
downloadlinux-5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf.tar.xz
linux-5db8765a86a4cbaf45adaf8c231cf9a6ca2dcfaf.zip
net: Fix GRO for multiple page fragments
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>
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 001a4c551d44..308a7d0c277f 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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++;