rust-vmm / vhost-user-backend

Deprecated repository, code now lives in: https://github.com/rust-vmm/vhost/
Apache License 2.0
18 stars 16 forks source link

Refine VringStateGuard/VringStateMutGuard #52

Closed jiangliu closed 2 years ago

jiangliu commented 2 years ago

Previously VringStateGuard and VringStateMutGuard are defined as enum, which limits the extensibility of the interface. So convert them into traits by using the High Rank Trait Bound tricky.

This MR also includes several commits to prepare for publishing vhost-user-backend.

slp commented 2 years ago

Thanks a lot for working on this. Looks good to me. Later today I'll give this one a try with virtiofsd.

Perhaps it may also be worth updating the vhost dependency to 0.3.0 here.

jiangliu commented 2 years ago

Thanks a lot for working on this. Looks good to me. Later today I'll give this one a try with virtiofsd.

Perhaps it may also be worth updating the vhost dependency to 0.3.0 here.

updated to vhost v0.3.0 and virtio-queue v0.1.0.

slp commented 2 years ago

I've tested this PR with virtiofsd, and it just required a very small change. All tests passed.

I've also noticed a minor type in a comment, but otherwise looks ready to me. I'm approving this one now. Will refresh the approval if needed.