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

Add VIRTIO_NET_F_MRG_RXBUF to virtio-net #4658

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ShadowCurse
Copy link
Contributor

Changes

Add VIRTIO_NET_F_MRG_RXBUF to virtio-net

fixes: #1314

Reason

Better performance and guest memory utilization.

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

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@ShadowCurse ShadowCurse self-assigned this Jun 28, 2024
@ShadowCurse ShadowCurse force-pushed the net_mrg_buf branch 5 times, most recently from b200d76 to ccda0b0 Compare July 5, 2024 18:15
@ShadowCurse ShadowCurse force-pushed the net_mrg_buf branch 5 times, most recently from cb47e17 to cdc6f02 Compare July 15, 2024 15:51
Add yet another function to convert numbers

Signed-off-by: Egor Lazarchuk <[email protected]>
Add info about queue len and actual size to the
message.

Signed-off-by: Egor Lazarchuk <[email protected]>
There is no point of notifing guest if there are no fully
processed packets.

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]>
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]>
Used `std::mem::size_of` to calculate offset instead of
hard coded values.

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]>
Now virtio-net device can split incoming packets across
multiple descriptor chains if VIRTIO_NET_F_MRG_RXBUF is enabled
by the guest.

Signed-off-by: Egor Lazarchuk <[email protected]>
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.

Virtio-net: implement support of VIRTIO_NET_F_MRG_RXBUF
1 participant