-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add VIRTIO_NET_F_MRG_RXBUF to virtio-net #4834
Add VIRTIO_NET_F_MRG_RXBUF to virtio-net #4834
Conversation
7cad4af
to
97f33c2
Compare
97f33c2
to
898a0aa
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4834 +/- ##
==========================================
+ Coverage 84.01% 84.05% +0.04%
==========================================
Files 251 251
Lines 28019 28061 +42
==========================================
+ Hits 23541 23588 +47
+ Misses 4478 4473 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
898a0aa
to
59d517a
Compare
8190129
to
7bf4b03
Compare
7bf4b03
to
6c271b6
Compare
f23d061
to
7e767b7
Compare
e825696
to
9446de2
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.
Do we have any unittests where we explicitly test functionality that's special to mergeable buffers? E.g I see that we extended a bunch of the existing tests to make sure those cases still work for mergeable buffers, but do we have anything where we construct a chain that would be invalid without mergbuf, but can be processed with the feature?
0f5b179
to
0f6fe4c
Compare
`Queue::add_used()` method first writes a Descriptor head in the used descriptor ring buffer and then advances the index of this buffer to let the guest know we used one or more Descriptors. Carve out each one of these steps in their own function so that we can add multiple descriptors in the used ring and advance the index only once we finish handling descriptors in one step. This will be useful when, in later commits, we will implement VIRTIO_NET_F_RX_MRGBUF for the RX queue of the network device. Signed-off-by: Egor Lazarchuk <[email protected]>
219941b
to
c6142c0
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.
doc LGTM
c6142c0
to
0d8716f
Compare
b0363f2
to
f07cbf0
Compare
Implement VIRTIO_NET_F_MRG_RXBUF feature for VirtIO network device. It allows receiving a single network frame into multiple descriptor chains. The amount of descriptor chains (also known as heads) that were used is written into the `virtio_net_hdr_v1` structure which is located at the beginning of the guest buffer. Signed-off-by: Egor Lazarchuk <[email protected]>
Add a note about new `VIRTIO_NET_F_RX_MRGBUF` feature in the virtio-net device. Signed-off-by: Egor Lazarchuk <[email protected]>
f07cbf0
to
e4fd753
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.
doc LGTM
Changes
Add VIRTIO_NET_F_MRG_RXBUF to virtio-net.
Now virtio-net device can split incoming packets across multiple descriptor chains if VIRTIO_NET_F_MRG_RXBUF is enabled by the guest.
Reason
Improves performance of virtio-net device.
Fixes: #1314
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
.