diff options
author | Mattias Nissler <122288598+mnissler-rivos@users.noreply.github.com> | 2024-01-24 18:19:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-24 17:19:41 +0000 |
commit | 6f6fdc58b78aa9698c116962a470a03f4292a477 (patch) | |
tree | 4e128fc16a701458a9721d52a65ff34ed4a44c12 /include/pci_defs.h | |
parent | c9effb42d7bbe8346bbb8110961c1e3640a69c23 (diff) | |
download | libvfio-user-6f6fdc58b78aa9698c116962a470a03f4292a477.zip libvfio-user-6f6fdc58b78aa9698c116962a470a03f4292a477.tar.gz libvfio-user-6f6fdc58b78aa9698c116962a470a03f4292a477.tar.bz2 |
Fix DMA message size calculation (#788)
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 <mnissler@rivosinc.com>
Diffstat (limited to 'include/pci_defs.h')
0 files changed, 0 insertions, 0 deletions