-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Virtio tweaks #4683
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
Virtio tweaks #4683
Conversation
9a9b2ad
to
af31cb5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4683 +/- ##
==========================================
+ Coverage 82.14% 82.16% +0.01%
==========================================
Files 255 255
Lines 31321 31361 +40
==========================================
+ Hits 25729 25768 +39
- Misses 5592 5593 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
af31cb5
to
e98da2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me, and the offset calculations do indeed look clearer now
e98da2d
to
dbcea48
Compare
dbcea48
to
7d8af8f
Compare
Add info about queue len and actual size to the message. Signed-off-by: Egor Lazarchuk <[email protected]>
Usize to u64 is safe as Firecracker only supports 64bit platforms where usize == u64. Signed-off-by: Egor Lazarchuk <[email protected]>
7d8af8f
to
29c0e8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool changes. I do agree the offset calculations are much cleaner and safer now.
Replace offset calculations with hard coded values with more descriptive `std::mem::sizeof` with better comments of why the offset should be calculated this way. Additionally replace setting used element fields one by one with single call to `write_obj`. Signed-off-by: Egor Lazarchuk <[email protected]>
Update methods that set values in the `used_ring` to be more descriptive and coherent. Signed-off-by: Egor Lazarchuk <[email protected]>
Rename `signal_used_queue` to `try_signal_queue`. Add a description for the `try_signal_queue` method. Signed-off-by: Egor Lazarchuk <[email protected]>
29c0e8c
to
fa8f751
Compare
Changes
Minor tweaks to the virtio queue methods:
Reason
These changes were part of #4658, but are quite independent of it, so moved to separate PR.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
PR.
CHANGELOG.md
.TODO
s link to an issue.contribution quality standards.
rust-vmm
.