“zero copy networking” vs “kernel bypass”?

后端 未结 4 1351
失恋的感觉
失恋的感觉 2020-12-02 06:30

What is the difference between \"zero-copy networking\" and \"kernel bypass\"? Are they two phrases meaning the same thing, or different? Is kernel bypass a technique used w

4条回答
  •  清歌不尽
    2020-12-02 06:56

    ZERO-COPY:

    When transmitting and receiving packets, all packet data must be copied from user-space buffers to kernel-space buffers for transmitting and vice versa for receiving. A zero-copy driver avoids this by having user space and the driver share packet buffer memory directly.

    Instead of having the transmit and receive point to buffers in kernel space which will later require to copy, a region of memory in user space is allocated, and mapped to a given region of physical memory, to be shared memory between the kernel buffers and the user-space buffers, then point each descriptor buffer to its corresponding place in the newly allocated memory.

提交回复
热议问题