Skip to content

Commit

Permalink
bnx2x: fix skb truesize underestimation
Browse files Browse the repository at this point in the history
bnx2x allocates a full page per fragment.

We must account in skb->truesize, the size of the fragment, not the used
part of it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 21, 2011
1 parent a8605c6 commit e1ac50f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,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;
Expand Down

0 comments on commit e1ac50f

Please sign in to comment.