diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-13 09:50:19 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-13 22:05:07 +0200 |
commit | a1f4e8bcbccf50cf1894c263af4d677d4f566533 (patch) | |
tree | d10c9a738297aeba1c7c1a4c3be8c62ea385c675 /drivers/net/ethernet/broadcom | |
parent | be2net: fix truesize errors (diff) | |
download | linux-a1f4e8bcbccf50cf1894c263af4d677d4f566533.tar.xz linux-a1f4e8bcbccf50cf1894c263af4d677d4f566533.zip |
bnx2: fix skb truesize underestimation
bnx2 allocates a full page per 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>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 3c221be9d1e2..6ff7636e73a2 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -3051,7 +3051,6 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff *skb, &skb_shinfo(skb)->frags[i - 1]; frag->size -= tail; skb->data_len -= tail; - skb->truesize -= tail; } return 0; } @@ -3083,7 +3082,7 @@ bnx2_rx_skb(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, struct sk_buff *skb, frag_size -= frag_len; skb->data_len += frag_len; - skb->truesize += frag_len; + skb->truesize += PAGE_SIZE; skb->len += frag_len; pg_prod = NEXT_RX_BD(pg_prod); |