Reuse the IoVecBuffer on TX#4589
Conversation
bchalios
left a comment
There was a problem hiding this comment.
Just a couple of comments regarding unnecessary SAFETY comments. Other than that LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4589 +/- ##
==========================================
+ Coverage 81.97% 81.99% +0.01%
==========================================
Files 254 254
Lines 31169 31193 +24
==========================================
+ Hits 25552 25576 +24
Misses 5617 5617
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
roypat
left a comment
There was a problem hiding this comment.
Looks pretty good! Could you just have a look at my two comments and the test failures in CI? They're related to clippy complaining about missing safety comments. For the ones in mod test, you can just add a #![allow(clippy::undocumented_unsafe_blocks)] at the top of the module. No point in annotating these in unittests.
de8d373 to
90a75e2
Compare
18718d9 to
158fac5
Compare
On the net virtio device reuse the IoVecBuffer on the TX path Signed-off-by: Jack Thomson <jackabt@amazon.com>
158fac5 to
97858a1
Compare
Changes
Removes the allocation of the
IoVecBufferin the virtio net device during tx by reusing the same instance for each message.To do this we have to implement Send on the type for it to work, I have tried to cover the unsafe sections the best I can.
Reason
Reduce the number of allocation
Ticket here: #4549
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.TODOs link to an issue.contribution quality standards.
rust-vmm.