aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/amso1100
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-10-18 17:00:24 -0400
committerDavid S. Miller <davem@davemloft.net>2011-10-19 03:10:46 -0400
commit9e903e085262ffbf1fc44a17ac06058aca03524a (patch)
tree4acefc97ba38c1733474d25c0b2053b56af97db1 /drivers/infiniband/hw/amso1100
parentdd767856a36e00b631d65ebc4bb81b19915532d6 (diff)
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/infiniband/hw/amso1100')
-rw-r--r--drivers/infiniband/hw/amso1100/c2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 6e85a75289e8..5ce7b9e8bff6 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -800,8 +800,8 @@ static int c2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
800 /* Loop thru additional data fragments and queue them */ 800 /* Loop thru additional data fragments and queue them */
801 if (skb_shinfo(skb)->nr_frags) { 801 if (skb_shinfo(skb)->nr_frags) {
802 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { 802 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
803 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 803 const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
804 maplen = frag->size; 804 maplen = skb_frag_size(frag);
805 mapaddr = skb_frag_dma_map(&c2dev->pcidev->dev, frag, 805 mapaddr = skb_frag_dma_map(&c2dev->pcidev->dev, frag,
806 0, maplen, DMA_TO_DEVICE); 806 0, maplen, DMA_TO_DEVICE);
807 elem = elem->next; 807 elem = elem->next;