1

Recently, I was reading vhost in linux kernel. And I find a pdf that said vhost zero-copy data to TAP device. I tried to trace the source code but find nothing about zero-copy. Is it possible to use zero-copy when copying packets to TAP device? How?

4va1anch3
  • 427
  • 1
  • 4
  • 13

1 Answers1

0

To my understanding, zero-copy is possible in the following perspective.

Zero-copy means directly copying the data from a kernel memory space to another kernel memory space without the doing it to the userspace.

TAP device translates the socket-buffer and a corresponding copy of the packet and vice-versa. Since the translation does not involve the packet copy to the userspace, I believe that the TAP conducts zero-copy.

For detailed information about the zero copy, please refer to the following website.

https://developer.ibm.com/articles/j-zerocopy/

Thanks.