Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:21:13
Last Modify:2022-05-21 11:43:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:csum_and_copy_to_pipe_iter

Proto:static size_t csum_and_copy_to_pipe_iter(const void *addr, size_t bytes, __wsum *csum, struct iov_iter *i)

Type:size_t

Parameter:

TypeParameterName
const void *addr
size_tbytes
__wsum *csum
struct iov_iter *i
589  pipe = pipe
590  p_mask = ring_size - 1
593  off = 0
594  sum = csum
596  If Not sanity(i) Then Return 0
599  bytes = n = push_pipe(i, bytes, & i_head, & r)
600  If Value for the false possibility is greater at compile time(!n) Then Return 0
602  Do
603  chunk = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, n, PAGE_SIZE - r)
604  p = kmap_atomic(page)
605  sum = csum_and_memcpy(p + r, addr, chunk, sum, off)
606  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(p)
607  head = i_head
608  iov_offset = r + chunk
609  n -= chunk
610  off += chunk
611  addr += chunk
612  r = 0
613  i_head++
614  When n cycle
615  count -= bytes
616  csum = sum
617  Return bytes
Caller
NameDescribe
csum_and_copy_to_iter