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

Fix DMA message size calculation #788

Merged
merged 1 commit into from
Jan 24, 2024

Commits on Jan 24, 2024

  1. Fix DMA message size calculation

    When performing DMA via VFIO-user commands over the socket,
    vfu_dma_transfer breaks large requests into chunks according to the
    client's maximum data transfer size negotiated at connection setup time.
    This change fixes the calculation of the chunk size for the case where
    the last chunk is less than the maximum transfer size.
    
    Unfortunately, the existing test didn't catch this due to the request
    size being a multiple of that maximum data transfer size. Adjust the
    test to make the last chunk size a true remainder.
    
    Signed-off-by: Mattias Nissler <[email protected]>
    mnissler-rivos authored and jlevon committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    f9ece2c View commit details
    Browse the repository at this point in the history