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

Inflight I/O: Fix the memory layout of queue region header #88

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhangjaycee
Copy link

As defined in the vhost-user protocol[1], the last field of queue region
header should be a zero-sized array. However, current implementation uses
u64, which will cause a wrong inflight I/O memfd memory layout. So, let's
just remove the desc fileds to fix it.

[1]
https://qemu-project.gitlab.io/qemu/interop/vhost-user.html#inflight-i-o-tracking

Signed-off-by: Jiachen Zhang [email protected]

As defined in the vhost-user protocol[1], the last field of queue region
header should be a zero-sized array. However, current implementation
uses u64, which will cause a wrong inflight I/O memfd memory layout. So,
let's just remove the desc fileds to fix it.

[1] https://qemu-project.gitlab.io/qemu/interop/vhost-user.html

Signed-off-by: Jiachen Zhang <[email protected]>
@stefano-garzarella
Copy link
Member

Yep, it seems wrong. Maybe we should use vmm_sys_util::fam for that field.

@jiangliu
Copy link
Member

jiangliu commented Dec 1, 2021

could you please help to rebase or try FamStruct from vmm_sys_util crate?

sboeuf
sboeuf previously approved these changes Dec 20, 2021
@sboeuf sboeuf dismissed their stale review December 20, 2021 08:41

wrong button

@stefano-garzarella
Copy link
Member

@zhangjaycee we would like to fix this problem. Do you have plans to complete this PR?

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.

4 participants