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

vsock: support header and data on a single descriptor #207

Merged
merged 3 commits into from
Dec 21, 2022

Commits on Dec 21, 2022

  1. vsock: support header and data on a single descriptor

    Starting from Linux 6.2 the virtio-vsock driver can use a single
    descriptor for both header and data:
    https://lore.kernel.org/lkml/20221215043645.3545127-1-bobby.eshleman@bytedance.com/
    
    So with this modification the virtio-vsock device can support header
    and data on a single descriptor or on two. This is just a Linux
    implementation detail though, for the spec it could be multiple
    descriptors as well.
    
    For now let's add only the single descriptor support, since it doesn't
    involve an API change, but in the future we should change the API and
    support an array of VolatileSlices as suggested by Laura here:
    rust-vmm#204 (comment)
    
    Let's make some tests working with this change and adding new tests to
    cover the single descriptor scenario.
    
    Fixes: rust-vmm#204
    
    Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
    stefano-garzarella committed Dec 21, 2022
    Configuration menu
    Copy the full SHA
    b4a5072 View commit details
    Browse the repository at this point in the history
  2. vsock: pass the whole array to build_desc_chain()

    When we use `vq.build_desc_chain()` in tests, we usually pass the
    entire array of descriptors, so there is no need to create a slice
    using a range, we can pass it all directly.
    
    Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
    stefano-garzarella committed Dec 21, 2022
    Configuration menu
    Copy the full SHA
    8225eea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    89a3dda View commit details
    Browse the repository at this point in the history