Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non zero copy case in virtio device #174

Merged
merged 2 commits into from
May 20, 2014

Conversation

ghost
Copy link

@ghost ghost commented May 20, 2014

This pull request handles the case of receiving non-zero copy packets through the virtio device.
The basic operation is to detect the buffer origin and copy its data to a VM supplied buffer.
There is a special logic to detect when the vm buffers are exhausted and hold processing the incoming packets.

Nikolay Nikolaev added 2 commits May 20, 2014 17:58
…mory

The size argument of these functions should be uint64_t instead of int.
Currently it causes issues with large guest RAM sizes (2G).

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
We have to properly handle the case when the zero copy is not properly 
initialised, i.e. vhost_user:rx_buffers() is not used as a source 
of RX buffers. When this is detected just get a buffer from rx_buffers()
and copy everything in it.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
@lukego
Copy link
Member

lukego commented May 20, 2014

You are my hero! :-)

lukego added a commit that referenced this pull request May 20, 2014
Handle non zero copy case in virtio device
@lukego lukego merged commit 77d2a92 into snabbco:master May 20, 2014
wingo added a commit to dpino/snabb that referenced this pull request Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant