Commit cb002d07 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Christoph Hellwig

iov_iter: pass void csum pointer to csum_and_copy_to_iter

The single caller to csum_and_copy_to_iter is skb_copy_and_csum_datagram
and we are trying to unite its logic with skb_copy_datagram_iter by passing
a callback to the copy function that we want to apply. Thus, we need
to make the checksum pointer private to the function.
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSagi Grimberg <sagi@lightbitslabs.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 0fc07791
...@@ -266,7 +266,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) ...@@ -266,7 +266,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
{ {
i->count = count; i->count = count;
} }
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump, struct iov_iter *i);
size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i);
......
...@@ -1464,10 +1464,11 @@ bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, ...@@ -1464,10 +1464,11 @@ bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum,
} }
EXPORT_SYMBOL(csum_and_copy_from_iter_full); EXPORT_SYMBOL(csum_and_copy_from_iter_full);
size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump,
struct iov_iter *i) struct iov_iter *i)
{ {
const char *from = addr; const char *from = addr;
__wsum *csum = csump;
__wsum sum, next; __wsum sum, next;
size_t off = 0; size_t off = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment