diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-18 17:00:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 03:10:46 -0400 |
commit | 9e903e085262ffbf1fc44a17ac06058aca03524a (patch) | |
tree | 4acefc97ba38c1733474d25c0b2053b56af97db1 /drivers/net/ethernet/tundra | |
parent | dd767856a36e00b631d65ebc4bb81b19915532d6 (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/net/ethernet/tundra')
-rw-r--r-- | drivers/net/ethernet/tundra/tsi108_eth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c index a03996cf88ed..a8df7eca0956 100644 --- a/drivers/net/ethernet/tundra/tsi108_eth.c +++ b/drivers/net/ethernet/tundra/tsi108_eth.c | |||
@@ -709,13 +709,13 @@ static int tsi108_send_packet(struct sk_buff * skb, struct net_device *dev) | |||
709 | data->txring[tx].len = skb_headlen(skb); | 709 | data->txring[tx].len = skb_headlen(skb); |
710 | misc |= TSI108_TX_SOF; | 710 | misc |= TSI108_TX_SOF; |
711 | } else { | 711 | } else { |
712 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1]; | 712 | const skb_frag_t *frag = &skb_shinfo(skb)->frags[i - 1]; |
713 | 713 | ||
714 | data->txring[tx].buf0 = skb_frag_dma_map(NULL, frag, | 714 | data->txring[tx].buf0 = skb_frag_dma_map(NULL, frag, |
715 | 0, | 715 | 0, |
716 | frag->size, | 716 | skb_frag_size(frag), |
717 | DMA_TO_DEVICE); | 717 | DMA_TO_DEVICE); |
718 | data->txring[tx].len = frag->size; | 718 | data->txring[tx].len = skb_frag_size(frag); |
719 | } | 719 | } |
720 | 720 | ||
721 | if (i == frags - 1) | 721 | if (i == frags - 1) |