9 #include <linux/compiler.h>
10 #include <linux/netdevice.h>
13 #include <linux/types.h>
15 #include <linux/udp.h>
17 #include <linux/export.h>
31 if (len > desc->count)
49 static size_t xdr_skb_read_and_csum_bits(
struct xdr_skb_reader *
desc,
void *to,
size_t len)
54 if (len > desc->count)
58 desc->csum = csum_block_add(desc->csum, csum2, pos);
75 unsigned int len, pglen = xdr->page_len;
79 len = xdr->head[0].iov_len;
82 ret = copy_actor(desc, (
char *)xdr->head[0].iov_base + base, len);
84 if (ret != len || !desc->count)
96 if (base || xdr->page_base) {
98 base += xdr->page_base;
122 ret = copy_actor(desc, kaddr + base, len);
127 ret = copy_actor(desc, kaddr, len);
132 if (ret != len || !desc->count)
135 }
while ((pglen -= len) != 0);
137 len = xdr->tail[0].iov_len;
139 copied += copy_actor(desc, (
char *)xdr->tail[0].iov_base + base, len - base);
155 struct xdr_skb_reader desc;
158 desc.offset =
sizeof(
struct udphdr);
159 desc.count = skb->
len - desc.offset;
161 if (skb_csum_unnecessary(skb))
167 if (desc.offset != skb->
len) {
170 desc.csum = csum_block_add(desc.csum, csum2, desc.offset);
174 if (csum_fold(desc.csum))
177 netdev_rx_csum_fault(skb->
dev);