hengqiali / mit-6.828-by-hq

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

342432

hengqiali opened this issue · comments

commented

The purpose of this feature is to split the header and the payload of
the packet.

|                                                receive buffer                                              |
|                                      0th descriptor                        |   1th descriptor    |
|  virtnet hdr  |  mac  |  ip hdr  |  tcp hdr |<-- hold -->|          payload       |

We can use a buffer plus a separate page when allocating the receive
buffer. In this way, we can ensure that all payloads can be
independently in a page, which is very beneficial for the zerocopy
implemented by the upper layer.

https://lists.oasis-open.org/archives/virtio-dev/202208/msg00110.html