From: Eric Dumazet Date: Wed, 19 Oct 2011 23:00:23 +0000 (+0000) Subject: bnx2x: fix skb truesize underestimation X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~565 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=39c2069f05c94c691719ef0f211cafa3f9380cf9;p=users%2Fjedix%2Flinux-maple.git bnx2x: fix skb truesize underestimation bnx2x allocates a full page per fragment. We must account in skb->truesize, the size of the fragment, not the used part of it. (cherry picked from commit e1ac50f64691de9a095ac5d73cb8ac73d3d17dba) Signed-off-by: Eric Dumazet CC: Eilon Greenstein Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index 3871388919da..c072c6713c22 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c @@ -452,7 +452,7 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp, skb_fill_page_desc(skb, j, old_rx_pg.page, 0, frag_len); skb->data_len += frag_len; - skb->truesize += frag_len; + skb->truesize += SGE_PAGE_SIZE * PAGES_PER_SGE; skb->len += frag_len; frag_size -= frag_len;