Skip to content

Commit

Permalink
sky2: fix skb truesize underestimation
Browse files Browse the repository at this point in the history
sky2 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 13, 2011
1 parent 98a045d commit 7ae60b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/marvell/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,7 +2486,7 @@ static void skb_put_frags(struct sk_buff *skb, unsigned int hdr_space,

frag->size = size;
skb->data_len += size;
skb->truesize += size;
skb->truesize += PAGE_SIZE;
skb->len += size;
length -= size;
}
Expand Down

0 comments on commit 7ae60b3

Please sign in to comment.