diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-18 21:00:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 03:10:46 -0400 |
commit | 9e903e085262ffbf1fc44a17ac06058aca03524a (patch) | |
tree | 4acefc97ba38c1733474d25c0b2053b56af97db1 /drivers/net/ethernet/natsemi/ns83820.c | |
parent | dd767856a36e00b631d65ebc4bb81b19915532d6 (diff) | |
download | op-kernel-dev-9e903e085262ffbf1fc44a17ac06058aca03524a.zip op-kernel-dev-9e903e085262ffbf1fc44a17ac06058aca03524a.tar.gz |
net: add skb frag size accessors
To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.
Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/natsemi/ns83820.c')
-rw-r--r-- | drivers/net/ethernet/natsemi/ns83820.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c index 73616b9..2b8f64d 100644 --- a/drivers/net/ethernet/natsemi/ns83820.c +++ b/drivers/net/ethernet/natsemi/ns83820.c @@ -1161,11 +1161,11 @@ again: break; buf = skb_frag_dma_map(&dev->pci_dev->dev, frag, 0, - frag->size, DMA_TO_DEVICE); + skb_frag_size(frag), DMA_TO_DEVICE); dprintk("frag: buf=%08Lx page=%08lx offset=%08lx\n", (long long)buf, (long) page_to_pfn(frag->page), frag->page_offset); - len = frag->size; + len = skb_frag_size(frag); frag++; nr_frags--; } |