When csum_partial_copy_from_user() is called during a sendfile

186 Views Asked by At

Here is something I googled:

sendfile() is like write(), only directly from descriptor to a socket. That eliminates copying the data from the buffer cache to a buffer in user space.

Current NICs can do scatter-gather I/O, i.e. they can take the packet header from a kernel buffer, but the packet contents from the buffer cache(csum partial copy from user).

The result is called Zero Copy TCP and it is the ultimate goal.

My question is:

What is the purpose of csum_partial_copy_from_user() and when it is called? I followed the process of sendfile until dev_queue_xmit(), but I didn't find where it is called. Thanks

0

There are 0 best solutions below