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/scsi/fcoe | |
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/scsi/fcoe')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index f6613f9f1bdb..dac8e39a5188 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c | |||
@@ -105,7 +105,7 @@ u32 fcoe_fc_crc(struct fc_frame *fp) | |||
105 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { | 105 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { |
106 | frag = &skb_shinfo(skb)->frags[i]; | 106 | frag = &skb_shinfo(skb)->frags[i]; |
107 | off = frag->page_offset; | 107 | off = frag->page_offset; |
108 | len = frag->size; | 108 | len = skb_frag_size(frag); |
109 | while (len > 0) { | 109 | while (len > 0) { |
110 | clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); | 110 | clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); |
111 | data = kmap_atomic( | 111 | data = kmap_atomic( |