开发者

When csum_partial_copy_from_user() is called during a sendfile

开发者 https://www.devze.com 2023-04-10 17:00 出处:网络
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.

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

精彩评论

暂无评论...
验证码 换一张
取 消